All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@gmail.com>,
	Intel GFX <intel-gfx@lists.freedesktop.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	DRI Devel <dri-devel@lists.freedesktop.org>,
	Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: Prepare for multiple GTs
Date: Fri, 14 Jan 2022 19:59:54 +0200	[thread overview]
Message-ID: <YeG6GrzU/QYUY1RH@intel.intel> (raw)
In-Reply-To: <YeGq/b6JjJaxSE0z@mdroper-desk1.amr.corp.intel.com>

Hi Matt,

[...]

> > -int intel_uncore_setup_mmio(struct intel_uncore *uncore)
> > +int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr)
> >  {
> >  	struct drm_i915_private *i915 = uncore->i915;
> > -	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
> > -	int mmio_bar;
> >  	int mmio_size;
> >  
> > -	mmio_bar = GRAPHICS_VER(i915) == 2 ? 1 : 0;
> >  	/*
> >  	 * Before gen4, the registers and the GTT are behind different BARs.
> >  	 * However, from gen4 onwards, the registers and the GTT are shared
> > @@ -2044,7 +2041,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore)
> >  	else
> >  		mmio_size = 2 * 1024 * 1024;
> >  
> > -	uncore->regs = pci_iomap(pdev, mmio_bar, mmio_size);
> > +	uncore->regs = ioremap(phys_addr, mmio_size);
> 
> Is there a specific reason we switch to ioremap() instead of
> pci_iomap_range()?  I.e., we could pass 'phys_offset' rather than
> 'phys_addr' and call
> 
>         pci_iomap_range(pdev, mmio_bar, phys_offset, mmio_size);
> 
> Not that it really matters too much either way as far as I can see;
> ioremap()/iounmap() should work fine too.

this was originally changed by Abdiel (I think) and I left as it
is as I tried to change as less as I could from the original
work.

> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Thank you!

Andi

WARNING: multiple messages have this Message-ID (diff)
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@gmail.com>,
	Andi Shyti <andi@etezian.org>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Intel GFX <intel-gfx@lists.freedesktop.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	DRI Devel <dri-devel@lists.freedesktop.org>,
	Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	Andi Shyti <andi.shyti@linux.intel.com>,
	Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Subject: Re: [PATCH v2 1/2] drm/i915: Prepare for multiple GTs
Date: Fri, 14 Jan 2022 19:59:54 +0200	[thread overview]
Message-ID: <YeG6GrzU/QYUY1RH@intel.intel> (raw)
In-Reply-To: <YeGq/b6JjJaxSE0z@mdroper-desk1.amr.corp.intel.com>

Hi Matt,

[...]

> > -int intel_uncore_setup_mmio(struct intel_uncore *uncore)
> > +int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr)
> >  {
> >  	struct drm_i915_private *i915 = uncore->i915;
> > -	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
> > -	int mmio_bar;
> >  	int mmio_size;
> >  
> > -	mmio_bar = GRAPHICS_VER(i915) == 2 ? 1 : 0;
> >  	/*
> >  	 * Before gen4, the registers and the GTT are behind different BARs.
> >  	 * However, from gen4 onwards, the registers and the GTT are shared
> > @@ -2044,7 +2041,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore)
> >  	else
> >  		mmio_size = 2 * 1024 * 1024;
> >  
> > -	uncore->regs = pci_iomap(pdev, mmio_bar, mmio_size);
> > +	uncore->regs = ioremap(phys_addr, mmio_size);
> 
> Is there a specific reason we switch to ioremap() instead of
> pci_iomap_range()?  I.e., we could pass 'phys_offset' rather than
> 'phys_addr' and call
> 
>         pci_iomap_range(pdev, mmio_bar, phys_offset, mmio_size);
> 
> Not that it really matters too much either way as far as I can see;
> ioremap()/iounmap() should work fine too.

this was originally changed by Abdiel (I think) and I left as it
is as I tried to change as less as I could from the original
work.

> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Thank you!

Andi

  reply	other threads:[~2022-01-14 18:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 22:20 [Intel-gfx] [PATCH v2 0/2] Introduce multitile support Andi Shyti
2022-01-12 22:20 ` Andi Shyti
2022-01-12 22:20 ` [Intel-gfx] [PATCH v2 1/2] drm/i915: Prepare for multiple GTs Andi Shyti
2022-01-12 22:20   ` Andi Shyti
2022-01-14 16:55   ` [Intel-gfx] " Matt Roper
2022-01-14 16:55     ` Matt Roper
2022-01-14 17:59     ` Andi Shyti [this message]
2022-01-14 17:59       ` Andi Shyti
2022-01-17 18:03       ` [Intel-gfx] " Abdiel Janulgue
2022-01-17 18:03         ` Abdiel Janulgue
2022-01-12 22:20 ` [Intel-gfx] [PATCH v2 2/2] drm/i915/gt: make a gt sysfs group and move power management files Andi Shyti
2022-01-12 22:20   ` Andi Shyti
2022-01-12 22:42   ` [Intel-gfx] " Sundaresan, Sujaritha
2022-01-12 22:42     ` Sundaresan, Sujaritha
2022-01-14 17:08   ` [Intel-gfx] " Matt Roper
2022-01-14 17:08     ` Matt Roper
2022-01-14 18:20     ` [Intel-gfx] " Andi Shyti
2022-01-14 18:20       ` Andi Shyti
2022-01-12 22:35 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Introduce multitile support Patchwork
2022-01-12 22:36 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-12 23:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-01-13  3:45 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=YeG6GrzU/QYUY1RH@intel.intel \
    --to=andi.shyti@linux.intel.com \
    --cc=abdiel.janulgue@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.auld@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.