amdgpu: add handle table implementation v2

Graphics / Mesa 3D Graphics Library / libdrm - Christian König [amd.com] - 7 August 2018 11:27 EDT

The kernel handles are dense and the kernel always tries to use the lowest free id. Use this to implement a more efficient handle table by using a resizeable array instead of a hash.

v2: add handle_table_fini function, extra key checks, fix typo in function name

52370cc6 amdgpu: add handle table implementation v2
amdgpu/Makefile.sources | 4 ++-
amdgpu/handle_table.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++
amdgpu/handle_table.h | 41 ++++++++++++++++++++++++++++
3 files changed, 116 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share