Skip to content
Snippets Groups Projects
Commit 0468ab5b authored by Thomas Hellstrom's avatar Thomas Hellstrom
Browse files

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: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
parent 21e88620
No related branches found
No related tags found
No related merge requests found
...@@ -246,7 +246,8 @@ int vmw_cmdbuf_res_remove(struct vmw_cmdbuf_res_manager *man, ...@@ -246,7 +246,8 @@ int vmw_cmdbuf_res_remove(struct vmw_cmdbuf_res_manager *man,
struct drm_hash_item *hash; struct drm_hash_item *hash;
int ret; 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)) if (likely(ret != 0))
return -EINVAL; return -EINVAL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment