Skip to content

Commit

Permalink
drm/vmwgfx: Fix hash key computation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Hellstrom committed Oct 31, 2014
1 parent 21e8862 commit 0468ab5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0468ab5

Please sign in to comment.