diff options
author | Alistair Strachan <alistair.strachan@imgtec.com> | 2012-06-19 17:58:12 +0100 |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2012-06-20 10:04:17 -0700 |
commit | d45c5b0622ff2099402a09eae29a01e9fdb96bdf (patch) | |
tree | fdb8342777243754f19833c669edf0e55a76dc51 /drivers/gpu | |
parent | f145b94ff00575b74bde04dae6e53ad7f8c00d90 (diff) | |
download | kernel_samsung_crespo-d45c5b0622ff2099402a09eae29a01e9fdb96bdf.zip kernel_samsung_crespo-d45c5b0622ff2099402a09eae29a01e9fdb96bdf.tar.gz kernel_samsung_crespo-d45c5b0622ff2099402a09eae29a01e9fdb96bdf.tar.bz2 |
gpu: pvr: Flush the whole CPU cache when allocating uncached.
This is a workaround for range-based CPU cache invalidation
apparently not working reliably.
Change-Id: I62fe3d10a465ee630729d7edf054f7bc82a422d8
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/pvr/Makefile | 1 | ||||
-rw-r--r-- | drivers/gpu/pvr/mm.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/Makefile b/drivers/gpu/pvr/Makefile index 10a89b8..d428d50 100644 --- a/drivers/gpu/pvr/Makefile +++ b/drivers/gpu/pvr/Makefile @@ -37,6 +37,7 @@ ccflags-y += \ -Idrivers/gpu/pvr/sgx \ -DSUPPORT_GET_DC_BUFFERS_SYS_PHYADDRS \ -DPVRSRV_MMU_MAKE_READWRITE_ON_DEMAND \ + -DPVRSRV_AVOID_RANGED_INVALIDATE \ -DPVR_LDM_DRIVER_REGISTRATION_NAME="\"pvrsrvkm\"" ccflags-$(CONFIG_PVR_BUILD_RELEASE) += \ diff --git a/drivers/gpu/pvr/mm.c b/drivers/gpu/pvr/mm.c index ecad206..80f0efe 100644 --- a/drivers/gpu/pvr/mm.c +++ b/drivers/gpu/pvr/mm.c @@ -983,7 +983,11 @@ NewVMallocLinuxMemArea(IMG_UINT32 ui32Bytes, IMG_UINT32 ui32AreaFlags) if (AreaIsUncached(ui32AreaFlags) && !bFromPagePool) { +#if !defined(PVRSRV_AVOID_RANGED_INVALIDATE) OSInvalidateCPUCacheRangeKM(psLinuxMemArea, pvCpuVAddr, ui32Bytes); +#else + OSFlushCPUCacheKM(); +#endif } return psLinuxMemArea; |