mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: kgsl: Do not delete command batch unless it's retired
Do not remove command batch from the dispatcher list if it's timestamp has not retired. Even if the context to which the command belongs has been detached. If the command is in the dispatcher queue it means it's in the ringbuffer and we should wait for it to complete the normal way. Also make sure that we use the correct retired timestamp even if the context was detached because of a userpace context destroy call. Change-Id: If3a9a562180b924492ed95f208b5e3d469abdfba Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org> Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
This commit is contained in:
parent
8d35ba0680
commit
5db8ce8772
2 changed files with 2 additions and 12 deletions
|
@ -2543,14 +2543,6 @@ static unsigned int adreno_readtimestamp(struct kgsl_device *device,
|
|||
unsigned int timestamp = 0;
|
||||
unsigned int id = context ? context->id : KGSL_MEMSTORE_GLOBAL;
|
||||
|
||||
/*
|
||||
* If the context is detached we are in a race with
|
||||
* the context being destroyed by userspace so bail.
|
||||
*/
|
||||
if (context && kgsl_context_detached(context)) {
|
||||
KGSL_DRV_WARN(device, "context was detached");
|
||||
return timestamp;
|
||||
}
|
||||
switch (type) {
|
||||
case KGSL_TIMESTAMP_QUEUED: {
|
||||
struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
|
||||
|
|
|
@ -1195,12 +1195,10 @@ static void adreno_dispatcher_work(struct work_struct *work)
|
|||
* pointers and continue processing the queue
|
||||
*/
|
||||
|
||||
if (!kgsl_context_detached(cmdbatch->context))
|
||||
retired = kgsl_readtimestamp(device, cmdbatch->context,
|
||||
retired = kgsl_readtimestamp(device, cmdbatch->context,
|
||||
KGSL_TIMESTAMP_RETIRED);
|
||||
|
||||
if (kgsl_context_detached(cmdbatch->context) ||
|
||||
(timestamp_cmp(cmdbatch->timestamp, retired) <= 0)) {
|
||||
if ((timestamp_cmp(cmdbatch->timestamp, retired) <= 0)) {
|
||||
|
||||
/*
|
||||
* If the cmdbatch in question had faulted announce its
|
||||
|
|
Loading…
Reference in a new issue