diff options
| author | Daniel Vetter <[email protected]> | 2021-08-05 10:46:48 +0000 |
|---|---|---|
| committer | Daniel Vetter <[email protected]> | 2021-08-30 08:53:48 +0000 |
| commit | b0a5303d4e140ed8e534e44b278ca5d07401851d (patch) | |
| tree | 8e1c6590909bcaf227490fa2b948cf4385af1e74 /drivers/gpu/drm/lima/lima_gem.c | |
| parent | drm/msm: Improve drm/sched point of no return rules (diff) | |
| download | kernel-b0a5303d4e140ed8e534e44b278ca5d07401851d.tar.gz kernel-b0a5303d4e140ed8e534e44b278ca5d07401851d.zip | |
drm/sched: Barriers are needed for entity->last_scheduled
It might be good enough on x86 with just READ_ONCE, but the write side
should then at least be WRITE_ONCE because x86 has total store order.
It's definitely not enough on arm.
Fix this proplery, which means
- explain the need for the barrier in both places
- point at the other side in each comment
Also pull out the !sched_list case as the first check, so that the
code flow is clearer.
While at it sprinkle some comments around because it was very
non-obvious to me what's actually going on here and why.
Note that we really need full barriers here, at first I thought
store-release and load-acquire on ->last_scheduled would be enough,
but we actually requiring ordering between that and the queue state.
v2: Put smp_rmp() in the right place and fix up comment (Andrey)
Reviewed-by: Christian König <[email protected]>
Acked-by: Melissa Wen <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Steven Price <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Andrey Grodzovsky <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/lima/lima_gem.c')
0 files changed, 0 insertions, 0 deletions
