drm/vmwgfx: Don't refcount command-buffer managed resource lookups during command...
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 26 Sep 2018 14:28:45 +0000 (16:28 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 28 Sep 2018 06:57:08 +0000 (08:57 +0200)
commit508108ea274788888408f4245438e40c90d821da
tree81842fd772b00841c88b7c997bee702b5343ed51
parentb139d43dacef688a4f46f29eef34409e950f7cef
drm/vmwgfx: Don't refcount command-buffer managed resource lookups during command buffer validation

The typical pattern of these lookups are
-Lookup
-Put on validate list if not already there.
-Unreference
And since we are the exclusive user of the context during lookup time,
we can be sure that the resource will stay alive during the sequence.
So avoid taking a reference during lookup, and also avoid unreferencing
when done.

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