]> git.baikalelectronics.ru Git - 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)
commit2f0c8dcfd99b47aa68a6e9381a5fd9ba2f461296
tree410f3d08ab95b8649a891011c670d402bcb29c9c
parentcb7660cd29ce3673043eaf848ba2a59725597008
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