diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2014-10-31 09:54:22 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2014-10-31 09:54:22 +0100 |
commit | 0468ab5b791b0d55a7158b70f555157c8d79d0fb (patch) | |
tree | 124fe69a5a76fa863d951745f8255033fb4735d7 | |
parent | 21e88620aa21b48d4f62d29275e3e2944a5ea2b5 (diff) | |
download | op-kernel-dev-0468ab5b791b0d55a7158b70f555157c8d79d0fb.zip op-kernel-dev-0468ab5b791b0d55a7158b70f555157c8d79d0fb.tar.gz |
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>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c index bfeb4b1..21e9b7f 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +++ b/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; |