media: cedrus: Don't kernel map most buffers
authorJernej Skrabec <jernej.skrabec@gmail.com>
Sun, 10 Oct 2021 10:45:14 +0000 (11:45 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Oct 2021 07:08:39 +0000 (08:08 +0100)
commit5db127a534e1aa381c3ba60f51455863f37ea96b
tree0653a6171fff8ac2ea1cc1c1b62e43c273f57ddc
parent0887e9e152efbd3601d6c907e90033d25067277d
media: cedrus: Don't kernel map most buffers

Except for VP8 probability coefficients buffer, all other buffers are
never accessed by CPU. That allows us to mark them with
DMA_ATTR_NO_KERNEL_MAPPING flag. This helps with decoding big (like 4k)
videos on 32-bit ARM platforms where default vmalloc size is relatively
small - 240 MiB. Since auxiliary buffer are not yet efficiently
allocated, this can be easily exceeded. Even if allocation is optimized,
4k videos will still often exceed this limit.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/sunxi/cedrus/cedrus_h264.c
drivers/staging/media/sunxi/cedrus/cedrus_h265.c
drivers/staging/media/sunxi/cedrus/cedrus_video.c