public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/combo_phy: Add Workaround to avoid flicker with HBR3 eDP Panels
Date: Mon, 22 Aug 2022 16:49:58 +0530	[thread overview]
Message-ID: <7f8702c9-d7ea-690c-024c-def4fb03ebf5@intel.com> (raw)
In-Reply-To: <20220810145626.2075839-1-ankit.k.nautiyal@intel.com>

The Bspec:49291 is now changed to reflect that for all platforms the 
DCC_MODE will be programmed to DCC_MODE_SELECT_ONCE,

rather than DCC_MODE_SELECT_CONTINUOUSLY.

I will send new patch for the same.

Regards,

Ankit

On 8/10/2022 8:26 PM, Ankit Nautiyal wrote:
> Wa_22012718247 : When Display PHY is configured in continuous
> DCC calibration mode, the DCC (duty cycle correction) for the clock
> erroneously goes through a state where the DCC code is 0x00 when it is
> supposed to be transitioning from 0x10 to 0x0F. This glitch causes a
> distortion in the clock, which leads to a bit error. The issue is known
> to be causing flickering with eDP HBR3 panels.
>
> The work around configures the DCC in one-time-update mode.
> This mode updates the DCC code one time during training and then
> it does not change.  This will prevent on-the-fly updates so that the
> glitch does not occur.
>
> v2: Added helper function for DCC_MODE (Imre).
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_combo_phy.c   | 16 ++++++++++++++--
>   .../gpu/drm/i915/display/intel_combo_phy_regs.h  |  1 +
>   2 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> index 64890f39c3cc..b3be0e3ca984 100644
> --- a/drivers/gpu/drm/i915/display/intel_combo_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> @@ -226,6 +226,17 @@ static bool phy_is_master(struct drm_i915_private *dev_priv, enum phy phy)
>   	return false;
>   }
>   
> +static u32 tgl_dcc_calibration_mode(struct drm_i915_private *dev_priv)
> +{
> +	/* Wa_22012718247:tgl,adlp,adls */
> +	if (IS_TIGERLAKE(dev_priv) ||
> +	    IS_ALDERLAKE_P(dev_priv) ||
> +	    IS_ALDERLAKE_S(dev_priv))
> +		return DCC_MODE_SELECT_ONCE;
> +
> +	return DCC_MODE_SELECT_CONTINUOSLY;
> +}
> +
>   static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
>   				       enum phy phy)
>   {
> @@ -244,7 +255,7 @@ static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
>   
>   		ret &= check_phy_reg(dev_priv, phy, ICL_PORT_PCS_DW1_LN(0, phy),
>   				     DCC_MODE_SELECT_MASK,
> -				     DCC_MODE_SELECT_CONTINUOSLY);
> +				     tgl_dcc_calibration_mode(dev_priv));
>   	}
>   
>   	ret &= icl_verify_procmon_ref_values(dev_priv, phy);
> @@ -366,8 +377,9 @@ static void icl_combo_phys_init(struct drm_i915_private *dev_priv)
>   			intel_de_write(dev_priv, ICL_PORT_TX_DW8_GRP(phy), val);
>   
>   			val = intel_de_read(dev_priv, ICL_PORT_PCS_DW1_LN(0, phy));
> +
>   			val &= ~DCC_MODE_SELECT_MASK;
> -			val |= DCC_MODE_SELECT_CONTINUOSLY;
> +			val |= tgl_dcc_calibration_mode(dev_priv);
>   			intel_de_write(dev_priv, ICL_PORT_PCS_DW1_GRP(phy), val);
>   		}
>   
> diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy_regs.h b/drivers/gpu/drm/i915/display/intel_combo_phy_regs.h
> index 2ed65193ca19..cf46f13401d1 100644
> --- a/drivers/gpu/drm/i915/display/intel_combo_phy_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_combo_phy_regs.h
> @@ -92,6 +92,7 @@
>   #define ICL_PORT_PCS_DW1_LN(ln, phy)		_MMIO(_ICL_PORT_PCS_DW_LN(1, ln, phy))
>   #define   DCC_MODE_SELECT_MASK			(0x3 << 20)
>   #define   DCC_MODE_SELECT_CONTINUOSLY		(0x3 << 20)
> +#define   DCC_MODE_SELECT_ONCE			(0x0 << 20)
>   #define   COMMON_KEEPER_EN			(1 << 26)
>   #define   LATENCY_OPTIM_MASK			(0x3 << 2)
>   #define   LATENCY_OPTIM_VAL(x)			((x) << 2)

      parent reply	other threads:[~2022-08-22 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 14:56 [Intel-gfx] [PATCH v2] drm/i915/combo_phy: Add Workaround to avoid flicker with HBR3 eDP Panels Ankit Nautiyal
2022-08-10 17:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/combo_phy: Add Workaround to avoid flicker with HBR3 eDP Panels (rev2) Patchwork
2022-08-11  5:51 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-08-22 11:19 ` Nautiyal, Ankit K [this message]

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=7f8702c9-d7ea-690c-024c-def4fb03ebf5@intel.com \
    --to=ankit.k.nautiyal@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