Commit 87576ac6 authored by Jacopo Mondi's avatar Jacopo Mondi Committed by Mauro Carvalho Chehab

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: default avatarJacopo Mondi <jacopo@jmondi.org>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a8df5af6
...@@ -677,8 +677,9 @@ static const struct ov5647_format_list ov5647_formats[] = { ...@@ -677,8 +677,9 @@ static const struct ov5647_format_list ov5647_formats[] = {
#define OV5647_NUM_FORMATS (ARRAY_SIZE(ov5647_formats)) #define OV5647_NUM_FORMATS (ARRAY_SIZE(ov5647_formats))
#define OV5647_DEFAULT_MODE (&ov5647_formats[0].modes[0]) /* Default sensor mode is 2x2 binned 640x480 SBGGR10_1X10. */
#define OV5647_DEFAULT_FORMAT (ov5647_formats[0].modes[0].format) #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) 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, ...@@ -1026,7 +1027,6 @@ static int ov5647_set_get_fmt(struct v4l2_subdev *sd,
{ {
struct v4l2_mbus_framefmt *fmt = &format->format; struct v4l2_mbus_framefmt *fmt = &format->format;
/* Only one format is supported, so return that. */
*fmt = OV5647_DEFAULT_FORMAT; *fmt = OV5647_DEFAULT_FORMAT;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment