Commit 1b81717e authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] smiapp: Obtain correct media bus code for try format

The media bus code obtained for try format may have been a code that the
sensor did not even support. Use a supported code with the current pixel
order.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 2aa8e838
......@@ -2623,8 +2623,6 @@ static int smiapp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{
struct smiapp_subdev *ssd = to_smiapp_subdev(sd);
struct smiapp_sensor *sensor = ssd->sensor;
u32 mbus_code =
smiapp_csi_data_formats[smiapp_pixel_order(sensor)].code;
unsigned int i;
mutex_lock(&sensor->mutex);
......@@ -2640,7 +2638,7 @@ static int smiapp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
try_fmt->width = try_crop->width;
try_fmt->height = try_crop->height;
try_fmt->code = mbus_code;
try_fmt->code = sensor->internal_csi_format->code;
try_fmt->field = V4L2_FIELD_NONE;
if (ssd != sensor->pixel_array)
......
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