Loading drivers/gpu/msm/adreno.c +1 −1 Original line number Diff line number Diff line Loading @@ -2941,7 +2941,7 @@ static int adreno_drain(struct kgsl_device *device) } /* Caller must hold the device mutex. */ static int adreno_suspend_context(struct kgsl_device *device) int adreno_suspend_context(struct kgsl_device *device) { /* process any profiling results that are available */ adreno_profile_process_results(ADRENO_DEVICE(device)); Loading drivers/gpu/msm/adreno.h +11 −0 Original line number Diff line number Diff line Loading @@ -1910,4 +1910,15 @@ void adreno_clear_dcvs_counters(struct adreno_device *adreno_dev); * Set the gmu fault and take snapshot when we hit a gmu fault */ void gmu_fault_snapshot(struct kgsl_device *device); /** * adreno_suspend_context - Make sure device is idle * @device: Pointer to the kgsl device * * This function processes the profiling results and checks if the * device is idle so that it can be turned off safely * * Return: 0 on success or negative error on failure */ int adreno_suspend_context(struct kgsl_device *device); #endif /*__ADRENO_H */ drivers/gpu/msm/adreno_a6xx_gmu.c +5 −1 Original line number Diff line number Diff line Loading @@ -3048,6 +3048,8 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) trace_kgsl_pwr_request_state(device, KGSL_STATE_SLUMBER); adreno_suspend_context(device); ret = a6xx_gmu_oob_set(device, oob_gpu); if (ret) { a6xx_gmu_oob_clear(device, oob_gpu); Loading @@ -3069,10 +3071,12 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) if (adreno_is_a630(adreno_dev)) a630_vbif_halt(adreno_dev); adreno_irqctrl(adreno_dev, 0); a6xx_gmu_oob_clear(device, oob_gpu); no_gx_power: a6xx_disable_gpu_irq(adreno_dev); kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF); a6xx_gmu_power_off(adreno_dev); Loading drivers/gpu/msm/adreno_a6xx_rgmu.c +5 −1 Original line number Diff line number Diff line Loading @@ -1042,6 +1042,8 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) trace_kgsl_pwr_request_state(device, KGSL_STATE_SLUMBER); adreno_suspend_context(device); ret = a6xx_rgmu_oob_set(device, oob_gpu); if (ret) { a6xx_rgmu_oob_clear(device, oob_gpu); Loading @@ -1056,6 +1058,8 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) /* Save physical performance counter values before GPU power down*/ adreno_perfcounter_save(adreno_dev); adreno_irqctrl(adreno_dev, 0); a6xx_rgmu_prepare_stop(device); a6xx_rgmu_oob_clear(device, oob_gpu); Loading @@ -1067,7 +1071,7 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) adreno_wait_for_halt_ack(device, ADRENO_REG_GBIF_HALT_ACK, A6XX_GBIF_CLIENT_HALT_MASK); a6xx_disable_gpu_irq(adreno_dev); kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF); a6xx_rgmu_power_off(adreno_dev); Loading Loading
drivers/gpu/msm/adreno.c +1 −1 Original line number Diff line number Diff line Loading @@ -2941,7 +2941,7 @@ static int adreno_drain(struct kgsl_device *device) } /* Caller must hold the device mutex. */ static int adreno_suspend_context(struct kgsl_device *device) int adreno_suspend_context(struct kgsl_device *device) { /* process any profiling results that are available */ adreno_profile_process_results(ADRENO_DEVICE(device)); Loading
drivers/gpu/msm/adreno.h +11 −0 Original line number Diff line number Diff line Loading @@ -1910,4 +1910,15 @@ void adreno_clear_dcvs_counters(struct adreno_device *adreno_dev); * Set the gmu fault and take snapshot when we hit a gmu fault */ void gmu_fault_snapshot(struct kgsl_device *device); /** * adreno_suspend_context - Make sure device is idle * @device: Pointer to the kgsl device * * This function processes the profiling results and checks if the * device is idle so that it can be turned off safely * * Return: 0 on success or negative error on failure */ int adreno_suspend_context(struct kgsl_device *device); #endif /*__ADRENO_H */
drivers/gpu/msm/adreno_a6xx_gmu.c +5 −1 Original line number Diff line number Diff line Loading @@ -3048,6 +3048,8 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) trace_kgsl_pwr_request_state(device, KGSL_STATE_SLUMBER); adreno_suspend_context(device); ret = a6xx_gmu_oob_set(device, oob_gpu); if (ret) { a6xx_gmu_oob_clear(device, oob_gpu); Loading @@ -3069,10 +3071,12 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) if (adreno_is_a630(adreno_dev)) a630_vbif_halt(adreno_dev); adreno_irqctrl(adreno_dev, 0); a6xx_gmu_oob_clear(device, oob_gpu); no_gx_power: a6xx_disable_gpu_irq(adreno_dev); kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF); a6xx_gmu_power_off(adreno_dev); Loading
drivers/gpu/msm/adreno_a6xx_rgmu.c +5 −1 Original line number Diff line number Diff line Loading @@ -1042,6 +1042,8 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) trace_kgsl_pwr_request_state(device, KGSL_STATE_SLUMBER); adreno_suspend_context(device); ret = a6xx_rgmu_oob_set(device, oob_gpu); if (ret) { a6xx_rgmu_oob_clear(device, oob_gpu); Loading @@ -1056,6 +1058,8 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) /* Save physical performance counter values before GPU power down*/ adreno_perfcounter_save(adreno_dev); adreno_irqctrl(adreno_dev, 0); a6xx_rgmu_prepare_stop(device); a6xx_rgmu_oob_clear(device, oob_gpu); Loading @@ -1067,7 +1071,7 @@ static int a6xx_power_off(struct adreno_device *adreno_dev) adreno_wait_for_halt_ack(device, ADRENO_REG_GBIF_HALT_ACK, A6XX_GBIF_CLIENT_HALT_MASK); a6xx_disable_gpu_irq(adreno_dev); kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF); a6xx_rgmu_power_off(adreno_dev); Loading