Loading drivers/gpu/msm/kgsl_gmu.c +1 −0 Original line number Diff line number Diff line Loading @@ -1975,4 +1975,5 @@ struct gmu_core_ops gmu_ops = { .dcvs_set = gmu_dcvs_set, .snapshot = gmu_snapshot, .regulator_isenabled = gmu_regulator_isenabled, .suspend = gmu_suspend, }; drivers/gpu/msm/kgsl_gmu_core.c +10 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,16 @@ void gmu_core_stop(struct kgsl_device *device) gmu_core_ops->stop(device); } int gmu_core_suspend(struct kgsl_device *device) { struct gmu_core_ops *gmu_core_ops = GMU_CORE_OPS(device); if (gmu_core_ops && gmu_core_ops->suspend) return gmu_core_ops->suspend(device); return -EINVAL; } void gmu_core_snapshot(struct kgsl_device *device) { struct gmu_core_ops *gmu_core_ops = GMU_CORE_OPS(device); Loading drivers/gpu/msm/kgsl_gmu_core.h +2 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ struct gmu_core_ops { int (*get_idle_level)(struct kgsl_device *device); void (*set_idle_level)(struct kgsl_device *device, unsigned int val); bool (*regulator_isenabled)(struct kgsl_device *device); int (*suspend)(struct kgsl_device *device); }; struct gmu_dev_ops { Loading Loading @@ -165,6 +166,7 @@ int gmu_core_probe(struct kgsl_device *device); void gmu_core_remove(struct kgsl_device *device); int gmu_core_start(struct kgsl_device *device); void gmu_core_stop(struct kgsl_device *device); int gmu_core_suspend(struct kgsl_device *device); void gmu_core_snapshot(struct kgsl_device *device); bool gmu_core_gpmu_isenabled(struct kgsl_device *device); bool gmu_core_isenabled(struct kgsl_device *device); Loading drivers/gpu/msm/kgsl_pwrctrl.c +18 −0 Original line number Diff line number Diff line Loading @@ -2811,6 +2811,24 @@ _aware(struct kgsl_device *device) WARN_ONCE(1, "Failed to recover GMU\n"); if (device->snapshot) device->snapshot->recovered = false; /* * On recovery failure, we are clearing * GMU_FAULT bit and also not keeping * the state as RESET to make sure any * attempt to wake GMU/GPU after this * is treated as a fresh start. But on * recovery failure, GMU HS, clocks and * IRQs are still ON/enabled because of * which next GMU/GPU wakeup results in * multiple warnings from GMU start as HS, * clocks and IRQ were ON while doing a * fresh start i.e. wake from SLUMBER. * * Suspend the GMU on recovery failure * to make sure next attempt to wake up * GMU/GPU is indeed a fresh start. */ gmu_core_suspend(device); kgsl_pwrctrl_set_state(device, state); } else { if (device->snapshot) Loading Loading
drivers/gpu/msm/kgsl_gmu.c +1 −0 Original line number Diff line number Diff line Loading @@ -1975,4 +1975,5 @@ struct gmu_core_ops gmu_ops = { .dcvs_set = gmu_dcvs_set, .snapshot = gmu_snapshot, .regulator_isenabled = gmu_regulator_isenabled, .suspend = gmu_suspend, };
drivers/gpu/msm/kgsl_gmu_core.c +10 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,16 @@ void gmu_core_stop(struct kgsl_device *device) gmu_core_ops->stop(device); } int gmu_core_suspend(struct kgsl_device *device) { struct gmu_core_ops *gmu_core_ops = GMU_CORE_OPS(device); if (gmu_core_ops && gmu_core_ops->suspend) return gmu_core_ops->suspend(device); return -EINVAL; } void gmu_core_snapshot(struct kgsl_device *device) { struct gmu_core_ops *gmu_core_ops = GMU_CORE_OPS(device); Loading
drivers/gpu/msm/kgsl_gmu_core.h +2 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ struct gmu_core_ops { int (*get_idle_level)(struct kgsl_device *device); void (*set_idle_level)(struct kgsl_device *device, unsigned int val); bool (*regulator_isenabled)(struct kgsl_device *device); int (*suspend)(struct kgsl_device *device); }; struct gmu_dev_ops { Loading Loading @@ -165,6 +166,7 @@ int gmu_core_probe(struct kgsl_device *device); void gmu_core_remove(struct kgsl_device *device); int gmu_core_start(struct kgsl_device *device); void gmu_core_stop(struct kgsl_device *device); int gmu_core_suspend(struct kgsl_device *device); void gmu_core_snapshot(struct kgsl_device *device); bool gmu_core_gpmu_isenabled(struct kgsl_device *device); bool gmu_core_isenabled(struct kgsl_device *device); Loading
drivers/gpu/msm/kgsl_pwrctrl.c +18 −0 Original line number Diff line number Diff line Loading @@ -2811,6 +2811,24 @@ _aware(struct kgsl_device *device) WARN_ONCE(1, "Failed to recover GMU\n"); if (device->snapshot) device->snapshot->recovered = false; /* * On recovery failure, we are clearing * GMU_FAULT bit and also not keeping * the state as RESET to make sure any * attempt to wake GMU/GPU after this * is treated as a fresh start. But on * recovery failure, GMU HS, clocks and * IRQs are still ON/enabled because of * which next GMU/GPU wakeup results in * multiple warnings from GMU start as HS, * clocks and IRQ were ON while doing a * fresh start i.e. wake from SLUMBER. * * Suspend the GMU on recovery failure * to make sure next attempt to wake up * GMU/GPU is indeed a fresh start. */ gmu_core_suspend(device); kgsl_pwrctrl_set_state(device, state); } else { if (device->snapshot) Loading