]> git.baikalelectronics.ru Git - kernel.git/commit
media: rkvdec: Support dynamic resolution changes
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 8 Oct 2021 10:04:23 +0000 (11:04 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Oct 2021 07:08:39 +0000 (08:08 +0100)
commitf5856f24fe84d9f6587ffc1db860f5f59e446780
treebedc767a17f7d089509e37f6fd0fa159d3f71f8c
parentb11e3f372c8cfdad6007dea4464aff65c8d470af
media: rkvdec: Support dynamic resolution changes

The mem-to-mem stateless decoder API specifies support for dynamic
resolution changes. In particular, the decoder should accept format
changes on the OUTPUT queue even when buffers have been allocated,
as long as it is not streaming.

Relax restrictions for S_FMT as described in the previous paragraph,
and as long as the codec format remains the same. This aligns it with
the Hantro and Cedrus decoders. This change was mostly based on commit
24985b1b2db1 ("media: hantro: Fix s_fmt for dynamic resolution changes").

Since rkvdec_s_fmt() is now just a wrapper around the output/capture
variants without any additional shared functionality, drop the wrapper
and call the respective functions directly.

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.c