From patchwork Mon Jun 19 10:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13284339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9024EB64D9 for ; Mon, 19 Jun 2023 10:55:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232229AbjFSKzR (ORCPT ); Mon, 19 Jun 2023 06:55:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjFSKyp (ORCPT ); Mon, 19 Jun 2023 06:54:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19344100 for ; Mon, 19 Jun 2023 03:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687171949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ii0g44MHqb3/hcjWWH34sglXiDVkosGVv1NC25z3QnE=; b=Zc5eSQC3OvNUttXlvYVTp/R/swjg25xCDN0qUWUwusV/d36DmC5NEJBGA6CSWxj1xyJ7cz pmkU5eXIwNJUhgUwkObgR4nzvngD8/lU8pWh/vtfFpgiv1sRckunPh7yWI5PoEbm6X7lx+ d5S+0iACHMUQzzhVABtktjYuZ3XnMbY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-355-ek3U7LH8OXuq8CIMAIBJXw-1; Mon, 19 Jun 2023 06:52:24 -0400 X-MC-Unique: ek3U7LH8OXuq8CIMAIBJXw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 297CC801189; Mon, 19 Jun 2023 10:52:23 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.193.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95BB1112132C; Mon, 19 Jun 2023 10:52:21 +0000 (UTC) From: Hans de Goede To: Mauro Carvalho Chehab , Sakari Ailus Cc: Hans de Goede , Tsuchiya Yuto , Andy Shevchenko , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , Kate Hsuan , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 5/7] media: atomisp: Add some higher resolutions to atomisp_enum_framesizes() Date: Mon, 19 Jun 2023 12:52:10 +0200 Message-Id: <20230619105212.303653-5-hdegoede@redhat.com> In-Reply-To: <20230619105212.303653-1-hdegoede@redhat.com> References: <20230619105212.303653-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add some higher resolutions to the fixed list of resolutions which atomisp_enum_framesizes() uses on sensors which can do cropping and can thus make any resolution that will fit. This is useful for higher resolution sensors like the 2560x1920 ov5693 sensor. Note the highest resolutions added here are 1920x because the atomisp firmware does not support widths > 1920 with the default asd->run_mode->val == ATOMISP_RUN_MODE_PREVIEW setting. Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c index 047b9fb075d0..8fd981f49659 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c @@ -708,6 +708,9 @@ static int atomisp_enum_framesizes_crop_inner(struct atomisp_device *isp, int *valid_sizes) { static const struct v4l2_frmsize_discrete frame_sizes[] = { + { 1920, 1440 }, + { 1920, 1200 }, + { 1920, 1080 }, { 1600, 1200 }, { 1600, 1080 }, { 1600, 900 },