From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Kumar, Mahesh" <mahesh1.kumar@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/i915/kbl+: Enable IPC only for symmetric memory configurations
Date: Wed, 22 Aug 2018 08:39:47 -0700 [thread overview]
Message-ID: <20180822153947.GB2340@intel.com> (raw)
In-Reply-To: <6deb00cc-2c3b-9df4-f1df-1ed84b4e80fc@intel.com>
On Wed, Aug 22, 2018 at 06:32:33PM +0530, Kumar, Mahesh wrote:
> Hi,
>
>
> On 8/22/2018 12:26 AM, Rodrigo Vivi wrote:
> > On Tue, Aug 21, 2018 at 09:30:21PM +0530, Kumar, Mahesh wrote:
> > > Hi,
> > >
> > >
> > > On 8/21/2018 8:27 PM, Kumar, Mahesh wrote:
> > > > Hi,
> > > >
> > > >
> > > > On 8/17/2018 11:50 PM, Rodrigo Vivi wrote:
> > > > > On Thu, Jul 26, 2018 at 07:44:09PM +0530, Mahesh Kumar wrote:
> > > > > > IPC may cause underflows if not used with dual channel symmetric
> > > > > > memory configuration. Disable IPC for non symmetric configurations in
> > > > > > affected platforms.
> > > > > > Display WA #1141
> > > > > >
> > > > > > Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> > > > > > ---
> > > > > > drivers/gpu/drm/i915/i915_drv.c | 43
> > > > > > ++++++++++++++++++++++++++++++++++++-----
> > > > > > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > > > > > drivers/gpu/drm/i915/intel_pm.c | 2 +-
> > > > > > 3 files changed, 40 insertions(+), 6 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > > > > > b/drivers/gpu/drm/i915/i915_drv.c
> > > > > > index 86bc2e685522..2273664166bc 100644
> > > > > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > > > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > > > > @@ -1141,21 +1141,47 @@ skl_dram_get_channel_info(struct
> > > > > > dram_channel_info *ch, u32 val)
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > > +static bool
> > > > > > +intel_is_dram_ipc_capable(struct drm_i915_private *dev_priv,
> > > > > > + u32 val_ch0, u32 val_ch1,
> > > > > > + struct dram_channel_info *ch0)
> > > > > what about
> > > > > intel_is_dram_symmetric() ?
> > > > sounds good.
> > > > > > +{
> > > > > > + /* Display WA #1141: SKL:all KBL:all CNL:A CNL:B */
> > > > > move this to the wa call, not the the function check...
> > > > >
> > > > > > + if (INTEL_GEN(dev_priv) > 9 &&
> > > > > > + !IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_B0))
> > > > > please don't add CNL pre-prod wa
> > > > ok sure
> > > > > > + return true;
> > > > > > +
> > > > > > + if (!IS_KABYLAKE(dev_priv) && !IS_SKYLAKE(dev_priv))
> > > > > > + return true;
> > > > > actually remove all platforms checks here...
> > > > Agree will remove these checks, function will just return if memory is
> > > > symmetric.
> > > > > > +
> > > > > > + if (val_ch0 != val_ch1)
> > > > > > + return false;
> > > > > > +
> > > > > > + if (ch0->s_info.size == 0)
> > > > > > + return true;
> > > > > > + if (ch0->l_info.size == ch0->s_info.size &&
> > > > > > + ch0->l_info.width == ch0->s_info.width &&
> > > > > > + ch0->l_info.rank == ch0->s_info.rank)
> > > > > > + return true;
> > > > > > +
> > > > > > + return false;
> > > > > return (val_ch0 == val_ch1 && (ch0->s_info.size == 0 ||
> > > > > (ch0->l_info.size == ch0->s_info.size &&
> > > > > ch0->l_info.width == ch0->s_info.width &&
> > > > > ch0->l_info.rank == ch0->s_info.rank)))
> > > > >
> > > > > > +}
> > > > > > +
> > > > > > static int
> > > > > > skl_dram_get_channels_info(struct drm_i915_private *dev_priv)
> > > > > > {
> > > > > > struct dram_info *dram_info = &dev_priv->dram_info;
> > > > > > struct dram_channel_info ch0, ch1;
> > > > > > - u32 val;
> > > > > > + u32 val_ch0, val_ch1;
> > > > > > int ret;
> > > > > >
> > > > > > - val = I915_READ(SKL_MAD_DIMM_CH0_0_0_0_MCHBAR_MCMAIN);
> > > > > > - ret = skl_dram_get_channel_info(&ch0, val);
> > > > > > + val_ch0 = I915_READ(SKL_MAD_DIMM_CH0_0_0_0_MCHBAR_MCMAIN);
> > > > > > + ret = skl_dram_get_channel_info(&ch0, val_ch0);
> > > > > > if (ret == 0)
> > > > > > dram_info->num_channels++;
> > > > > >
> > > > > > - val = I915_READ(SKL_MAD_DIMM_CH1_0_0_0_MCHBAR_MCMAIN);
> > > > > > - ret = skl_dram_get_channel_info(&ch1, val);
> > > > > > + val_ch1 = I915_READ(SKL_MAD_DIMM_CH1_0_0_0_MCHBAR_MCMAIN);
> > > > > > + ret = skl_dram_get_channel_info(&ch1, val_ch1);
> > > > > > if (ret == 0)
> > > > > > dram_info->num_channels++;
> > > > > >
> > > > > > @@ -1185,6 +1211,13 @@ skl_dram_get_channels_info(struct
> > > > > > drm_i915_private *dev_priv)
> > > > > > if (ch0.is_16gb_dimm || ch1.is_16gb_dimm)
> > > > > > dram_info->is_16gb_dimm = true;
> > > > > >
> > > > > > + if (intel_is_dram_ipc_capable(dev_priv, val_ch0, val_ch1, &ch0))
> > > > > > + dev_priv->ipc_capable_mem = true;
> > > > > > + else
> > > > > > + dev_priv->ipc_capable_mem = false;
> > > > > > +
> > > > > > + DRM_DEBUG_KMS("memory configuration is %sIPC capable\n",
> > > > > > + dev_priv->ipc_capable_mem ? "" : "not ");
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.h
> > > > > > b/drivers/gpu/drm/i915/i915_drv.h
> > > > > > index 854f3c828e01..036d6554c017 100644
> > > > > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > > > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > > > > @@ -2112,6 +2112,7 @@ struct drm_i915_private {
> > > > > > bool chv_phy_assert[2];
> > > > > >
> > > > > > bool ipc_enabled;
> > > > > > + bool ipc_capable_mem;
> > > > > I don't think we need to stage this...
> > > > With above changes storing this info is not needed, But we need to keep
> > > > a flag in dram_info to check if "memory is symmetric", Otherwise we need
> > > > to compute all the memory related info again.
> > > >
> > > > -Mahesh
> > > > > > /* Used to save the pipe-to-encoder mapping for audio */
> > > > > > struct intel_encoder *av_enc_map[I915_MAX_PIPES];
> > > > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c
> > > > > > b/drivers/gpu/drm/i915/intel_pm.c
> > > > > > index 2446f53adf21..39e400d5f555 100644
> > > > > > --- a/drivers/gpu/drm/i915/intel_pm.c
> > > > > > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > > > > > @@ -6097,7 +6097,7 @@ void intel_enable_ipc(struct
> > > > > > drm_i915_private *dev_priv)
> > > > > > u32 val;
> > > > > >
> > > > > > /* Display WA #0477 WaDisableIPC: skl */
> > > > > > - if (IS_SKYLAKE(dev_priv)) {
> > > > > > + if (IS_SKYLAKE(dev_priv) || !dev_priv->ipc_capable_mem) {
> > > > > > dev_priv->ipc_enabled = false;
> > > > > This is not the WA 1141 for other platforms than SKL. Please only
> > > > > keep skl here.
> > > > >
> > > > > For the other WA add 4us across all watermark levels
> > > > >
> > > > > /* Display WA #1141: skl,kbl,cfl */
> > > > > if ((IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv)) &&
> > > > > intel_is_dram_symmetric())
> > > > > levels += 4;
> > > Adding 4us in latency is already taken care in skl_compute_plane_wm.
> > > Will handle here, enabling of IPC only if memory is symmetric.
> > But WA1141 describe that we only need to avoid IPC on SKL...
> > not on every gen9... Everywhere else the 4s should be enough.
> >
> > so if the 4us is already in place maybe the patch that we need
> > is to only apply the 4us if memory is symmetric and not skl.
> WA also says enable IPC only if memory is symmetric,
> <KBL WA: When IPC is enabled, watermark latency values must be increased by
> 4us across all levels.
> IPC must be enabled only with dual channel symmetric memory configurations.>
Oh! Indeed. I'm sorry..
so we need something like:
/* Display WA #0477 WaDisableIPC: skl */
/* Display WA #1141: skl,kbl,cfl */
if (IS_SKYLAKE(dev_priv) ||
((IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv)) &&
!intel_is_dram_symmetric())
dev_priv->ipc_enabled = false;
>
> -Mahesh
> >
> > > -Mahesh
> > > > > > return;
> > > > > > }
> > > > > > --
> > > > > > 2.16.2
> > > > > >
> > > > > > _______________________________________________
> > > > > > Intel-gfx mailing list
> > > > > > Intel-gfx@lists.freedesktop.org
> > > > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-08-22 15:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 14:14 [PATCH 0/5] Decode memdev info and bandwidth and implemnt latency WA Mahesh Kumar
2018-07-26 14:14 ` [PATCH 1/5] drm/i915/bxt: Decode memory bandwidth and parameters Mahesh Kumar
2018-08-16 22:29 ` Rodrigo Vivi
2018-08-17 17:43 ` Rodrigo Vivi
2018-08-21 9:53 ` Kumar, Mahesh
2018-08-21 15:12 ` Rodrigo Vivi
2018-07-26 14:14 ` [PATCH 2/5] drm/i915/skl+: " Mahesh Kumar
2018-08-16 22:35 ` Rodrigo Vivi
2018-08-21 10:21 ` Kumar, Mahesh
2018-07-26 14:14 ` [PATCH 3/5] drm/i915: Implement 16GB dimm wa for latency level-0 Mahesh Kumar
2018-07-27 3:51 ` Matt Turner
2018-07-27 6:10 ` Kumar, Mahesh
2018-07-28 5:48 ` Rodrigo Vivi
2018-07-31 14:18 ` Kumar, Mahesh
2018-08-17 17:57 ` Rodrigo Vivi
2018-07-26 14:14 ` [PATCH 4/5] drm/i915/kbl+: Enable IPC only for symmetric memory configurations Mahesh Kumar
2018-08-17 18:20 ` Rodrigo Vivi
2018-08-21 14:57 ` Kumar, Mahesh
2018-08-21 16:00 ` Kumar, Mahesh
2018-08-21 18:56 ` Rodrigo Vivi
2018-08-22 13:02 ` Kumar, Mahesh
2018-08-22 15:39 ` Rodrigo Vivi [this message]
2018-07-26 14:14 ` [PATCH 5/5] drm/i915/skl+: don't trust IPC value set by BIOS Mahesh Kumar
2018-07-26 14:29 ` ✗ Fi.CI.SPARSE: warning for Decode memdev info and bandwidth and implemnt latency WA (rev2) Patchwork
2018-07-26 14:48 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-26 16:09 ` ✓ 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=20180822153947.GB2340@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mahesh1.kumar@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;
as well as URLs for NNTP newsgroup(s).