drm/vmwgfx: Use an RBtree instead of linked list for MOB resources
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 5 Mar 2019 07:24:35 +0000 (08:24 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 18 Jun 2019 13:19:35 +0000 (15:19 +0200)
commit86aeaa09f3dfc43c89ae45e62f9b1b7f705c90e4
treef9c17d945a9a786981fd0f75e9777d7951ee5c4c
parent93392217066d9fb5f05188d05afa9ea56829a61c
drm/vmwgfx: Use an RBtree instead of linked list for MOB resources

With emulated coherent memory we need to be able to quickly look up
a resource from the MOB offset. Instead of traversing a linked list with
O(n) worst case, use an RBtree with O(log n) worst case complexity.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c