dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Abdiel Janulgue <abdiel.janulgue@gmail.com>
To: Andi Shyti <andi.shyti@linux.intel.com>,
	Matt Roper <matthew.d.roper@intel.com>
Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>,
	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@etezian.org>
Subject: Re: [PATCH v2 1/2] drm/i915: Prepare for multiple GTs
Date: Mon, 17 Jan 2022 20:03:49 +0200	[thread overview]
Message-ID: <66835d0f-fe80-aa80-0347-cb7fd00696fc@gmail.com> (raw)
In-Reply-To: <YeG6GrzU/QYUY1RH@intel.intel>

On 14.1.2022 19.59, Andi Shyti wrote:
> 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.

Hey,

It’s been awhile and this code has changed a lot! I remember needing the 
unmapped phys_addr of each tile’s mmio_bar as well when I refactored 
this spot (setup_mmio) so its GGTT portion can be ioremapped according 
to ggtt_probe_common.

Cheers!
Abdiel
> 
>> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> 
> Thank you!
> 
> Andi

  reply	other threads:[~2022-01-17 22:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 22:20 [PATCH v2 0/2] Introduce multitile support Andi Shyti
2022-01-12 22:20 ` [PATCH v2 1/2] drm/i915: Prepare for multiple GTs Andi Shyti
2022-01-14 16:55   ` Matt Roper
2022-01-14 17:59     ` Andi Shyti
2022-01-17 18:03       ` Abdiel Janulgue [this message]
2022-01-12 22:20 ` [PATCH v2 2/2] drm/i915/gt: make a gt sysfs group and move power management files Andi Shyti
2022-01-12 22:42   ` Sundaresan, Sujaritha
2022-01-14 17:08   ` Matt Roper
2022-01-14 18:20     ` Andi Shyti

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=66835d0f-fe80-aa80-0347-cb7fd00696fc@gmail.com \
    --to=abdiel.janulgue@gmail.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=andi@etezian.org \
    --cc=daniele.ceraolospurio@intel.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 \
    --cc=sujaritha.sundaresan@intel.com \
    --cc=tvrtko.ursulin@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