]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: nvmap: cache flush on invalidate request
authorSri Krishna chowdary <schowdary@nvidia.com>
Wed, 2 Apr 2014 17:18:11 +0000 (22:48 +0530)
committerTony Ly <tly@nvidia.com>
Wed, 7 May 2014 18:51:27 +0000 (11:51 -0700)
Invalidate operation is done by one VA, at cache line granularity,
at a time. The invalidate time goes up linearly with memory size.
On contrary, cache flush (clean + invalidate) time is constant for
memory sizes above cache size as it uses set/ways. Hence, treat all
invalidate requests as flush.

Bug 1423574

Change-Id: If0f50f4aea47fc1f9ee7bf7e6de4fd605d19d1bc
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/391431
(cherry picked from commit 97f69cceaf6d3b70b3b12c2f4fb0f3e6f55c3564)
Reviewed-on: http://git-master/r/405095
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/video/tegra/nvmap/nvmap_ioctl.c

index 9af2f4d8fd9453711c7de0f01fec76b5a7333347..74369264ffb1a142e7c5207413b1f0bd76dd220f 100644 (file)
@@ -973,6 +973,9 @@ int __nvmap_do_cache_maint(struct nvmap_client *client,
        if (!h)
                return -EFAULT;
 
+       if (op == NVMAP_CACHE_OP_INV)
+               op = NVMAP_CACHE_OP_WB_INV;
+
        cache_op.h = h;
        cache_op.start = start;
        cache_op.end = end;