Linux PCI subsystem development
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] drm/xe: Improve rebar log messages
       [not found]   ` <20251114215621.GT3905809@mdroper-desk1.amr.corp.intel.com>
@ 2025-11-17  9:34     ` Ilpo Järvinen
  2025-11-17 16:50       ` Lucas De Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Ilpo Järvinen @ 2025-11-17  9:34 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-xe, Michal Wajdeczko, linux-pci

[-- Attachment #1: Type: text/plain, Size: 3692 bytes --]

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 <michal.wajdeczko@intel.com>
> > Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> 
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> 
> > ---
> >  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 <linux/pci.h>
> >  #include <linux/types.h>
> >  
> > -#include <drm/drm_print.h>
> > -
> >  #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;
> >  	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] drm/xe: Improve rebar log messages
  2025-11-17  9:34     ` [PATCH 2/2] drm/xe: Improve rebar log messages Ilpo Järvinen
@ 2025-11-17 16:50       ` Lucas De Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Lucas De Marchi @ 2025-11-17 16:50 UTC (permalink / raw)
  To: Ilpo Järvinen
  Cc: Matt Roper, intel-xe, Michal Wajdeczko, linux-pci, Rodrigo Vivi,
	Thomas Hellstrom

On Mon, Nov 17, 2025 at 11:34:20AM +0200, Ilpo Järvinen wrote:
>> > @@ -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 submitted your pci/resource branch on top of drm-tip for our CI[1].
I could could rebase this on top of that to have it ready to be merge once
we have 6.19-rc1. I won't be around next cycle though, but If desired
someone could pick these rebased patches.

[1] Checking the results for xe and i915, I don't see any regression
related to these patches, so it seems good from our side.
xe: https://patchwork.freedesktop.org/series/157585/ ,
i915: https://patchwork.freedesktop.org/series/157584/

thanks,
Lucas De Marchi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-17 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20251031-xe-pci-rebar-2-part-2-v1-0-c4a794a39041@intel.com>
     [not found] ` <20251031-xe-pci-rebar-2-part-2-v1-2-c4a794a39041@intel.com>
     [not found]   ` <20251114215621.GT3905809@mdroper-desk1.amr.corp.intel.com>
2025-11-17  9:34     ` [PATCH 2/2] drm/xe: Improve rebar log messages Ilpo Järvinen
2025-11-17 16:50       ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox