[COMMON] media: smfc: clean the dirty region by CPU in .buf_cleaup
authorCho KyongHo <pullip.cho@samsung.com>
Wed, 22 Jul 2015 08:04:12 +0000 (17:04 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:19 +0000 (20:22 +0300)
commit1f98ac1b6127aced6686a6bd5f4325518aa21ea5
treec1f2e827b062838f06db77f183d0e7293837af41
parent07239e7f4e02efd9f7efdc65e001ecfdb2d3ea58
[COMMON] media: smfc: clean the dirty region by CPU in .buf_cleaup

Even though userspace gives V4L2_BUF_FLAG_NO_CACHE_CLEAN flag in
the v4l2_buffer on qbuf, it just guarantees that the buffer after
the specific offset is not cache dirty by CPU.
If the offset become smaller than the previous, H/W may starts to
write the compressed stream on the area that may have dirty cache
lines.
To prevent the problem, the driver should clean the dirty cache lines
if the offset becomes no longer valied.

Change-Id: I54baba493dd4c179eda740bedba3378d4abe8435
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/media/platform/exynos/smfc/smfc.c