mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
drm/vmwgfx: Don't refcount cotable 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. There are two users outside of command buffer validation and those are refcounted explicitly. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
This commit is contained in:
parent
508108ea27
commit
1b9a01d62c
4 changed files with 6 additions and 10 deletions
|
@ -636,7 +636,8 @@ int vmw_dx_shader_add(struct vmw_cmdbuf_res_manager *man,
|
|||
|
||||
res = &shader->res;
|
||||
shader->ctx = ctx;
|
||||
shader->cotable = vmw_context_cotable(ctx, SVGA_COTABLE_DXSHADER);
|
||||
shader->cotable = vmw_resource_reference
|
||||
(vmw_context_cotable(ctx, SVGA_COTABLE_DXSHADER));
|
||||
shader->id = user_key;
|
||||
shader->committed = false;
|
||||
INIT_LIST_HEAD(&shader->cotable_head);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue