From: Mahesh Kumar Subject: Re: [PATCH 1/4] drm/i915/skl: Fix has_ipc on skl and document WaDisableIPC. Date: Tue, 3 Oct 2017 10:56:39 +0530 Message-ID: References: <20170928185148.4829-1-rodrigo.vivi@intel.com> <20170928185148.4829-2-rodrigo.vivi@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0430095891==" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA20389F0B for ; Tue, 3 Oct 2017 05:24:00 +0000 (UTC) In-Reply-To: <20170928185148.4829-2-rodrigo.vivi@intel.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Rodrigo Vivi , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This is a multi-part message in MIME format. --===============0430095891== Content-Type: multipart/alternative; boundary="------------9F92459242D6E4BF06984E59" Content-Language: en-US This is a multi-part message in MIME format. --------------9F92459242D6E4BF06984E59 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On Friday 29 September 2017 12:21 AM, Rodrigo Vivi wrote: > According to Spec for SKL+: "Isochronous Priority Control. > If enabled, Display sends demoted requests once the transition > watermark is reached. If transition watermark is not enabled, > Display sends demoted requests when the display buffer is full." > > The commit 'e57f1c02155f ("drm/i915/gen9+: Add has_ipc flag in > device info structure")' introduced that as gen9+ but missing many > SKL Skus. > > I believe the reason for that is Spec also mentions workarounds for > SKL-ALL: "IPC (Isoch Priority Control) may cause underflows > WA: Do not enable IPC in register ARB_CTL2" yes, it was intentional as you correctly pointed out WA #0477. > > It seems lame to add the feature and forever disable it, > but it will avoid a mistake of enabling it when we are reorganizing > the feature definitions on i915_pci.c later. sounds Good, > > It will also allow us to probably extend that workaround for > other platforms. > > Cc: Mahesh Kumar > Cc: Maarten Lankhorst > Cc: Chris Wilson > Signed-off-by: Rodrigo Vivi > --- > drivers/gpu/drm/i915/i915_pci.c | 1 + > drivers/gpu/drm/i915/intel_pm.c | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c > index da60866b6628..df751a152057 100644 > --- a/drivers/gpu/drm/i915/i915_pci.c > +++ b/drivers/gpu/drm/i915/i915_pci.c > @@ -426,6 +426,7 @@ static const struct intel_device_info intel_cherryview_info __initconst = { > .platform = INTEL_SKYLAKE, \ > .has_csr = 1, \ > .has_guc = 1, \ > + .has_ipc = 1, \ > .ddb_size = 896 > > static const struct intel_device_info intel_skylake_gt1_info __initconst = { > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 52c4c194aa51..ede871b7982e 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -5828,6 +5828,12 @@ void intel_enable_ipc(struct drm_i915_private *dev_priv) > { > u32 val; > > + /* Display WA #0477 WaDisableIPC: skl */ > + if (IS_SKYLAKE(dev_priv)) { > + dev_priv->ipc_enabled = false; > + return; > + } > + looks good to me. Reviewed-by: Mahesh Kumar -Mahesh > val = I915_READ(DISP_ARB_CTL2); > > if (dev_priv->ipc_enabled) --------------9F92459242D6E4BF06984E59 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi,


On Friday 29 September 2017 12:21 AM, Rodrigo Vivi wrote:
According to Spec for SKL+: "Isochronous Priority Control.
If enabled, Display sends demoted requests once the transition
watermark is reached. If transition watermark is not enabled,
Display sends demoted requests when the display buffer is full."

The commit 'e57f1c02155f ("drm/i915/gen9+: Add has_ipc flag in
device info structure")' introduced that as gen9+ but missing many
SKL Skus.

I believe the reason for that is Spec also mentions workarounds for
SKL-ALL: "IPC (Isoch Priority Control) may cause underflows
WA: Do not enable IPC in register ARB_CTL2"
yes, it was intentional as you correctly pointed out WA #0477.

It seems lame to add the feature and forever disable it,
but it will avoid a mistake of enabling it when we are reorganizing
the feature definitions on i915_pci.c later.
sounds Good,

It will also allow us to probably extend that workaround for
other platforms.

Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index da60866b6628..df751a152057 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -426,6 +426,7 @@ static const struct intel_device_info intel_cherryview_info __initconst = {
 	.platform = INTEL_SKYLAKE, \
 	.has_csr = 1, \
 	.has_guc = 1, \
+	.has_ipc = 1, \
 	.ddb_size = 896
 
 static const struct intel_device_info intel_skylake_gt1_info __initconst = {
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 52c4c194aa51..ede871b7982e 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5828,6 +5828,12 @@ void intel_enable_ipc(struct drm_i915_private *dev_priv)
 {
 	u32 val;
 
+	/* Display WA #0477 WaDisableIPC: skl */
+	if (IS_SKYLAKE(dev_priv)) {
+		dev_priv->ipc_enabled = false;
+		return;
+	}
+
looks good to me.
Reviewed-by: Mahesh Kumar <mahesh1.kumar@intel.com>
-Mahesh
 	val = I915_READ(DISP_ARB_CTL2);
 
 	if (dev_priv->ipc_enabled)

--------------9F92459242D6E4BF06984E59-- --===============0430095891== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0430095891==--