drm/buddy: Fix the range bias clear memory allocation issue
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Tue, 14 May 2024 14:56:35 +0000 (20:26 +0530)
committerDave Airlie <airlied@redhat.com>
Thu, 16 May 2024 02:50:04 +0000 (12:50 +1000)
commitbb21700baf7bc7ff9db8085fb0f097e8f8bcc0c5
tree80a296a7df8ea396a87656f31c5e19717171af8b
parent275654c02f0ba09d409c36d71dc238e470741e30
drm/buddy: Fix the range bias clear memory allocation issue

Problem statement: During the system boot time, an application request
for the bulk volume of cleared range bias memory when the clear_avail
is zero, we dont fallback into normal allocation method as we had an
unnecessary clear_avail check which prevents the fallback method leads
to fb allocation failure following system goes into unresponsive state.

Solution: Remove the unnecessary clear_avail check in the range bias
allocation function.

v2: add a kunit for this corner case (Daniel Vetter)

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Fixes: 96950929eb23 ("drm/buddy: Implement tracking clear page feature")
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240514145636.16253-1-Arunpravin.PaneerSelvam@amd.com
drivers/gpu/drm/drm_buddy.c