Loading drivers/gpu/msm/adreno_dispatch.c +2 −9 Original line number Original line Diff line number Diff line Loading @@ -1419,7 +1419,6 @@ static void adreno_dispatcher_work(struct work_struct *work) mutex_lock(&dispatcher->mutex); mutex_lock(&dispatcher->mutex); while (dispatcher->head != dispatcher->tail) { while (dispatcher->head != dispatcher->tail) { uint32_t consumed, retired = 0; struct kgsl_cmdbatch *cmdbatch = struct kgsl_cmdbatch *cmdbatch = dispatcher->cmdqueue[dispatcher->head]; dispatcher->cmdqueue[dispatcher->head]; struct adreno_context *drawctxt; struct adreno_context *drawctxt; Loading @@ -1435,10 +1434,8 @@ static void adreno_dispatcher_work(struct work_struct *work) * pointers and continue processing the queue * pointers and continue processing the queue */ */ kgsl_readtimestamp(device, cmdbatch->context, if (kgsl_check_timestamp(device, cmdbatch->context, KGSL_TIMESTAMP_RETIRED, &retired); cmdbatch->timestamp)) { if ((timestamp_cmp(cmdbatch->timestamp, retired) <= 0)) { /* /* * If the cmdbatch in question had faulted announce its * If the cmdbatch in question had faulted announce its Loading Loading @@ -1493,10 +1490,6 @@ static void adreno_dispatcher_work(struct work_struct *work) goto done; goto done; fault_handled = 1; fault_handled = 1; /* Get the last consumed timestamp */ kgsl_readtimestamp(device, cmdbatch->context, KGSL_TIMESTAMP_CONSUMED, &consumed); /* /* * Break here if fault detection is disabled for the context or * Break here if fault detection is disabled for the context or * if the long running IB detection is disaled device wide * if the long running IB detection is disaled device wide Loading drivers/gpu/msm/kgsl.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -595,6 +595,12 @@ static struct kgsl_device *kgsl_get_minor(int minor) return ret; return ret; } } /** * kgsl_check_timestamp() - return true if the specified timestamp is retired * @device: Pointer to the KGSL device to check * @context: Pointer to the context for the timestamp * @timestamp: The timestamp to compare */ int kgsl_check_timestamp(struct kgsl_device *device, int kgsl_check_timestamp(struct kgsl_device *device, struct kgsl_context *context, unsigned int timestamp) struct kgsl_context *context, unsigned int timestamp) { { Loading drivers/gpu/msm/kgsl_events.c +2 −4 Original line number Original line Diff line number Diff line Loading @@ -171,7 +171,7 @@ EXPORT_SYMBOL(kgsl_cancel_event); int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group, int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group, unsigned int timestamp, kgsl_event_func func, void *priv) unsigned int timestamp, kgsl_event_func func, void *priv) { { unsigned int queued, retired; unsigned int queued; struct kgsl_context *context = group->context; struct kgsl_context *context = group->context; struct kgsl_event *event; struct kgsl_event *event; Loading Loading @@ -214,9 +214,7 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group, * Check to see if the requested timestamp has already retired. If so, * Check to see if the requested timestamp has already retired. If so, * schedule the callback right away * schedule the callback right away */ */ kgsl_readtimestamp(device, context, KGSL_TIMESTAMP_RETIRED, &retired); if (kgsl_check_timestamp(device, context, timestamp)) { if (timestamp_cmp(retired, timestamp) >= 0) { event->result = KGSL_EVENT_RETIRED; event->result = KGSL_EVENT_RETIRED; queue_work(device->events_wq, &event->work); queue_work(device->events_wq, &event->work); spin_unlock(&group->lock); spin_unlock(&group->lock); Loading Loading
drivers/gpu/msm/adreno_dispatch.c +2 −9 Original line number Original line Diff line number Diff line Loading @@ -1419,7 +1419,6 @@ static void adreno_dispatcher_work(struct work_struct *work) mutex_lock(&dispatcher->mutex); mutex_lock(&dispatcher->mutex); while (dispatcher->head != dispatcher->tail) { while (dispatcher->head != dispatcher->tail) { uint32_t consumed, retired = 0; struct kgsl_cmdbatch *cmdbatch = struct kgsl_cmdbatch *cmdbatch = dispatcher->cmdqueue[dispatcher->head]; dispatcher->cmdqueue[dispatcher->head]; struct adreno_context *drawctxt; struct adreno_context *drawctxt; Loading @@ -1435,10 +1434,8 @@ static void adreno_dispatcher_work(struct work_struct *work) * pointers and continue processing the queue * pointers and continue processing the queue */ */ kgsl_readtimestamp(device, cmdbatch->context, if (kgsl_check_timestamp(device, cmdbatch->context, KGSL_TIMESTAMP_RETIRED, &retired); cmdbatch->timestamp)) { if ((timestamp_cmp(cmdbatch->timestamp, retired) <= 0)) { /* /* * If the cmdbatch in question had faulted announce its * If the cmdbatch in question had faulted announce its Loading Loading @@ -1493,10 +1490,6 @@ static void adreno_dispatcher_work(struct work_struct *work) goto done; goto done; fault_handled = 1; fault_handled = 1; /* Get the last consumed timestamp */ kgsl_readtimestamp(device, cmdbatch->context, KGSL_TIMESTAMP_CONSUMED, &consumed); /* /* * Break here if fault detection is disabled for the context or * Break here if fault detection is disabled for the context or * if the long running IB detection is disaled device wide * if the long running IB detection is disaled device wide Loading
drivers/gpu/msm/kgsl.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -595,6 +595,12 @@ static struct kgsl_device *kgsl_get_minor(int minor) return ret; return ret; } } /** * kgsl_check_timestamp() - return true if the specified timestamp is retired * @device: Pointer to the KGSL device to check * @context: Pointer to the context for the timestamp * @timestamp: The timestamp to compare */ int kgsl_check_timestamp(struct kgsl_device *device, int kgsl_check_timestamp(struct kgsl_device *device, struct kgsl_context *context, unsigned int timestamp) struct kgsl_context *context, unsigned int timestamp) { { Loading
drivers/gpu/msm/kgsl_events.c +2 −4 Original line number Original line Diff line number Diff line Loading @@ -171,7 +171,7 @@ EXPORT_SYMBOL(kgsl_cancel_event); int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group, int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group, unsigned int timestamp, kgsl_event_func func, void *priv) unsigned int timestamp, kgsl_event_func func, void *priv) { { unsigned int queued, retired; unsigned int queued; struct kgsl_context *context = group->context; struct kgsl_context *context = group->context; struct kgsl_event *event; struct kgsl_event *event; Loading Loading @@ -214,9 +214,7 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group, * Check to see if the requested timestamp has already retired. If so, * Check to see if the requested timestamp has already retired. If so, * schedule the callback right away * schedule the callback right away */ */ kgsl_readtimestamp(device, context, KGSL_TIMESTAMP_RETIRED, &retired); if (kgsl_check_timestamp(device, context, timestamp)) { if (timestamp_cmp(retired, timestamp) >= 0) { event->result = KGSL_EVENT_RETIRED; event->result = KGSL_EVENT_RETIRED; queue_work(device->events_wq, &event->work); queue_work(device->events_wq, &event->work); spin_unlock(&group->lock); spin_unlock(&group->lock); Loading