Commit 0468ab5b791b0d55a7158b70f555157c8d79d0fb
1 parent
21e88620aa
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
... | ... | @@ -246,7 +246,8 @@ |
246 | 246 | struct drm_hash_item *hash; |
247 | 247 | int ret; |
248 | 248 | |
249 | - ret = drm_ht_find_item(&man->resources, user_key, &hash); | |
249 | + ret = drm_ht_find_item(&man->resources, user_key | (res_type << 24), | |
250 | + &hash); | |
250 | 251 | if (likely(ret != 0)) |
251 | 252 | return -EINVAL; |
252 | 253 |