From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benoit Parrot Subject: [Patch v3 3/3] media: ov5640: Make 2592x1944 mode only available at 15 fps Date: Fri, 4 Oct 2019 12:24:18 -0500 Message-ID: <20191004172418.2339-4-bparrot@ti.com> References: <20191004172418.2339-1-bparrot@ti.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20191004172418.2339-1-bparrot@ti.com> Sender: linux-kernel-owner@vger.kernel.org To: Hans Verkuil , Sakari Ailus , Jacopo Mondi Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Benoit Parrot List-Id: devicetree@vger.kernel.org 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 --- drivers/media/i2c/ov5640.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 5cebad151546..8ffb3a55ca27 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; } -- 2.17.1