mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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: Harshdeep Dhatt <[email protected]>
This commit is contained in:
parent
55d1e41a78
commit
dbfff92937
4 changed files with 18 additions and 9 deletions
|
|
@ -2821,25 +2821,21 @@ error:
|
|||
void a6xx_enable_gpu_irq(struct adreno_device *adreno_dev)
|
||||
{
|
||||
struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
|
||||
kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_ON);
|
||||
|
||||
adreno_irqctrl(adreno_dev, 1);
|
||||
enable_irq(pwr->interrupt_num);
|
||||
|
||||
trace_kgsl_irq(device, 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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
kgsl_pwrctrl_change_state(device, KGSL_STATE_AWARE);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue