Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-xe@lists.freedesktop.org,
	 Michal Wajdeczko <michal.wajdeczko@intel.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/xe: Improve rebar log messages
Date: Mon, 17 Nov 2025 11:34:20 +0200 (EET)	[thread overview]
Message-ID: <af1b8517-a48c-0826-b02a-db102424ac8a@linux.intel.com> (raw)
In-Reply-To: <20251114215621.GT3905809@mdroper-desk1.amr.corp.intel.com>

[-- 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;
> >  	}

       reply	other threads:[~2025-11-17  9:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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     ` Ilpo Järvinen [this message]
2025-11-17 16:50       ` [PATCH 2/2] drm/xe: Improve rebar log messages Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af1b8517-a48c-0826-b02a-db102424ac8a@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew.d.roper@intel.com \
    --cc=michal.wajdeczko@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox