mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
msm: kgsl: Make sure dispatch jobs are not lost due to faults
Say a context has only one submission i.e. it has only one dispatch job. And say gpu encounters a fault and sets dispatcher fault. The dispatch job will be free'd and post recovery, the context will never get to the ringbuffer until it queues another submission. This behaviour holds true in cases where dispatcher is halted for example during suspend. So in either case, add back the job the the dispatcher jobs list to make sure the job is not lost. Change-Id: Iec0a0abfbdcf2535d7f82ec1e286581e1c93a3ea Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
parent
5168327a4f
commit
738e1770d6
1 changed files with 11 additions and 2 deletions
|
|
@ -858,8 +858,7 @@ static void dispatcher_handle_jobs_list(struct adreno_device *adreno_dev,
|
|||
llist_for_each_entry_safe(job, next, list, node) {
|
||||
int ret;
|
||||
|
||||
if (adreno_gpu_stopped(adreno_dev) ||
|
||||
adreno_drawctxt_bad(job->drawctxt)) {
|
||||
if (adreno_drawctxt_bad(job->drawctxt)) {
|
||||
kgsl_context_put(&job->drawctxt->base);
|
||||
kmem_cache_free(jobs_cache, job);
|
||||
continue;
|
||||
|
|
@ -879,6 +878,16 @@ static void dispatcher_handle_jobs_list(struct adreno_device *adreno_dev,
|
|||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* If gpu is in fault or dispatcher is halted, add back the jobs
|
||||
* so that they are processed after recovery or when dispatcher
|
||||
* is resumed.
|
||||
*/
|
||||
if (adreno_gpu_stopped(adreno_dev)) {
|
||||
llist_add(&job->node, &dispatcher->jobs[id]);
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = dispatcher_context_sendcmds(adreno_dev, job->drawctxt);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue