msm: kgsl: Poke regularly in adreno_idle
Poking once during adreno_idle is not enough; a GPU hang may still happen. Seen on 7x27A. Write a few times during the wait timeout, to ensure that the WPTR is updated properly.
This commit is contained in:
parent
aa5de9cfcb
commit
69555a62d1
@ -847,7 +847,11 @@ int adreno_idle(struct kgsl_device *device, unsigned int timeout)
|
||||
unsigned int rbbm_status;
|
||||
unsigned long wait_timeout =
|
||||
msecs_to_jiffies(adreno_dev->wait_timeout);
|
||||
unsigned long wait_time = jiffies + wait_timeout;
|
||||
unsigned long wait_time;
|
||||
unsigned long wait_time_part;
|
||||
unsigned int msecs;
|
||||
unsigned int msecs_first;
|
||||
unsigned int msecs_part;
|
||||
|
||||
kgsl_cffdump_regpoll(device->id, REG_RBBM_STATUS << 2,
|
||||
0x00000000, 0x80000000);
|
||||
@ -856,8 +860,18 @@ int adreno_idle(struct kgsl_device *device, unsigned int timeout)
|
||||
*/
|
||||
retry:
|
||||
if (rb->flags & KGSL_FLAGS_STARTED) {
|
||||
msecs = adreno_dev->wait_timeout;
|
||||
msecs_first = (msecs <= 100) ? ((msecs + 4) / 5) : 100;
|
||||
msecs_part = (msecs - msecs_first + 3) / 4;
|
||||
wait_time = jiffies + wait_timeout;
|
||||
wait_time_part = jiffies + msecs_to_jiffies(msecs_first);
|
||||
adreno_poke(device);
|
||||
do {
|
||||
adreno_poke(device);
|
||||
if (time_after(jiffies, wait_time_part)) {
|
||||
adreno_poke(device);
|
||||
wait_time_part = jiffies +
|
||||
msecs_to_jiffies(msecs_part);
|
||||
}
|
||||
GSL_RB_GET_READPTR(rb, &rb->rptr);
|
||||
if (time_after(jiffies, wait_time)) {
|
||||
KGSL_DRV_ERR(device, "rptr: %x, wptr: %x\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user