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

Commit 2cbd0f08 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Don't deassert GBIF halt before GPU gdsc goes off"

parents 4a9aa977 1cfb7c3f
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -1941,6 +1941,17 @@ static int _adreno_start(struct adreno_device *adreno_dev)
	if (regulator_left_on)
		_soft_reset(adreno_dev);

	/*
	 * During adreno_stop, GBIF halt is asserted to ensure
	 * no further transaction can go through GPU before GPU
	 * headswitch is turned off.
	 *
	 * This halt is deasserted once headswitch goes off but
	 * incase headswitch doesn't goes off clear GBIF halt
	 * here to ensure GPU wake-up doesn't fail because of
	 * halted GPU transactions.
	 */
	adreno_deassert_gbif_halt(adreno_dev);

	if (adreno_is_a640v1(adreno_dev)) {
		ret = adreno_program_smmu_aperture(device);
@@ -2299,7 +2310,14 @@ static int adreno_stop(struct kgsl_device *device)

	adreno_clear_pending_transactions(device);

	/* The halt is not cleared in the above function if we have GBIF */
	/*
	 * The halt is not cleared in the above function if we have GBIF.
	 * Clear it here if GMU is enabled as GMU stop needs access to
	 * system memory to stop. For non-GMU targets, we don't need to
	 * clear it as it will get cleared automatically once headswitch
	 * goes OFF immediately after adreno_stop.
	 */
	if (gmu_core_gpmu_isenabled(device))
		adreno_deassert_gbif_halt(adreno_dev);

	kgsl_mmu_stop(&device->mmu);