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

Commit a2a12986 authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Force OOB on during Adreno start



Make sure power is on when starting the GPU. When the device
is started and initialized, clear the OOB to allow IFPC.

Change-Id: I34716cf2b9c9b185ac56b8e5a47eb24c366507e5
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 3bd4eee5
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -1481,6 +1481,15 @@ static int _adreno_start(struct adreno_device *adreno_dev)
		goto error_mmu_off;
	}

	/* Send OOB request to turn on the GX */
	if (gpudev->oob_set) {
		status = gpudev->oob_set(adreno_dev, OOB_GPUSTART_SET_MASK,
				OOB_GPUSTART_CHECK_MASK,
				OOB_GPUSTART_CLEAR_MASK);
		if (status)
			goto error_mmu_off;
	}

	/* Enable 64 bit gpu addr if feature is set */
	if (gpudev->enable_64bit &&
			adreno_support_64bit(adreno_dev))
@@ -1562,7 +1571,7 @@ static int _adreno_start(struct adreno_device *adreno_dev)

	status = adreno_ringbuffer_start(adreno_dev, ADRENO_START_COLD);
	if (status)
		goto error_mmu_off;
		goto error_oob_clear;

	/* Start the dispatcher */
	adreno_dispatcher_start(device);
@@ -1575,8 +1584,16 @@ static int _adreno_start(struct adreno_device *adreno_dev)
		pm_qos_update_request(&device->pwrctrl.pm_qos_req_dma,
				pmqos_active_vote);

	/* Send OOB request to allow IFPC */
	if (gpudev->oob_clear)
		gpudev->oob_clear(adreno_dev, OOB_GPUSTART_CLEAR_MASK);

	return 0;

error_oob_clear:
	if (gpudev->oob_clear)
		gpudev->oob_clear(adreno_dev, OOB_GPUSTART_CLEAR_MASK);

error_mmu_off:
	kgsl_mmu_stop(&device->mmu);

+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@
#define OOB_PERFCNTR_SET_MASK		BIT(17)
#define OOB_PERFCNTR_CHECK_MASK		BIT(25)
#define OOB_PERFCNTR_CLEAR_MASK		BIT(25)
#define OOB_GPUSTART_SET_MASK		BIT(18)
#define OOB_GPUSTART_CHECK_MASK		BIT(26)
#define OOB_GPUSTART_CLEAR_MASK		BIT(26)

/* Bits for the flags field in the gmu structure */
enum gmu_flags {