MGS-2740 [#imx-456] i.mx6qp: gpu hang with repeat insmod/rmmod galcore
authorYuchou Gan <yuchou.gan@nxp.com>
Fri, 17 Mar 2017 16:11:22 +0000 (00:11 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:34 +0000 (15:21 -0500)
i.mx6qp has hardware problem with fabric design for gpu reset,
add the workaround in gpu driver to avoid gpu hang on i.mx6qp.

updated gpu chip model and revision from original 5.x patch.

Date: Mar 17, 2017
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c

index 3113a7b..bb67266 100644 (file)
@@ -1594,13 +1594,17 @@ gckHARDWARE_Construct(
             ? 0x0100
             : 0x0000;
 
-    /* _ResetGPU need powerBaseAddress. */
-    status = _ResetGPU(hardware, Os, Core);
-
-    if (status != gcvSTATUS_OK)
+    /* VIV: Don't do sftware reset here for 0x2000, 0xfff5450 to workaround #12789. */
+    if(!(_IsHardwareMatch(hardware, gcv2000, 0xffff5450)))
     {
-        gcmkTRACE_ZONE(gcvLEVEL_INFO, gcvZONE_HARDWARE,
-            "_ResetGPU failed: status=%d\n", status);
+        /* _ResetGPU need powerBaseAddress. */
+        status = _ResetGPU(hardware, Os, Core);
+
+        if (status != gcvSTATUS_OK)
+        {
+            gcmkTRACE_ZONE(gcvLEVEL_INFO, gcvZONE_HARDWARE,
+                "_ResetGPU failed: status=%d\n", status);
+        }
     }
 
 #if gcdDEC_ENABLE_AHB