]> git.baikalelectronics.ru Git - kernel.git/commit
media: rkvdec: Do not override sizeimage for output format
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 8 Oct 2021 10:04:22 +0000 (11:04 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Oct 2021 07:08:39 +0000 (08:08 +0100)
commitb11e3f372c8cfdad6007dea4464aff65c8d470af
tree7c205327b54f99e82783537f1fd3aad0c47bbe5b
parent605d96ce1793b1b35f40c482b84a5077c74b9ca9
media: rkvdec: Do not override sizeimage for output format

The rkvdec H.264 decoder currently overrides sizeimage for the output
format. This causes issues when userspace requires and requests a larger
buffer, but ends up with one of insufficient size.

Instead, only provide a default size if none was requested. This fixes
the video_decode_accelerator_tests from Chromium failing on the first
frame due to insufficient buffer space. It also aligns the behavior
of the rkvdec driver with the Hantro and Cedrus drivers.

Fixes: 16832e0eb859 ("media: rkvdec: Add the rkvdec driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c