diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c index 67dba70167d7a5f7af0d8e634c265d83b4222d96..3bcc7a3bb8f7911491da0195b4e53d1b1558bc23 100644 --- a/drivers/gpu/msm/adreno_dispatch.c +++ b/drivers/gpu/msm/adreno_dispatch.c @@ -1332,12 +1332,14 @@ static void adreno_dispatcher_work(struct work_struct *work) * into suspend even if there are queued command batches */ + mutex_lock(&device->mutex); if (count && dispatcher->inflight == 0) { - mutex_lock(&device->mutex); del_timer_sync(&dispatcher->fault_timer); kgsl_active_count_put(device); - mutex_unlock(&device->mutex); + /* Queue back up the event processor to catch stragglers */ + queue_work(device->work_queue, &device->ts_expired_ws); } + mutex_unlock(&device->mutex); /* Dispatch new commands if we have the room */ if (dispatcher->inflight < _dispatcher_inflight) diff --git a/drivers/gpu/msm/kgsl_events.c b/drivers/gpu/msm/kgsl_events.c index ad122adf8fe039f1f4a562bc0fc568c3dce1a573..277eae0127c25192324e760e6371c85b7c206376 100644 --- a/drivers/gpu/msm/kgsl_events.c +++ b/drivers/gpu/msm/kgsl_events.c @@ -383,19 +383,9 @@ void kgsl_process_events(struct work_struct *work) struct kgsl_context *context, *tmp; uint32_t timestamp; - /* - * Bail unless the global timestamp has advanced. We can safely do this - * outside of the mutex for speed - */ - - timestamp = kgsl_readtimestamp(device, NULL, KGSL_TIMESTAMP_RETIRED); - if (timestamp == device->events_last_timestamp) - return; - mutex_lock(&device->mutex); - device->events_last_timestamp = timestamp; - + timestamp = kgsl_readtimestamp(device, NULL, KGSL_TIMESTAMP_RETIRED); _retire_events(device, &device->events, timestamp); /* Now process all of the pending contexts */