All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [RFC 07/10] drm/i915: move regs pointer inside the uncore structure
Date: Mon, 18 Mar 2019 11:08:35 -0700	[thread overview]
Message-ID: <b41c8fac-d287-e495-abb6-cc5b6becdea0@intel.com> (raw)
In-Reply-To: <155268303297.4168.10764280531818470374@skylake-alporthouse-com>



On 3/15/19 1:50 PM, Chris Wilson wrote:
> Quoting Daniele Ceraolo Spurio (2019-03-13 23:13:16)
>> This will allow futher simplifications in the uncore handling.
>>
>> RFC: if we want to keep the pointer logically separate from the uncore,
>> we could also move both the regs pointer and the uncore struct
>> inside a new structure (intel_mmio?) and pass that around instead, or
>> just take a copy of the pointer
>>
>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_drv.c     |  6 +++---
>>   drivers/gpu/drm/i915/i915_drv.h     |  6 ++----
>>   drivers/gpu/drm/i915/i915_irq.c     | 22 +++++++++++-----------
>>   drivers/gpu/drm/i915/intel_lrc.c    |  6 +++---
>>   drivers/gpu/drm/i915/intel_uncore.c |  5 ++---
>>   drivers/gpu/drm/i915/intel_uncore.h |  2 ++
>>   6 files changed, 23 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
>> index a2e039f523c0..2470c1ef4951 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.c
>> +++ b/drivers/gpu/drm/i915/i915_drv.c
>> @@ -949,8 +949,8 @@ static int i915_mmio_setup(struct drm_i915_private *dev_priv)
>>                  mmio_size = 512 * 1024;
>>          else
>>                  mmio_size = 2 * 1024 * 1024;
>> -       dev_priv->regs = pci_iomap(pdev, mmio_bar, mmio_size);
>> -       if (dev_priv->regs == NULL) {
>> +       dev_priv->uncore.regs = pci_iomap(pdev, mmio_bar, mmio_size);
>> +       if (dev_priv->uncore.regs == NULL) {
>>                  DRM_ERROR("failed to map registers\n");
>>   
>>                  return -EIO;
>> @@ -967,7 +967,7 @@ static void i915_mmio_cleanup(struct drm_i915_private *dev_priv)
>>          struct pci_dev *pdev = dev_priv->drm.pdev;
>>   
>>          intel_teardown_mchbar(dev_priv);
>> -       pci_iounmap(pdev, dev_priv->regs);
>> +       pci_iounmap(pdev, dev_priv->uncore.regs);
> 
> At the very least with moving to the uncore as owner of regs, the setup
> and cleanup should be moved to intel_uncore.
> 

I knew someone was going to call me out on this :P. I was waiting to 
confirm the approach was ok before moving stuff around, I should have 
noted it in the commit message

> As it stands, it looks reasonable, as the uncore being the arbitrator
> and debugger of mmio access.
> 
> Now, what would make Ville and myself happy would be an artificial
> split of uncore into gpu and display roles, with an arch-arbiter around
> forcewake itself. i.e. since display doesn't really forcewake it doesn't
> need to share the pain of the forcewake spinlock -- it still needs some
> locks around to serialise mmio, but it wants much finer control as
> locking is a big hindrance wrt flip latency. On the gpu side, we already
> avoid using the general uncore routines on the hottest paths, but
> equally do not want latency from display operations. So even the coarse
> split between display/gpu should have immediate improvements.
> 

Sounds good, I'll look at this after this series stabilizes.

Thanks,
Daniele

> I'll leave you to judge if the knowledge and data structures gained from
> that exercise will pay off in future.
> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-18 18:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 23:13 [RFC 00/10] Compartmentalize uncore code Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 01/10] drm/i915: do not pass dev_priv to low-level forcewake functions Daniele Ceraolo Spurio
2019-03-15 20:07   ` Paulo Zanoni
2019-03-15 23:41   ` Chris Wilson
2019-03-13 23:13 ` [RFC 02/10] drm/i915: use intel_uncore in fw get/put internal paths Daniele Ceraolo Spurio
2019-03-15 21:00   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 03/10] drm/i915: use intel_uncore for all forcewake get/put Daniele Ceraolo Spurio
2019-03-15 21:41   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 04/10] drm/i915: make more uncore function work on intel_uncore Daniele Ceraolo Spurio
2019-03-15 22:17   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 05/10] drm/i915: make find_fw_domain " Daniele Ceraolo Spurio
2019-03-15 22:57   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 06/10] drm/i915: reduce the dev_priv->uncore dance in uncore.c Daniele Ceraolo Spurio
2019-03-15 23:07   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 07/10] drm/i915: move regs pointer inside the uncore structure Daniele Ceraolo Spurio
2019-03-15 20:50   ` Chris Wilson
2019-03-18 18:08     ` Daniele Ceraolo Spurio [this message]
2019-03-13 23:13 ` [RFC 08/10] drm/i915: make raw access function work on uncore Daniele Ceraolo Spurio
2019-03-15 23:33   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 09/10] drm/i915: add uncore flags Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 10/10] drm/i915: switch uncore mmio funcs to use intel_uncore Daniele Ceraolo Spurio
2019-03-14  4:09 ` ✗ Fi.CI.BAT: failure for Compartmentalize uncore code 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=b41c8fac-d287-e495-abb6-cc5b6becdea0@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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.