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

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

msm: kgsl: Turn off gpu interrupts during stall-on-fault



Disable gpu interrupt inline instead of changing power states as gmu
based targets do not implement the power state machine. Make sure we
skip turning off the gpu interrupt during reset after stall on fault.

Change-Id: I49c1702005f88eab523f00b25923c9c65193c7ca
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 55d1e41a
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -2821,25 +2821,21 @@ static int a6xx_gmu_power_off(struct adreno_device *adreno_dev)
void a6xx_enable_gpu_irq(struct adreno_device *adreno_dev)
{
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;

	adreno_irqctrl(adreno_dev, 1);
	enable_irq(pwr->interrupt_num);
	kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_ON);

	trace_kgsl_irq(device, 1);
	adreno_irqctrl(adreno_dev, 1);
}

void a6xx_disable_gpu_irq(struct adreno_device *adreno_dev)
{
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;

	disable_irq(pwr->interrupt_num);
	kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);

	if (a6xx_gmu_gx_is_on(device))
		adreno_irqctrl(adreno_dev, 0);

	trace_kgsl_irq(device, 0);
}

static int a6xx_gpu_boot(struct adreno_device *adreno_dev)
+6 −1
Original line number Diff line number Diff line
@@ -649,7 +649,12 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
		 * The device mutex must be held to change power state
		 */
		mutex_lock(&device->mutex);

		if (gmu_core_isenabled(device))
			kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);
		else
			kgsl_pwrctrl_change_state(device, KGSL_STATE_AWARE);

		mutex_unlock(&device->mutex);
	}

+1 −1
Original line number Diff line number Diff line
@@ -1330,7 +1330,7 @@ static int kgsl_pwrctrl_pwrrail(struct kgsl_device *device, int state)
	return status;
}

static void kgsl_pwrctrl_irq(struct kgsl_device *device, int state)
void kgsl_pwrctrl_irq(struct kgsl_device *device, int state)
{
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;

+8 −0
Original line number Diff line number Diff line
@@ -228,4 +228,12 @@ int kgsl_pwrctrl_axi(struct kgsl_device *device, int state);
 * off state if the active_cnt is 0 and the hardware is idle.
 */
void kgsl_idle_check(struct work_struct *work);

/**
 * kgsl_pwrctrl_irq - Enable or disable gpu interrupts
 * @device: Handle to the kgsl device
 * @state: Variable to decide whether interrupts need to be enabled or disabled
 *
 */
void kgsl_pwrctrl_irq(struct kgsl_device *device, int state);
#endif /* __KGSL_PWRCTRL_H */