]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00240988-12 Enable GPU hardware reset for 3.5 kernel
authorLoren HUANG <b02279@freescle.com>
Mon, 21 Jan 2013 07:37:03 +0000 (15:37 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:52 +0000 (08:35 +0200)
Cherry-pick from imx_3.5.7 branch.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Lily Zhang
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c

index cb6d3ea2c16f1bb8841a81b177e3f9337d10ef05..792dd96aac1c42af09481434b816423e2a1dde96 100644 (file)
 #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;
 }