summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMaaz Mombasawala <mombasawalam@vmware.com>2022-10-22 07:02:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 13:58:28 +0300
commit7f3d691dedfe73741d609707ed417200479f0b0c (patch)
tree6637e93cb3bbf7f6e4546ba618be663182616dd1 /Documentation
parente98d62090b6d6326196e444375c1e2104d2e583f (diff)
downloadlinux-7f3d691dedfe73741d609707ed417200479f0b0c.tar.xz
drm/vmwgfx: Refactor ttm reference object hashtable to use linux/hashtable.
[ Upstream commit 76a9e07f270cf5fb556ac237dbf11f5dacd61fef ] This is part of an effort to move from the vmwgfx_open_hash hashtable to linux/hashtable implementation. Refactor the ref_hash hashtable, used for fast lookup of reference objects associated with a ttm file. This also exposed a problem related to inconsistently using 32-bit and 64-bit keys with this hashtable. The hash function used changes depending on the size of the type, and results are not consistent across numbers, for example, hash_32(329) = 329, but hash_long(329) = 328. This would cause the lookup to fail for objects already in the hashtable, since keys of different sizes were being passed during adding and lookup. This was not an issue before because vmwgfx_open_hash always used hash_long. Fix this by always using 64-bit keys for this hashtable, which means that hash_long is always used. Signed-off-by: Maaz Mombasawala <mombasawalam@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com> Signed-off-by: Zack Rusin <zackr@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-11-zack@kde.org Stable-dep-of: a309c7194e8a ("drm/vmwgfx: Remove rcu locks from user resources") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions