intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Deak, Imre" <imre.deak@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/adlp: Add workaround to disable CMTG clock gating
Date: Tue, 27 Jul 2021 17:23:02 +0000	[thread overview]
Message-ID: <79fd3f479c9829cfd0f0c7d8e0392e2043cfe8c3.camel@intel.com> (raw)
In-Reply-To: <20210727134400.101290-1-imre.deak@intel.com>

On Tue, 2021-07-27 at 16:44 +0300, Imre Deak wrote:
> The driver doesn't depend atm on the common mode timing generator
> functionality (it would be used for some power saving feature and panel
> timing synchronization), however DMC will corrupt the CMTG registers
> across DC5 entry/exit sequences unless the CMTG clock gating is
> disabled. This in turn can lead to at least the DPLL0/1 configuration
> getting stuck at their last state, which means we can't reprogram them
> to a new config.
> 
> Add the corresponding Bspec workaround to prevent the above.
> 
> Cc: Uma Shankar <uma.shankar@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Cc: Anshuman Gupta <anshuman.gupta@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 18 ++++++++++++++++++
>  drivers/gpu/drm/i915/i915_reg.h              |  3 +++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index bb0aebcc3ecd3..474d723a37454 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -13198,6 +13198,24 @@ static void intel_early_display_was(struct drm_i915_private *dev_priv)
>  			     KBL_ARB_FILL_SPARE_13 | KBL_ARB_FILL_SPARE_14,
>  			     KBL_ARB_FILL_SPARE_14);
>  	}
> +
> +	if (IS_ADLP_DISPLAY_STEP(dev_priv, STEP_A0, STEP_B0)) {
> +		uint32_t val;

Fixing style errors pointed by bot.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> +
> +		/*
> +		 * Wa_16011069516:adl-p[a0]
> +		 *
> +		 * All CMTG regs are unreliable until CMTG clock gating is
> +		 * disabled, so we can only assume the default CMTG_CHICKEN
> +		 * reg value and sanity check this assumption with a double
> +		 * read, which presumably returns the correct value even with
> +		 * clock gating on.
> +		 */
> +		val = intel_de_read(dev_priv, TRANS_CMTG_CHICKEN);
> +		val = intel_de_read(dev_priv, TRANS_CMTG_CHICKEN);
> +		intel_de_write(dev_priv, TRANS_CMTG_CHICKEN, DISABLE_DPT_CLK_GATING);
> +		drm_WARN_ON(&dev_priv->drm, val &~ DISABLE_DPT_CLK_GATING);
> +	}
>  }
>  
>  static void ibx_sanitize_pch_hdmi_port(struct drm_i915_private *dev_priv,
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index c41f9083e2338..e02bd75dd1064 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -10208,6 +10208,9 @@ enum skl_power_gate {
>  #define  PORT_SYNC_MODE_MASTER_SELECT_MASK	REG_GENMASK(2, 0)
>  #define  PORT_SYNC_MODE_MASTER_SELECT(x)	REG_FIELD_PREP(PORT_SYNC_MODE_MASTER_SELECT_MASK, (x))
>  
> +#define TRANS_CMTG_CHICKEN		_MMIO(0x6fa90)
> +#define  DISABLE_DPT_CLK_GATING		REG_BIT(1)
> +
>  /* DisplayPort Transport Control */
>  #define _DP_TP_CTL_A			0x64040
>  #define _DP_TP_CTL_B			0x64140

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-07-27 17:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 13:44 [Intel-gfx] [PATCH] drm/i915/adlp: Add workaround to disable CMTG clock gating Imre Deak
2021-07-27 14:43 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-07-27 15:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-07-27 17:23 ` Souza, Jose [this message]
2021-07-27 22:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-28 13:34   ` Imre Deak
2021-07-28 15:59     ` Vudum, Lakshminarayana
2021-07-28 15:43 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=79fd3f479c9829cfd0f0c7d8e0392e2043cfe8c3.camel@intel.com \
    --to=jose.souza@intel.com \
    --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 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).