MGS-2133-4 [#imx-199] fix gpu hang with power management
authorXianzhong <xianzhong.li@nxp.com>
Mon, 6 Feb 2017 06:42:35 +0000 (14:42 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:58:26 +0000 (14:58 -0500)
power management is only disabled for GPU0, but NOT disabled for GPU1,
need apply this patch to configure power management for all GPU cores.

also configure fast clear and gpu profiler for all GPU cores.

Date: Feb 06, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c

index b3a61e6..d50bdbb 100644 (file)
@@ -1407,6 +1407,19 @@ gckGALDEVICE_Construct(
         if (Args->irqs[i] != -1)
         {
             gckDEVICE_AddCore(device->device, i, Args->chipIDs[i], device, &device->kernels[i]);
+
+            gcmkONERROR(
+            gckHARDWARE_SetFastClear(device->kernels[i]->hardware,
+                FastClear,
+                Compression));
+
+            gcmkONERROR(gckHARDWARE_SetPowerManagement(
+                device->kernels[i]->hardware, PowerManagement
+                ));
+
+            gcmkONERROR(gckHARDWARE_SetGpuProfiler(
+                device->kernels[i]->hardware, GpuProfiler
+                ));
         }
     }