From patchwork Mon Jun 19 10:52:09 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: 694359 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 394C2EB64DB for ; Mon, 19 Jun 2023 10:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232174AbjFSKzN (ORCPT ); Mon, 19 Jun 2023 06:55:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232348AbjFSKyl (ORCPT ); Mon, 19 Jun 2023 06:54:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CD671FE1 for ; Mon, 19 Jun 2023 03:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687171946; 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=xnqmnuzscMduS86UdE+Ktdua/ucXBwFGdE/PJUq9UGU=; b=K9feasc77BpJa2gyT3ynI4+g2CixQPsjnNvxwzW4XS21x7upk8ool5Ys4t8pqsFL7nx6Jo vlyzfNibbXPQbOGCIGeWRI4xR070VbY9l5hBHVwvYcEeQLYPIyPq5HcvrIzzMMVNJGlagJ Bnx/oPvKg3idF4fUcITCGM4cMrt81Kg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-WgqnNi0rNEe1mO2PcnVP1A-1; Mon, 19 Jun 2023 06:52:22 -0400 X-MC-Unique: WgqnNi0rNEe1mO2PcnVP1A-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 5F084380671B; Mon, 19 Jun 2023 10:52:21 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.193.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88F71112132C; Mon, 19 Jun 2023 10:52:19 +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 4/7] media: atomisp: Change atomisp_enum_framesizes() too small cut off from 2/3th to 5/8th Date: Mon, 19 Jun 2023 12:52:09 +0200 Message-Id: <20230619105212.303653-4-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 Change atomisp_enum_framesizes() cut off for too small resolutions from 2/3th to 5/8th this results in more resolutions being available with some sensors. E.g. this allows using 800x600 with a 1280x960 sensor. Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c index d2174156573a..047b9fb075d0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c @@ -729,11 +729,11 @@ static int atomisp_enum_framesizes_crop_inner(struct atomisp_device *isp, continue; /* - * Skip sizes where width and height are less then 2/3th of the + * Skip sizes where width and height are less then 5/8th of the * sensor size to avoid sizes with a too small field of view. */ - if (frame_sizes[i].width < (active->width * 2 / 3) && - frame_sizes[i].height < (active->height * 2 / 3)) + if (frame_sizes[i].width < (active->width * 5 / 8) && + frame_sizes[i].height < (active->height * 5 / 8)) continue; if (*valid_sizes == fsize->index) {