diff mbox series

[4/7] media: atomisp: Change atomisp_enum_framesizes() too small cut off from 2/3th to 5/8th

Message ID 20230619105212.303653-4-hdegoede@redhat.com
State Accepted
Commit b24209cf1c5c47bee31d0f03dae6f2349b8b85ac
Headers show
Series None | expand

Commit Message

Hans de Goede June 19, 2023, 10:52 a.m. UTC
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 <hdegoede@redhat.com>
---
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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) {