drm/vmwgfx: Make user resource lookups reference-free during validation
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 26 Sep 2018 14:32:40 +0000 (16:32 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 28 Sep 2018 06:57:09 +0000 (08:57 +0200)
commite8c66efbfe3a2e3cbc573f2474a3d51690f1b857
treef6f43b8ada79b82dd0f577686638caf46cb5b45a
parent1b9a01d62cb1bed2bc98f8b4e31d5b9daf0a446b
drm/vmwgfx: Make user resource lookups reference-free during validation

Make the process of looking up a user resource and adding it to the
validation list reference-free unless when it's actually added to the
validation list where a single reference is taken.
This saves two locked atomic operations per command stream buffer object
handle lookup, unless there is a lookup cache hit.

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