diff options
author | Arunpravin Paneer Selvam <[email protected]> | 2024-05-17 20:03:05 +0530 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2024-05-20 06:42:12 +1000 |
commit | 5a5a10d9db77939a22e1d65fc0a4ba6b5d8f4fce (patch) | |
tree | f2c171c7e10ec7666ea4a25c6d37e663cf5939e6 | |
parent | 431c590c3ab0469dfedad3a832fe73556396ee52 (diff) |
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: 96950929eb23 ("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]
-rw-r--r-- | drivers/gpu/drm/drm_buddy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 1daf778cf6fa..94f8c34fc293 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/drm/drm_buddy.c @@ -524,11 +524,11 @@ __alloc_range_bias(struct drm_buddy *mm, continue; } + if (!fallback && block_incompatible(block, flags)) + continue; + if (contains(start, end, block_start, block_end) && order == drm_buddy_block_order(block)) { - if (!fallback && block_incompatible(block, flags)) - continue; - /* * Find the free block within the range. */ |