Skip to content

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 <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Fixes: 9695092 ("drm/buddy: Implement tracking clear page feature") Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
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)