summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren HUANG <b02279@freescle.com>2013-01-21 15:37:03 +0800
committerLoren Huang <b02279@freescale.com>2013-01-25 13:09:31 +0800
commit3b051d33d5d2dc04c0526d6581f1289043212184 (patch)
treecdb1abbdb8e95cc3c5b7f425d3860ce6e4fe5633
parent4eb50eb4b7c4e9e6d34a1939610dea214544b324 (diff)
ENGR00240988-12 Enable GPU hardware reset for 3.5 kernel
Cherry-pick from imx_3.5.7 branch. Signed-off-by: Loren HUANG <b02279@freescale.com> Acked-by: Lily Zhang
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
index cb6d3ea2c16f..792dd96aac1c 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -38,9 +38,13 @@
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
#include <linux/math64.h>
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+#include <mach/common.h>
+#endif
#include <linux/delay.h>
#include <linux/pm_runtime.h>
+
#define _GC_OBJ_ZONE gcvZONE_OS
/*******************************************************************************
@@ -6886,10 +6890,10 @@ gckOS_ResetGPU(
IN gceCORE Core
)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
#define SRC_SCR_OFFSET 0
#define BP_SRC_SCR_GPU3D_RST 1
#define BP_SRC_SCR_GPU2D_RST 4
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
void __iomem *src_base = IO_ADDRESS(SRC_BASE_ADDR);
gctUINT32 bit_offset,val;
@@ -6913,6 +6917,8 @@ gckOS_ResetGPU(
}
gcmkFOOTER_NO();
+#else
+ imx_src_reset_gpu((int)Core);
#endif
return gcvSTATUS_OK;
}