Commit 82abf337 authored by Eric Anholt's avatar Eric Anholt Committed by Alex Deucher

drm/sched: Always trace the dependencies we wait on, to fix a race.

The entity->dependency can go away completely once we've called
drm_sched_entity_add_dependency_cb() (if the cb is called before we
get around to tracing).  The tracepoint is more useful if we trace
every dependency instead of just ones that get callbacks installed,
anyway, so just do that.

Fixes any easy-to-produce OOPS when tracing the scheduler on V3D with
"perf record -a -e gpu_scheduler:.\* glxgears" and DEBUG_SLAB enabled.
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 78eb1ca4
...@@ -440,13 +440,10 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity) ...@@ -440,13 +440,10 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity)
while ((entity->dependency = while ((entity->dependency =
sched->ops->dependency(sched_job, entity))) { sched->ops->dependency(sched_job, entity))) {
trace_drm_sched_job_wait_dep(sched_job, entity->dependency);
if (drm_sched_entity_add_dependency_cb(entity)) { if (drm_sched_entity_add_dependency_cb(entity))
trace_drm_sched_job_wait_dep(sched_job,
entity->dependency);
return NULL; return NULL;
}
} }
/* skip jobs from entity that marked guilty */ /* skip jobs from entity that marked guilty */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment