MGS-2717-2 [#ccc] Error message printed on board that didn't support gpu govern when...
authorYuchou Gan <yuchou.gan@nxp.com>
Mon, 16 Oct 2017 17:29:36 +0000 (01:29 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:53 +0000 (15:38 -0500)
When rmmod galcore.ko on boards that didn't support gpu govern,
some error message will be printed on console, do something to prevent this.

Date: Oct 16, 2017
Signed-off-by: Yuchou Ganyuchou.gan@nxp.com
Reviewed-by: Xianzhong xianzhong.li@nxp.com
Reviewed-by: Prabhu Sundararaj prabhu.sundararaj@nxp.com
drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c

index c728045..9379c16 100644 (file)
@@ -595,7 +595,7 @@ int remove_gpu_opp_table(void)
     struct imx_priv *priv = &imxPriv;
     struct device* dev = priv->imx_gpu_govern.dev;
     int govern = 0;
-    while(govern != GOVERN_COUNT)
+    while(govern != priv->imx_gpu_govern.num_modes)
     {
         unsigned long core_freq;
         core_freq = priv->imx_gpu_govern.core_clk_freq[govern];