From: Benoit Parrot Date: Wed, 9 Oct 2019 12:35:10 +0000 (-0300) Subject: media: ov5640: Make 2592x1944 mode only available at 15 fps X-Git-Tag: v5.4.7~257 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57171e52b492dd517284b5c330b96528a89c3ccd;p=thirdparty%2Fkernel%2Fstable.git media: ov5640: Make 2592x1944 mode only available at 15 fps [ Upstream commit 981e445454531c9d5ac5d3fa8c0f1bd55262d001 ] The sensor data sheet clearly state that 2592x1944 only works at 15 fps make sure we don't try to miss configure the pll out of acceptable range. Signed-off-by: Benoit Parrot Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 500d9bbff10b5..18dd2d717088b 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -1611,6 +1611,11 @@ ov5640_find_mode(struct ov5640_dev *sensor, enum ov5640_frame_rate fr, !(mode->hact == 640 && mode->vact == 480)) return NULL; + /* 2592x1944 only works at 15fps max */ + if ((mode->hact == 2592 && mode->vact == 1944) && + fr > OV5640_15_FPS) + return NULL; + return mode; }