media: mtk-vcodec: Remove VA from encoder frame buffers
authorTomasz Figa <tfiga@chromium.org>
Wed, 21 Nov 2018 06:37:59 +0000 (01:37 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 3 Dec 2018 19:29:14 +0000 (14:29 -0500)
commit8b8130f0c76abb422b5fd98aba401cd97e0b88b9
treec9b3d265462f5bc7cf62aa007af93cdddfcfa6df
parent25f5c34bc8bfabc7406d7c88b73cdf05023d31f7
media: mtk-vcodec: Remove VA from encoder frame buffers

The encoder driver has no need to do any CPU access to the source frame
buffers. Use a separate structure for holding DMA addresses and sizes
for those and remove, so we do not end up introducing any erroneous
dereferences of those VAs.

This fixes DMA-buf import from exporters that do not provide contiguous
kernel mappings, which includes the MTK DRM driver.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h
drivers/media/platform/mtk-vcodec/venc_drv_if.h