From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 1/3] drm/i915/gen9_bc: Work around DMC bug zeroing power well requests
Date: Fri, 9 Nov 2018 17:04:40 +0200 [thread overview]
Message-ID: <20181109150440.GL9144@intel.com> (raw)
In-Reply-To: <20181109145822.15446-1-imre.deak@intel.com>
On Fri, Nov 09, 2018 at 04:58:20PM +0200, Imre Deak wrote:
> A DMC bug on GEN9 big core machines fails to restore the driver's
> request bits for the PW1 and MISC_IO power wells after a DC5/6
> entry->exit sequence. As a consequence the driver's subsequent check for
> the enabled status of these power wells will fail, as the check
> considers the power wells being enabled only if both the status and
> request bits are set. To work around this borrow the request bits from
> BIOS's own request register in which DMC forces on the request bits when
> exiting from DC5/6.
>
> This fixes a problem reported by Ramalingam, where HDCP init failed,
> since PW1 reported itself as being disabled, while in reality it was
> enabled.
>
> Reported-by: Ramalingam C <ramalingam.c@intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/intel_runtime_pm.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index f945db6ea420..9c49b876055d 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -493,11 +493,25 @@ static bool hsw_power_well_enabled(struct drm_i915_private *dev_priv,
> struct i915_power_well *power_well)
> {
> const struct i915_power_well_regs *regs = power_well->desc->hsw.regs;
> + enum i915_power_well_id id = power_well->desc->id;
> int pw_idx = power_well->desc->hsw.idx;
> u32 mask = HSW_PWR_WELL_CTL_REQ(pw_idx) |
> HSW_PWR_WELL_CTL_STATE(pw_idx);
> + u32 val;
> +
> + val = I915_READ(regs->driver);
> +
> + /*
> + * On GEN9 big core due to a DMC bug the driver's request bits for PW1
> + * and the MISC_IO PW will be not restored, so check instead for the
> + * BIOS's own request bits, which are forced-on for these power wells
> + * when exiting DC5/6.
> + */
> + if (IS_GEN9(dev_priv) && !IS_GEN9_LP(dev_priv) &&
IS_GEN9_BC() ?
Apart from that
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> + (id == SKL_DISP_PW_1 || id == SKL_DISP_PW_MISC_IO))
> + val |= I915_READ(regs->bios);
>
> - return (I915_READ(regs->driver) & mask) == mask;
> + return (val & mask) == mask;
> }
>
> static void assert_can_enable_dc9(struct drm_i915_private *dev_priv)
> --
> 2.13.2
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-11-09 15:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 14:58 [PATCH 1/3] drm/i915/gen9_bc: Work around DMC bug zeroing power well requests Imre Deak
2018-11-09 14:58 ` [PATCH 2/3] drm/i915: Use proper bool bitfield initializer in power well descs Imre Deak
2018-11-12 17:12 ` Ville Syrjälä
2018-11-09 14:58 ` [PATCH 3/3] drm/i915: Remove special case for power well 1/MISC_IO state verification Imre Deak
2018-11-12 17:19 ` Ville Syrjälä
2018-11-14 11:43 ` Imre Deak
2018-11-09 15:04 ` Ville Syrjälä [this message]
2018-11-09 17:48 ` [PATCH 1/3] drm/i915/gen9_bc: Work around DMC bug zeroing power well requests Imre Deak
2018-11-09 17:18 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2018-11-10 0:57 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-14 11:55 ` Imre Deak
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=20181109150440.GL9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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.