media: hantro: Set buffers' zeroth plane payload in .buf_prepare
authorEzequiel Garcia <ezequiel@collabora.com>
Wed, 25 Mar 2020 21:34:33 +0000 (22:34 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 09:22:31 +0000 (11:22 +0200)
commit6837e43e9ca11c49eac175326a736ee1bd2de516
treec9f3434c3e46adcbb36b68916aa52fb4721ed870
parente1e213b1b0e4c785bac8bfa52130996105bffb62
media: hantro: Set buffers' zeroth plane payload in .buf_prepare

Buffers' zeroth plane payload size is calculated at format
negotiation time, and so it can be set in .buf_prepare.

Keep in mind that, to make this change easier, hantro_buf_prepare
is refactored, using the cedrus driver as reference. This results
in cleaner code as byproduct.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/hantro/hantro_v4l2.c