浏览代码

drm/vmwgfx: Fix hash key computation

The hash key computation in vmw_cmdbuf_res_remove incorrectly didn't take
the resource type into account, contrary to all the other related functions.
This becomes important when the cmdbuf resource manager handles more than
one resource type.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Thomas Hellstrom 10 年之前
父节点
当前提交
0468ab5b79
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c

+ 2 - 1
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c

@@ -246,7 +246,8 @@ int vmw_cmdbuf_res_remove(struct vmw_cmdbuf_res_manager *man,
 	struct drm_hash_item *hash;
 	int ret;
 
-	ret = drm_ht_find_item(&man->resources, user_key, &hash);
+	ret = drm_ht_find_item(&man->resources, user_key | (res_type << 24),
+			       &hash);
 	if (likely(ret != 0))
 		return -EINVAL;