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

Commit 43518b89 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Add an helper function to clear the GPU fault after reset"

parents 4d857048 bf70c093
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1720,7 +1720,7 @@ static int adreno_start(struct kgsl_device *device)
				regulator_is_enabled(device->pwrctrl.gpu_cx)));

	/* Clear any GPU faults that might have been left over */
	adreno_set_gpu_fault(adreno_dev, 0);
	adreno_clear_gpu_fault(adreno_dev);

	/* Power up the device */
	kgsl_pwrctrl_enable(device);
@@ -2333,7 +2333,7 @@ int adreno_soft_reset(struct kgsl_device *device)

	kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);

	adreno_set_gpu_fault(adreno_dev, 0);
	adreno_clear_gpu_fault(adreno_dev);

	/* Delete the idle timer */
	del_timer_sync(&device->idle_timer);
+13 −0
Original line number Diff line number Diff line
@@ -854,6 +854,19 @@ static inline void adreno_set_gpu_fault(struct adreno_device *adreno_dev,
	smp_wmb();
}

/**
 * adreno_clear_gpu_fault() - Clear the GPU fault register
 * @adreno_dev: A pointer to an adreno_device structure
 *
 * Clear the GPU fault status for the adreno device
 */

static inline void adreno_clear_gpu_fault(struct adreno_device *adreno_dev)
{
	atomic_set(&adreno_dev->dispatcher.fault, 0);
	smp_wmb();
}

/*
 * adreno_vbif_start() - Program VBIF registers, called in device start
 * @device: Pointer to device whose vbif data is to be programmed