aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_shader.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
index 76d354101403..813bd0a2abaf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
@@ -257,6 +257,9 @@ static int vmw_gb_shader_destroy(struct vmw_resource *res)
257 if (likely(res->id == -1)) 257 if (likely(res->id == -1))
258 return 0; 258 return 0;
259 259
260 mutex_lock(&dev_priv->binding_mutex);
261 vmw_context_binding_res_list_kill(&res->binding_head);
262
260 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); 263 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));
261 if (unlikely(cmd == NULL)) { 264 if (unlikely(cmd == NULL)) {
262 DRM_ERROR("Failed reserving FIFO space for shader " 265 DRM_ERROR("Failed reserving FIFO space for shader "
@@ -268,6 +271,7 @@ static int vmw_gb_shader_destroy(struct vmw_resource *res)
268 cmd->header.size = sizeof(cmd->body); 271 cmd->header.size = sizeof(cmd->body);
269 cmd->body.shid = res->id; 272 cmd->body.shid = res->id;
270 vmw_fifo_commit(dev_priv, sizeof(*cmd)); 273 vmw_fifo_commit(dev_priv, sizeof(*cmd));
274 mutex_unlock(&dev_priv->binding_mutex);
271 vmw_resource_release_id(res); 275 vmw_resource_release_id(res);
272 vmw_3d_resource_dec(dev_priv, false); 276 vmw_3d_resource_dec(dev_priv, false);
273 277