msm: kgsl: Add suspend_context to gmu based targets

This needs to be explicitly added to the new slumber entry sequence
for gmu and rgmu based targets.

Change-Id: I582067d065b1c58cab3d1d149292dd94e182bd66
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
Harshdeep Dhatt 2020-08-08 14:43:24 -06:00
commit 65172415d1
4 changed files with 16 additions and 1 deletions

View file

@ -2927,7 +2927,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));

View file

@ -1912,4 +1912,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 */

View file

@ -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);

View file

@ -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);