On Fri, 14 Nov 2025, Matt Roper wrote: > On Fri, Oct 31, 2025 at 02:17:43PM -0700, Lucas De Marchi wrote: > > Some minor improvements to the log messages in the rebar logic: > > use xe-oriented printk, switch unit from M to MiB in a few places for > > consistency and us ilog2(SZ_1M) for clarity. > > > > Suggested-by: Michal Wajdeczko > > Suggested-by: Ilpo Järvinen > > Signed-off-by: Lucas De Marchi > > Reviewed-by: Matt Roper > > > --- > > drivers/gpu/drm/xe/xe_pci_rebar.c | 20 +++++++++----------- > > 1 file changed, 9 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/gpu/drm/xe/xe_pci_rebar.c b/drivers/gpu/drm/xe/xe_pci_rebar.c > > index d21e29c95ca33..378447a3be0ca 100644 > > --- a/drivers/gpu/drm/xe/xe_pci_rebar.c > > +++ b/drivers/gpu/drm/xe/xe_pci_rebar.c > > @@ -6,12 +6,11 @@ > > #include > > #include > > > > -#include > > - > > #include "regs/xe_bars.h" > > #include "xe_device_types.h" > > #include "xe_module.h" > > #include "xe_pci_rebar.h" > > +#include "xe_printk.h" > > > > #define BAR_SIZE_SHIFT 20 > > > > @@ -47,12 +46,12 @@ static void resize_bar(struct xe_device *xe, int resno, resource_size_t size) > > > > ret = pci_resize_resource(pdev, resno, bar_size); > > if (ret) { > > - drm_info(&xe->drm, "Failed to resize BAR%d to %dM (%pe). Consider enabling 'Resizable BAR' support in your BIOS\n", > > - resno, 1 << bar_size, ERR_PTR(ret)); > > + xe_info(xe, "Failed to resize BAR%d to %dMiB (%pe). Consider enabling 'Resizable BAR' support in your BIOS\n", > > + resno, 1 << bar_size, ERR_PTR(ret)); > > return; > > } > > > > - drm_info(&xe->drm, "BAR%d resized to %dM\n", resno, 1 << bar_size); > > + xe_info(xe, "BAR%d resized to %dMiB\n", resno, 1 << bar_size); > > } > > > > /* > > @@ -93,9 +92,8 @@ void xe_pci_rebar(struct xe_device *xe) > > bar_size_bit = bar_size_mask & BIT(pci_rebar_bytes_to_size(rebar_size)); > > > > if (!bar_size_bit) { > > - drm_info(&xe->drm, > > - "Requested size: %lluMiB is not supported by rebar sizes: 0x%x. Leaving default: %lluMiB\n", > > - (u64)rebar_size >> 20, bar_size_mask, (u64)current_size >> 20); > > + xe_info(xe, "Requested size: %lluMiB is not supported by rebar sizes: 0x%x. Leaving default: %lluMiB\n", > > + (u64)rebar_size >> ilog2(SZ_1M), bar_size_mask, (u64)current_size >> ilog2(SZ_1M)); > > return; I don't remember if I said it already but this will cause more conflicts with what's in the pci/resource branch so preferrably defer this until the next cycle so the between trees conflicts are avoided. -- i. > > } > > > > @@ -111,8 +109,8 @@ void xe_pci_rebar(struct xe_device *xe) > > return; > > } > > > > - drm_info(&xe->drm, "Attempting to resize bar from %lluMiB -> %lluMiB\n", > > - (u64)current_size >> 20, (u64)rebar_size >> 20); > > + xe_info(xe, "Attempting to resize bar from %lluMiB -> %lluMiB\n", > > + (u64)current_size >> ilog2(SZ_1M), (u64)rebar_size >> ilog2(SZ_1M)); > > > > while (root->parent) > > root = root->parent; > > @@ -124,7 +122,7 @@ void xe_pci_rebar(struct xe_device *xe) > > } > > > > if (!root_res) { > > - drm_info(&xe->drm, "Can't resize VRAM BAR - platform support is missing. Consider enabling 'Resizable BAR' support in your BIOS\n"); > > + xe_info(xe, "Can't resize VRAM BAR - platform support is missing. Consider enabling 'Resizable BAR' support in your BIOS\n"); > > return; > > }