]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mm: cleanup and improve next_hole_*_addr()
authorChristian König <christian.koenig@amd.com>
Mon, 15 Jun 2020 14:16:42 +0000 (16:16 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 23 Jun 2020 13:46:40 +0000 (15:46 +0200)
commit98eae48be9272dab32baade55cd7135679b744cb
tree7fe0bd6de4f603aebf0693154d096d20da2dd46f
parent30657d93a61507fd4b739050cd715f5c850f2b02
drm/mm: cleanup and improve next_hole_*_addr()

Skipping just one branch of the tree is not the most
effective approach.

Instead use a macro to define the traversal functions and
sort out both branch sides.

This improves the performance of the unit tests by
a factor of more than 4.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>
Link: https://patchwork.freedesktop.org/patch/370298/
drivers/gpu/drm/drm_mm.c