mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
msm: kgsl: Fix gdsc disable timeout during reset
Smmu driver takes a vote on CX gdsc before calling the kgsl pagefault handler. If there is contention for device mutex in this path and the dispatcher fault handler is holding this lock, trying to turn off CX gdsc will fail during the reset. So to avoid blocking here, try to lock device mutex and return if it fails. Change-Id: Idf1726960071d66b9112f6b4abdf19a49afacefd Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org> Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
This commit is contained in:
parent
0cfe100396
commit
d14dbe6866
1 changed files with 9 additions and 1 deletions
|
|
@ -1272,7 +1272,15 @@ static const char *a6xx_fault_block_uche(struct kgsl_device *device,
|
|||
unsigned int uche_client_id = 0;
|
||||
static char str[40];
|
||||
|
||||
mutex_lock(&device->mutex);
|
||||
/*
|
||||
* Smmu driver takes a vote on CX gdsc before calling the kgsl
|
||||
* pagefault handler. If there is contention for device mutex in this
|
||||
* path and the dispatcher fault handler is holding this lock, trying
|
||||
* to turn off CX gdsc will fail during the reset. So to avoid blocking
|
||||
* here, try to lock device mutex and return if it fails.
|
||||
*/
|
||||
if (!mutex_trylock(&device->mutex))
|
||||
return "UCHE: unknown";
|
||||
|
||||
if (!kgsl_state_is_awake(device)) {
|
||||
mutex_unlock(&device->mutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue