summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ov5647.c
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-11-19 17:32:37 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-12 16:17:39 +0100
commit87576ac69996fa3488424723723f7f8d2cebc3b3 (patch)
tree8151ca97df9a8a6b91c05940f78932229d89181d /drivers/media/i2c/ov5647.c
parenta8df5af695a1ecd5077df18bd00375e24947b468 (diff)
downloadlinux-next-87576ac69996fa3488424723723f7f8d2cebc3b3.tar.gz
media: ov5647: Use SBGGR10_1X10 640x480 as default
The SBGGR10_1X10 formats support more resolutions than SBGGR8_1X8. Make it the default sensor format and set 2x2 binned 640x480 resolution as default sensor size as it maximizes the FOV and framerate. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ov5647.c')
-rw-r--r--drivers/media/i2c/ov5647.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index e206656a5e88..bb570be48717 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -677,8 +677,9 @@ static const struct ov5647_format_list ov5647_formats[] = {
#define OV5647_NUM_FORMATS (ARRAY_SIZE(ov5647_formats))
-#define OV5647_DEFAULT_MODE (&ov5647_formats[0].modes[0])
-#define OV5647_DEFAULT_FORMAT (ov5647_formats[0].modes[0].format)
+/* Default sensor mode is 2x2 binned 640x480 SBGGR10_1X10. */
+#define OV5647_DEFAULT_MODE (&ov5647_formats[1].modes[3])
+#define OV5647_DEFAULT_FORMAT (ov5647_formats[1].modes[3].format)
static int ov5647_write(struct v4l2_subdev *sd, u16 reg, u8 val)
{
@@ -1026,7 +1027,6 @@ static int ov5647_set_get_fmt(struct v4l2_subdev *sd,
{
struct v4l2_mbus_framefmt *fmt = &format->format;
- /* Only one format is supported, so return that. */
*fmt = OV5647_DEFAULT_FORMAT;
return 0;