diff options
author | Thomas Zimmermann <[email protected]> | 2024-02-27 11:14:57 +0100 |
---|---|---|
committer | Thomas Zimmermann <[email protected]> | 2024-03-11 13:33:50 +0100 |
commit | b4b0193e83cb987143583e2b4011b35331f429bd (patch) | |
tree | 6db24df3102ca1a5f764fbcacc52b18d0cfba76b /tools/perf/scripts/python/sched-migration.py | |
parent | a78027847226493ea6f09a00875fa4871fd29e69 (diff) |
drm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()
Temporarily lock the fbdev buffer object during updates to prevent
memory managers from evicting/moving the buffer. Moving a buffer
object while update its content results in undefined behaviour.
Fbdev-generic updates its buffer object from a shadow buffer. Gem-shmem
and gem-dma helpers do not move buffer objects, so they are safe to be
used with fbdev-generic. Gem-vram and qxl are based on TTM, but pin
buffer objects are part of the vmap operation. So both are also safe
to be used with fbdev-generic.
Amdgpu and nouveau do not pin or lock the buffer object during an
update. Their TTM-based memory management could move the buffer object
while the update is ongoing.
The new vmap_local and vunmap_local helpers hold the buffer object's
reservation lock during the buffer update. This prevents moving the
buffer object on all memory managers.
Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Dmitry Osipenko <[email protected]>
Tested-by: Dmitry Osipenko <[email protected]> # virtio-gpu
Acked-by: Zack Rusin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions