Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 5a5a10d

Browse files
arunpravin24airlied
authored andcommitted
drm/buddy: Fix the warn on's during force merge
Move the fallback and block incompatible checks above, so that we dont unnecessarily split the blocks and leaving the unmerged. This resolves the unnecessary warn on's thrown during force_merge call. v2:(Matthew) - Move the fallback and block incompatible checks above the contains check. Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Fixes: 9695092 ("drm/buddy: Implement tracking clear page feature") Link: https://patchwork.kernel.org/project/dri-devel/patch/20240517135015.17565-1-Arunpravin.PaneerSelvam@amd.com/ Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240517143305.17894-1-Arunpravin.PaneerSelvam@amd.com
1 parent 431c590 commit 5a5a10d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/drm_buddy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,11 @@ __alloc_range_bias(struct drm_buddy *mm,
524524
continue;
525525
}
526526

527+
if (!fallback && block_incompatible(block, flags))
528+
continue;
529+
527530
if (contains(start, end, block_start, block_end) &&
528531
order == drm_buddy_block_order(block)) {
529-
if (!fallback && block_incompatible(block, flags))
530-
continue;
531-
532532
/*
533533
* Find the free block within the range.
534534
*/

0 commit comments

Comments
 (0)