Skip to content

Commit

Permalink
media: atomisp: mt9m114: Fix fmt->code not getting set on try_fmt
Browse files Browse the repository at this point in the history
Fix mt9m114_set_fmt() not setting format.format.code when called with
format.which == V4L2_SUBDEV_FORMAT_TRY.

This fixes atomisp failing to start streaming with the mt9m114 on
an Asus T100TA because of __media_pipeline_start() returning -EPIPE.

Signed-off-by: Hans de Goede <[email protected]>
  • Loading branch information
jwrdegoede committed Nov 5, 2024
1 parent 5b61751 commit a0a55f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,

fmt->width = res->width;
fmt->height = res->height;
fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;

if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
*v4l2_subdev_state_get_format(sd_state, 0) = *fmt;
Expand Down

0 comments on commit a0a55f6

Please sign in to comment.