]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/vmwgfx: Use blocking buffer object reserves when evicting resources
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 19 Jun 2018 17:22:16 +0000 (19:22 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 3 Jul 2018 18:34:20 +0000 (20:34 +0200)
commit19f976ab01a6bb1f36384dd8cc743b88a6b7ebd6
tree410f3d08ab95b8649a891011c670d402bcb29c9c
parent098d7d532bf78ea218b46c1d6887cbb43197ab4e
drm/vmwgfx: Use blocking buffer object reserves when evicting resources

Previously when evicting resources we were unconditionally calling
ttm_eu_reserve_buffers with a NULL ww acquire context. That meant all
buffer object reserves were done using trylock semantics.
That makes sense when evicting during resource validation, because then
there already are a number of buffers reserved and using waiting locks
would cause lockdep errors.

That's not the case when unconditionally evicting all resources as part
of driver takedown or hibernation, so in that code path, make sure
we have a ww acquire context to get waiting lock buffer object reserve
semantics.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c