]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation.
authorMaaz Mombasawala <mombasawalam@vmware.com>
Sat, 22 Oct 2022 04:02:24 +0000 (00:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:28 +0000 (11:58 +0100)
commit8752fdeeb74911b6cc0fc842abfa6c9fb755d89c
treeee10b3de9ab9d99b5420283d59c9d18704da4940
parent32cde48831a66c859ba4d8b988c8df2e69a4108c
drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation.

[ Upstream commit b29f4b4e0f24aa39b82e80430e01c9e1aed49f68 ]

Vmwgfx's hashtab implementation needs to be replaced with linux/hashtable
to reduce maintenence burden.
As part of this effort, refactor the res_ht hashtable used for resource
validation during execbuf execution to use linux/hashtable implementation.
This also refactors vmw_validation_context to use vmw_sw_context as the
container for the hashtable, whereas before it used a vmwgfx_open_hash
directly. This makes vmw_validation_context less generic, but there is
no functional change since res_ht is the only instance where validation
context used a hashtable in vmwgfx driver.

Signed-off-by: Maaz Mombasawala <mombasawalam@vmware.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-6-zack@kde.org
Stable-dep-of: 1ed759639c37 ("drm/vmwgfx: Remove rcu locks from user resources")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
drivers/gpu/drm/vmwgfx/vmwgfx_validation.h