Commit cd11589b authored by Ma Jun's avatar Ma Jun Committed by Alex Deucher

drm/buddy: Fix drm buddy info output format

[1] Change pages to blocks to avoid confusion.
[2] Fix output format to align the output info.
Signed-off-by: default avatarMa Jun <Jun.Ma2@amd.com>
Reviewed-by: default avatarArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f734b213
...@@ -781,15 +781,15 @@ void drm_buddy_print(struct drm_buddy *mm, struct drm_printer *p) ...@@ -781,15 +781,15 @@ void drm_buddy_print(struct drm_buddy *mm, struct drm_printer *p)
count++; count++;
} }
drm_printf(p, "order-%d ", order); drm_printf(p, "order-%2d ", order);
free = count * (mm->chunk_size << order); free = count * (mm->chunk_size << order);
if (free < SZ_1M) if (free < SZ_1M)
drm_printf(p, "free: %lluKiB", free >> 10); drm_printf(p, "free: %8llu KiB", free >> 10);
else else
drm_printf(p, "free: %lluMiB", free >> 20); drm_printf(p, "free: %8llu MiB", free >> 20);
drm_printf(p, ", pages: %llu\n", count); drm_printf(p, ", blocks: %llu\n", count);
} }
} }
EXPORT_SYMBOL(drm_buddy_print); EXPORT_SYMBOL(drm_buddy_print);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment