Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65172415 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

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: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 2b2f29cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
+11 −0
Original line number Diff line number Diff line
@@ -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 */
+2 −0
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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);