]> 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)
commit94e2a5bdbd1c4a66df35d5c03be921e6b17f6ccb
tree7fe0bd6de4f603aebf0693154d096d20da2dd46f
parent38ea75e328db2b624a6f3895f72b8347b76f1586
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