[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)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:31:09 +0000 (14:31 +0900)
commit28426402be90445115d536e3f5af1ad2e28f4fed
treef47cf5b2c12619673440583b95273db6a96caf1b
parent981980643e5e5b14894e6e497c7702734df13923
[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