diff options
author | Ian Wisbon <ian.wisbon@timesys.com> | 2011-02-14 16:41:03 -0500 |
---|---|---|
committer | Ian Wisbon <ian.wisbon@timesys.com> | 2011-02-14 16:41:03 -0500 |
commit | 8a83780a187ba1961380814eaf9c503043345d12 (patch) | |
tree | 80f5d89cca49330e137688c72fb10c9f42dc5663 /drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h | |
parent | 14a4057959f8ee0a2249eb2abd64fd6b1f571d98 (diff) |
Digi Release Code from del-5.6/main2.6.31-digi-201102141643
Diffstat (limited to 'drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h')
-rw-r--r-- | drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h b/drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h index 305b2ee9066d..65eadb1e79cf 100644 --- a/drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h +++ b/drivers/mxc/amd-gpu/platform/hal/linux/gsl_hwaccess.h @@ -40,9 +40,14 @@ OSINLINE void kgsl_hwaccess_memread(void *dst, unsigned int gpubase, unsigned int gpuoffset, unsigned int sizebytes, unsigned int touserspace) { - if (gsl_driver.enable_mmu && (gpubase >= GSL_LINUX_MAP_RANGE_START) && (gpubase < GSL_LINUX_MAP_RANGE_END)) { +#ifdef GSL_MMU_TRANSLATION_ENABLED + if(gpubase >= GSL_LINUX_MAP_RANGE_START && gpubase < GSL_LINUX_MAP_RANGE_END) + { gsl_linux_map_read(dst, gpubase+gpuoffset, sizebytes, touserspace); - } else { + } + else +#endif + { mb(); dsb(); if (touserspace) @@ -66,9 +71,14 @@ kgsl_hwaccess_memread(void *dst, unsigned int gpubase, unsigned int gpuoffset, u OSINLINE void kgsl_hwaccess_memwrite(unsigned int gpubase, unsigned int gpuoffset, void *src, unsigned int sizebytes, unsigned int fromuserspace) { - if (gsl_driver.enable_mmu && (gpubase >= GSL_LINUX_MAP_RANGE_START) && (gpubase < GSL_LINUX_MAP_RANGE_END)) { +#ifdef GSL_MMU_TRANSLATION_ENABLED + if(gpubase >= GSL_LINUX_MAP_RANGE_START && gpubase < GSL_LINUX_MAP_RANGE_END) + { gsl_linux_map_write(src, gpubase+gpuoffset, sizebytes, fromuserspace); - } else { + } + else +#endif + { mb(); dsb(); if (fromuserspace) @@ -92,9 +102,12 @@ kgsl_hwaccess_memwrite(unsigned int gpubase, unsigned int gpuoffset, void *src, OSINLINE void kgsl_hwaccess_memset(unsigned int gpubase, unsigned int gpuoffset, unsigned int value, unsigned int sizebytes) { - if (gsl_driver.enable_mmu && (gpubase >= GSL_LINUX_MAP_RANGE_START) && (gpubase < GSL_LINUX_MAP_RANGE_END)) { - gsl_linux_map_set(gpuoffset+gpubase, value, sizebytes); - } else { +#ifdef GSL_MMU_TRANSLATION_ENABLED + if(gpubase >= GSL_LINUX_MAP_RANGE_START && gpubase < GSL_LINUX_MAP_RANGE_END) + gsl_linux_map_set(gpuoffset+gpubase, value, sizebytes); + else +#endif + { mb(); dsb(); kos_memset((void *)(gpubase + gpuoffset), value, sizebytes); |