drm/mm: optimize find_hole() as well
authorChristian König <christian.koenig@amd.com>
Tue, 9 Jun 2020 12:47:33 +0000 (14:47 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 23 Jun 2020 13:46:06 +0000 (15:46 +0200)
commit271e7decd707accfe6d4965b2c5e60d2d77c8e35
treea4a3cbd9cc257072ebd09363d76d3c63255d37d4
parent41c0e78aae53099852dab4d1050c06a43c827eb3
drm/mm: optimize find_hole() as well

Abort early if there isn't enough space to allocate from a subtree.

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