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:
@@ -861,9 +861,8 @@ struct vmw_resource *vmw_context_cotable(struct vmw_resource *ctx,
|
||||
if (cotable_type >= SVGA_COTABLE_DX10_MAX)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return vmw_resource_reference
|
||||
(container_of(ctx, struct vmw_user_context, res)->
|
||||
cotables[cotable_type]);
|
||||
return container_of(ctx, struct vmw_user_context, res)->
|
||||
cotables[cotable_type];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user