diff options
author | Dmitry Osipenko <[email protected]> | 2022-11-23 03:13:03 +0300 |
---|---|---|
committer | Dmitry Osipenko <[email protected]> | 2023-01-03 14:49:59 +0300 |
commit | 69555549cfa42e10f2fdd2699ed4e34d9d4f392b (patch) | |
tree | 78ff141b0cf4f63f99b210054139a90f8bd8124f /tools/perf/scripts/python/Perf-Trace-Util/lib | |
parent | 2c55d703391acf7e9101da596d0c15ee03b318a3 (diff) |
drm/scheduler: Fix lockup in drm_sched_entity_kill()
The drm_sched_entity_kill() is invoked twice by drm_sched_entity_destroy()
while userspace process is exiting or being killed. First time it's invoked
when sched entity is flushed and second time when entity is released. This
causes a lockup within wait_for_completion(entity_idle) due to how completion
API works.
Calling wait_for_completion() more times than complete() was invoked is a
error condition that causes lockup because completion internally uses
counter for complete/wait calls. The complete_all() must be used instead
in such cases.
This patch fixes lockup of Panfrost driver that is reproducible by killing
any application in a middle of 3d drawing operation.
Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini")
Signed-off-by: Dmitry Osipenko <[email protected]>
Reviewed-by: Christian König <[email protected]>
Tested-by: Guilherme G. Piccoli <[email protected]> # Steam Deck
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions