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: Sakari Ailus <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
{
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);
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)