diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2021-10-07 00:26:20 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-10-08 13:40:10 +0200 |
commit | 6c0f6c424fcac470cb6f444a53d549d227f46910 (patch) | |
tree | 0b42ed2def078ea7301b3e72e7015198bbc6be91 /drivers/staging/media/ipu3 | |
parent | 3eacb6028e84ade9da6469a31404acb1b43d2a00 (diff) | |
download | linux-6c0f6c424fcac470cb6f444a53d549d227f46910.tar.bz2 |
media: ipu3-imgu: Set valid initial format
The initial format did not have a valid size.
Fixes v4l2-compliance:
fail: v4l2-test-formats.cpp(723): Video Output Multiplanar:
TRY_FMT(G_FMT) != G_FMT
test VIDIOC_TRY_FMT: FAIL
Signed-off-by: Ricardo Ribalda <ribalda@chromium.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/staging/media/ipu3')
-rw-r--r-- | drivers/staging/media/ipu3/ipu3-v4l2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index b723186d2134..d9f7a854d68c 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -1136,7 +1136,9 @@ static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe, def_pix_fmt.height = def_bus_fmt.height; def_pix_fmt.field = def_bus_fmt.field; def_pix_fmt.num_planes = 1; - def_pix_fmt.plane_fmt[0].bytesperline = def_pix_fmt.width * 2; + def_pix_fmt.plane_fmt[0].bytesperline = + imgu_bytesperline(def_pix_fmt.width, + IMGU_ABI_FRAME_FORMAT_RAW_PACKED); def_pix_fmt.plane_fmt[0].sizeimage = def_pix_fmt.height * def_pix_fmt.plane_fmt[0].bytesperline; def_pix_fmt.flags = 0; |