From: Cho KyongHo Date: Mon, 14 Sep 2015 15:53:57 +0000 (+0900) Subject: [COMMON] media: smfc: invalid the cache lines as little as possible X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf94f7f006ed1bbd791636548b3ea4dd66a64d4a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: smfc: invalid the cache lines as little as possible The amount of data to invalidate CPU cache lines of the destination buffer of the JPEG compression is much smaller than the length of the destination buffer because the userspace tends to qbuf the buffer that is large enough to store the uncompressed image. Therefore, the data amount of invaidation on the destination buffer needs to be less than the buffer size for less delay in cache invalidation and vb2_ion_buf_finish_exact() is for that purpose. Change-Id: Ifc069a3e940f4e470a2947dc249704340cbe5abb Signed-off-by: Cho KyongHo --- diff --git a/drivers/media/platform/exynos/smfc/smfc.c b/drivers/media/platform/exynos/smfc/smfc.c index 8f2ed0be3f5f..a319336534cf 100644 --- a/drivers/media/platform/exynos/smfc/smfc.c +++ b/drivers/media/platform/exynos/smfc/smfc.c @@ -290,6 +290,11 @@ static int smfc_vb2_buf_prepare(struct vb2_buffer *vb) static void smfc_vb2_buf_finish(struct vb2_buffer *vb) { + /* + * FIXME: develop how to maintain a part of buffer + if (!(vb->v4l2_buf.flags & V4L2_BUF_FLAG_NO_CACHE_INVALIDATE)) + vb2_ion_buf_finish_exact(vb); + */ } static void smfc_vb2_buf_cleanup(struct vb2_buffer *vb)