All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gupta, Anshuman" <anshuman.gupta@intel.com>
To: "Auld, Matthew" <matthew.auld@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on'
Date: Fri, 14 Oct 2022 04:31:19 +0000	[thread overview]
Message-ID: <CY5PR11MB6211148A0A9C8E4162D7896F95249@CY5PR11MB6211.namprd11.prod.outlook.com> (raw)
In-Reply-To: <6fb51e71-bc5c-16d1-ad13-33017035be83@intel.com>



> -----Original Message-----
> From: Auld, Matthew <matthew.auld@intel.com>
> Sent: Wednesday, October 12, 2022 3:19 PM
> To: Gupta, Anshuman <anshuman.gupta@intel.com>; intel-
> gfx@lists.freedesktop.org
> Cc: joonas.lahtinen@linux.intel.com; tvrtko.ursulin@linux.intel.com; Vivi,
> Rodrigo <rodrigo.vivi@intel.com>
> Subject: Re: [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend
> control 'on'
> 
> On 12/10/2022 09:34, Anshuman Gupta wrote:
> > DGFX platforms has lmem and cpu can access the lmem objects via mmap
> > and i915 internal i915_gem_object_pin_map() for
> > i915 own usages. Both of these methods has pre-requisite requirement
> > to keep GFX PCI endpoint in D0 for a supported iomem transaction over
> > PCI link. (Refer PCIe specs 5.3.1.4.1)
> >
> > Both DG1/DG2 have a hardware bug that violates the PCIe specs and
> > support the iomem read write transaction over PCIe bus despite
> > endpoint is D3 state.
> > Due to above H/W bug, we had never observed any issue with i915
> > runtime PM versus lmem access.
> > But this issue becomes visible when PCIe gfx endpoint's upstream
> > bridge enters to D3, at this point any lmem read/write access will be
> > returned as unsupported request. But again this issue is not observed
> > on every platform because it has been observed on few host machines
> > DG1/DG2 endpoint's upstream bridge does not bind with pcieport driver.
> > which really disables the PCIe  power savings and leaves the bridge at
> > D0 state.
> >
> > Till we fix all issues related to runtime PM, we need to keep
> > autosupend control to 'on' on all discrete platforms with lmem.
> >
> > Fixes: 527bab0473f2 ("drm/i915/rpm: Enable runtime pm autosuspend by
> > default")
> 
> So with this change all the runtime pm stuff is disabled on dgfx? i.e
> intel_runtime_pm_get() always returns zero or so? Wondering if we should also
> revert ad74457a6b5a ("drm/i915/dgfx: Release mmap on rpm suspend") for
> now, since that still needs some more fixes...
Hi Matt,
This patch just keeps autosupend to 'on' as i915 default.
User can change it to 'auto' by echo 'auto' > /sys/bus/pci/devices/bdf/power/control ,
so we need the above mentioned commit and need to fix the issues with it.
Thanks,
Anshuman Gupta.
> 
> > Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_runtime_pm.c | 11 +++++++++--
> >   1 file changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > index 6ed5786bcd29..410a5cb58a61 100644
> > --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > @@ -591,8 +591,15 @@ void intel_runtime_pm_enable(struct
> intel_runtime_pm *rpm)
> >   		pm_runtime_use_autosuspend(kdev);
> >   	}
> >
> > -	/* Enable by default */
> > -	pm_runtime_allow(kdev);
> > +	/*
> > +	 *  FIXME: Temp hammer to keep autosupend disable on lmem
> supported platforms.
> > +	 *  As per PCIe specs 5.3.1.4.1, all iomem read write request over a PCIe
> > +	 *  function will be unsupported in case PCIe endpoint function is in D3.
> > +	 *  Let's keep i915 autosuspend control 'on' till we fix all known issue
> > +	 *  with lmem access in D3.
> > +	 */
> > +	if (!HAS_LMEM(i915))
> > +		pm_runtime_allow(kdev);
> >
> >   	/*
> >   	 * The core calls the driver load handler with an RPM reference held.

  parent reply	other threads:[~2022-10-14  4:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  8:34 [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on' Anshuman Gupta
2022-10-12  9:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-10-12  9:21 ` [Intel-gfx] [PATCH] " Andi Shyti
2022-10-12 14:56   ` Rodrigo Vivi
2022-10-12  9:48 ` Matthew Auld
2022-10-12 14:57   ` Rodrigo Vivi
2022-10-12 15:13     ` Matthew Auld
2022-10-12 15:19   ` Dixit, Ashutosh
2022-10-13 15:18     ` Gupta, Anshuman
2022-10-14  4:31   ` Gupta, Anshuman [this message]
2022-10-12 10:26 ` Joonas Lahtinen
2022-10-12 15:00   ` Rodrigo Vivi
2022-10-14  4:13     ` Gupta, Anshuman
2022-10-12 11:06 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " Patchwork
2022-10-14 11:32 ` [Intel-gfx] [PATCH v2] drm/i915/dgfx: Keep PCI autosuspend control 'on' by default on all dGPU Anshuman Gupta
2022-10-17  6:02   ` Gupta, Anshuman
2022-10-14 12:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on' (rev2) Patchwork
2022-10-14 13:30 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-10-18 13:20   ` Gupta, Anshuman

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=CY5PR11MB6211148A0A9C8E4162D7896F95249@CY5PR11MB6211.namprd11.prod.outlook.com \
    --to=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=rodrigo.vivi@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.