diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-09-26 15:41:52 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-09-27 15:21:37 +0200 |
commit | 13289241fe8b8c336ec8277b9c4643ea7fbb2f70 (patch) | |
tree | 915ef1c2f199dc1c1c285835bc8ebe89c07b44f4 /drivers/gpu/drm/vmwgfx/vmwgfx_context.c | |
parent | d76ce03e1a7870ca6351610cf30bcf62949ea900 (diff) | |
download | kernel_replicant_linux-13289241fe8b8c336ec8277b9c4643ea7fbb2f70.tar.gz kernel_replicant_linux-13289241fe8b8c336ec8277b9c4643ea7fbb2f70.tar.bz2 kernel_replicant_linux-13289241fe8b8c336ec8277b9c4643ea7fbb2f70.zip |
drm/vmwgfx: Remove the resource avail field
This field was previously used to prevent a lookup of a resource before its
constructor had run to its end. This was mainly intended for an interface
that is now removed that allowed looking up a resource by its device id.
Currently all affected resources are added to the lookup mechanism (its
TTM prime object is initialized) late in the constructor where it's OK to
look up the resource.
This means we can change the device resource_lock to an ordinary spinlock
instead of an rwlock and remove a locking sequence during lookup.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_context.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c index 7c3cb8efd11a..4d502567d24c 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c @@ -217,9 +217,7 @@ static int vmw_gb_context_init(struct vmw_private *dev_priv, } } - - - vmw_resource_activate(res, vmw_hw_context_destroy); + res->hw_destroy = vmw_hw_context_destroy; return 0; out_cotables: @@ -274,7 +272,7 @@ static int vmw_context_init(struct vmw_private *dev_priv, vmw_fifo_commit(dev_priv, sizeof(*cmd)); vmw_fifo_resource_inc(dev_priv); - vmw_resource_activate(res, vmw_hw_context_destroy); + res->hw_destroy = vmw_hw_context_destroy; return 0; out_early: |