From: Imre Deak <imre.deak@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: "Runyan, Arthur J" <arthur.j.runyan@intel.com>
Subject: Re: [PATCH 3/4] drm/i915/gen9: Extend dmc debug mask to include cores
Date: Thu, 18 Feb 2016 17:34:55 +0200 [thread overview]
Message-ID: <1455809695.7638.9.camel@intel.com> (raw)
In-Reply-To: <1455808874-22089-4-git-send-email-mika.kuoppala@intel.com>
On to, 2016-02-18 at 17:21 +0200, Mika Kuoppala wrote:
> Cores need to be included into the debug mask. We don't exactly
> know what it does but the spec says it must be enabled. So obey.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 1 +
> drivers/gpu/drm/i915/intel_runtime_pm.c | 14 ++++++++------
> 2 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h
> index 3774870477c1..f76cbf3e5d1e 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -7568,6 +7568,7 @@ enum skl_disp_power_wells {
> #define DC_STATE_EN_UPTO_DC5_DC6_MASK 0x3
>
> #define DC_STATE_DEBUG _MMIO(0x45520)
> +#define DC_STATE_DEBUG_MASK_CORES (1<<0)
> #define DC_STATE_DEBUG_MASK_MEMORY_UP (1<<1)
>
> /* Please see hsw_read_dcomp() and hsw_write_dcomp() before using
> this register,
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index cb91540cfbad..1b490c7e4020 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -456,15 +456,17 @@ static void assert_can_disable_dc9(struct
> drm_i915_private *dev_priv)
> */
> }
>
> -static void gen9_set_dc_state_debugmask_memory_up(
> - struct drm_i915_private *dev_priv)
> +static void gen9_set_dc_state_debugmask(struct drm_i915_private
> *dev_priv)
> {
> - uint32_t val;
> + uint32_t val, mask;
> +
> + mask = DC_STATE_DEBUG_MASK_MEMORY_UP |
> + DC_STATE_DEBUG_MASK_CORES;
The BSpec "Sequence to Allow DC5 or DC6" requires this only for BXT
(looks like a recent addition to work around something), but it doesn't
say it's needed for other platforms. The register description doesn't
make a difference though.
Perhaps Art has more info on this, adding him.
>
> /* The below bit doesn't need to be cleared ever afterwards
> */
> val = I915_READ(DC_STATE_DEBUG);
> - if (!(val & DC_STATE_DEBUG_MASK_MEMORY_UP)) {
> - val |= DC_STATE_DEBUG_MASK_MEMORY_UP;
> + if ((val & mask) != mask) {
> + val |= mask;
> I915_WRITE(DC_STATE_DEBUG, val);
> POSTING_READ(DC_STATE_DEBUG);
> }
> @@ -525,7 +527,7 @@ static void gen9_set_dc_state(struct
> drm_i915_private *dev_priv, uint32_t state)
> state = DC_STATE_EN_UPTO_DC5;
>
> if (state & DC_STATE_EN_UPTO_DC5_DC6_MASK)
> - gen9_set_dc_state_debugmask_memory_up(dev_priv);
> + gen9_set_dc_state_debugmask(dev_priv);
>
> val = I915_READ(DC_STATE_EN);
> DRM_DEBUG_KMS("Setting DC state from %02x to %02x\n",
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-02-18 15:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 15:21 [PATCH 0/4] gen9 dmc state harderning Mika Kuoppala
2016-02-18 15:21 ` [PATCH 1/4] drm/i915/gen9: Check for DC state mismatch Mika Kuoppala
2016-02-18 15:21 ` [PATCH 2/4] drm/i915/gen9: Verify and enforce dc6 state writes Mika Kuoppala
2016-02-18 15:42 ` Imre Deak
2016-02-18 15:52 ` Mika Kuoppala
2016-02-18 15:58 ` Mika Kuoppala
2016-02-18 15:21 ` [PATCH 3/4] drm/i915/gen9: Extend dmc debug mask to include cores Mika Kuoppala
2016-02-18 15:34 ` Imre Deak [this message]
2016-02-18 23:43 ` Runyan, Arthur J
2016-02-19 10:26 ` Mika Kuoppala
2016-02-19 10:34 ` Imre Deak
2016-02-18 15:21 ` [PATCH 4/4] drm/i915/gen9: Write dc state debugmask bits only once Mika Kuoppala
2016-02-18 15:46 ` Imre Deak
2016-02-19 11:35 ` ✗ Fi.CI.BAT: failure for gen9 dmc state harderning (rev3) Patchwork
2016-02-22 15:13 ` Imre Deak
2016-02-22 15:26 ` Imre Deak
2016-02-19 13:29 ` ✗ Fi.CI.BAT: failure for gen9 dmc state harderning (rev2) 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=1455809695.7638.9.camel@intel.com \
--to=imre.deak@intel.com \
--cc=arthur.j.runyan@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.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.