OSDN Git Service

media: hantro: Fix s_fmt for dynamic resolution changes
authorEzequiel Garcia <ezequiel@collabora.com>
Mon, 7 Oct 2019 17:45:02 +0000 (19:45 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 10 Nov 2019 16:48:56 +0000 (17:48 +0100)
commitae02d49493b5d32bb3e035fdeb1655346f5e1ea5
tree54f53cffcb0d8642ef4e1464bc44d5b892a897e1
parent59d8bf5ddfcfdd16e4dcb1a23915d09648a05558
media: hantro: Fix s_fmt for dynamic resolution changes

Commit 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders")
changed the conditions under S_FMT was allowed for OUTPUT
CAPTURE buffers.

However, and according to the mem-to-mem stateless decoder specification,
in order to support dynamic resolution changes, S_FMT should be allowed
even if OUTPUT buffers have been allocated.

Relax decoder S_FMT restrictions on OUTPUT buffers, allowing a
resolution modification, provided the pixel format stays the same.

Tested on RK3288 platforms using ChromiumOS Video Decode/Encode
Accelerator Unittests.

[hverkuil: fix typo: In other -> In order]

Fixes: 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders")
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: <stable@vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro_v4l2.c