PD #92881: add clock on/off in runtime pm, avoid pmu access while clock is off
authorKasin Lee <kasin.li@amlogic.com>
Fri, 13 Jun 2014 08:23:13 +0000 (16:23 +0800)
committerKasin Lee <kasin.li@amlogic.com>
Fri, 13 Jun 2014 08:23:13 +0000 (16:23 +0800)
mali/platform/mpgpu.c

index 8497b3ce4812ed31f62b9e44c9a7d7daf420bf79..449ed33303b15e1e0bb46b7fc047a5ac5b175478 100755 (executable)
@@ -32,7 +32,10 @@ static ssize_t domain_stat_read(struct class *class,
 {
        unsigned int val;
 #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
-       val = mali_pmu_get_status();
+       if (mali_pm_statue == 1) {
+               val = mali_pmu_get_status();
+       } else
+               val = 0x7;
 #else
        val = 0;
 #endif