Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"De Marchi, Lucas" <lucas.demarchi@intel.com>
Cc: "Roper, Matthew D" <matthew.d.roper@intel.com>,
	"Wajdeczko, Michal" <Michal.Wajdeczko@intel.com>
Subject: Re: [PATCH] drm/xe: Fix arg to pci_iomap()
Date: Fri, 6 Sep 2024 14:27:23 +0000	[thread overview]
Message-ID: <241487a9b32c918016b8ac83faa7232ce1fad760.camel@intel.com> (raw)
In-Reply-To: <20240906032507.2952859-1-lucas.demarchi@intel.com>

Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>

On Thu, 2024-09-05 at 20:25 -0700, Lucas De Marchi wrote:
> Commit 2d8865b27724 ("drm/xe: Move BAR definitions to dedicated file")
> moved the BAR definition to the header, but replaced the wrong arg in
> the pci_iomap() function - the last arg is actuall the length, not the
> BAR. Luckily GTTMMADR_BAR == 0, so it still works. Fix the argument
> to avoid confusion.
> 
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_mmio.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index 3fd462fda625..4aae30880bc6 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -157,15 +157,14 @@ int xe_mmio_init(struct xe_device *xe)
>  {
>         struct xe_tile *root_tile = xe_device_get_root_tile(xe);
>         struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
> -       const int mmio_bar = 0;
>  
>         /*
>          * Map the entire BAR.
>          * The first 16MB of the BAR, belong to the root tile, and include:
>          * registers (0-4MB), reserved space (4MB-8MB) and GGTT (8MB-16MB).
>          */
> -       xe->mmio.size = pci_resource_len(pdev, mmio_bar);
> -       xe->mmio.regs = pci_iomap(pdev, mmio_bar, GTTMMADR_BAR);
> +       xe->mmio.size = pci_resource_len(pdev, GTTMMADR_BAR);
> +       xe->mmio.regs = pci_iomap(pdev, GTTMMADR_BAR, 0);
>         if (xe->mmio.regs == NULL) {
>                 drm_err(&xe->drm, "failed to map registers\n");
>                 return -EIO;


  parent reply	other threads:[~2024-09-06 14:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06  3:25 [PATCH] drm/xe: Fix arg to pci_iomap() Lucas De Marchi
2024-09-06  3:33 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-06  3:33 ` ✓ CI.checkpatch: " Patchwork
2024-09-06  3:34 ` ✓ CI.KUnit: " Patchwork
2024-09-06  3:48 ` ✓ CI.Build: " Patchwork
2024-09-06  4:04 ` ✓ CI.Hooks: " Patchwork
2024-09-06  4:07 ` ✓ CI.checksparse: " Patchwork
2024-09-06  5:12 ` ✓ CI.BAT: " Patchwork
2024-09-06 14:27 ` Teres Alexis, Alan Previn [this message]
2024-09-06 14:50 ` [PATCH] " Matt Roper
2024-09-06 15:40 ` Michal Wajdeczko

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=241487a9b32c918016b8ac83faa7232ce1fad760.camel@intel.com \
    --to=alan.previn.teres.alexis@intel.com \
    --cc=Michal.Wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@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