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

Commit 75992833 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt Committed by Indira Biruduraju
Browse files

msm: kgsl: Correctly handle gmu fault interrupts



Send NMI to gmu so that we don't lose critical gmu state.
We do not want to trigger dispatcher because we don't know
whether the gpu was active or not. The best course of action
is to wait for the next kgsl -> GMU interaction to timeout
thus triggering GMU snapshot and appropriate recovery steps
based on whether gpu was active or not.

Change-Id: I17b4245f4e0113bfc902d7dae46bb24d0bc2b65d
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 7bbb6740
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -936,8 +936,6 @@ static irqreturn_t gmu_irq_handler(int irq, void *data)

		dev_err_ratelimited(&gmu->pdev->dev,
				"GMU watchdog expired interrupt received\n");
		adreno_set_gpu_fault(adreno_dev, ADRENO_GMU_FAULT);
		adreno_dispatcher_schedule(device);
	}
	if (status & GMU_INT_HOST_AHB_BUS_ERR)
		dev_err_ratelimited(&gmu->pdev->dev,
+2 −5
Original line number Diff line number Diff line
@@ -854,7 +854,6 @@ irqreturn_t hfi_irq_handler(int irq, void *data)
	struct kgsl_device *device = data;
	struct gmu_device *gmu = KGSL_GMU_DEVICE(device);
	struct kgsl_hfi *hfi = &gmu->hfi;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	unsigned int status = 0;

	adreno_read_gmureg(ADRENO_DEVICE(device),
@@ -864,12 +863,10 @@ irqreturn_t hfi_irq_handler(int irq, void *data)

	if (status & HFI_IRQ_DBGQ_MASK)
		tasklet_hi_schedule(&hfi->tasklet);
	if (status & HFI_IRQ_CM3_FAULT_MASK) {
	if (status & HFI_IRQ_CM3_FAULT_MASK)
		dev_err_ratelimited(&gmu->pdev->dev,
				"GMU CM3 fault interrupt received\n");
		adreno_set_gpu_fault(adreno_dev, ADRENO_GMU_FAULT);
		adreno_dispatcher_schedule(device);
	}

	if (status & ~HFI_IRQ_MASK)
		dev_err_ratelimited(&gmu->pdev->dev,
				"Unhandled HFI interrupts 0x%lx\n",