Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Luca Coelho <luciano.coelho@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 01/15] drm/i915/display: convert audio workaround to new framework
Date: Fri, 13 Feb 2026 06:54:58 +0200	[thread overview]
Message-ID: <aY6uooHNa6cfXAOr@intel.com> (raw)
In-Reply-To: <20260212184737.352515-2-luciano.coelho@intel.com>

On Thu, Feb 12, 2026 at 08:45:59PM +0200, Luca Coelho wrote:
> Convert the low-hanging fruits of workaround checks to the workaround
> framework.  Instead of having display structure checks for the
> workarounds all over, concentrate the checks in intel_wa.c.
> 
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_audio.c      | 16 +++-------------
>  drivers/gpu/drm/i915/display/intel_display_wa.c |  4 ++++
>  drivers/gpu/drm/i915/display/intel_display_wa.h |  1 +
>  3 files changed, 8 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
> index 5f3c175afdd2..be4b5dbd36fe 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.c
> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
> @@ -37,6 +37,7 @@
>  #include "intel_crtc.h"
>  #include "intel_de.h"
>  #include "intel_display_types.h"
> +#include "intel_display_wa.h"
>  #include "intel_lpe_audio.h"
>  
>  /**
> @@ -184,17 +185,6 @@ static const struct hdmi_aud_ncts hdmi_aud_ncts_36bpp[] = {
>  	{ 192000, TMDS_445_5M, 20480, 371250 },
>  };
>  
> -/*
> - * WA_14020863754: Implement Audio Workaround
> - * Corner case with Min Hblank Fix can cause audio hang

We are now losing the description of the problem. Not great.
Not that the description here is super clear, but at least it
gives me some idea what this is about.

Perhaps such descriptions should remain with the implementation?

> - */
> -static bool needs_wa_14020863754(struct intel_display *display)
> -{
> -	return DISPLAY_VERx100(display) == 3000 ||
> -		DISPLAY_VERx100(display) == 2000 ||
> -		DISPLAY_VERx100(display) == 1401;
> -}
> -
>  /* get AUD_CONFIG_PIXEL_CLOCK_HDMI_* value for mode */
>  static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_state)
>  {
> @@ -440,7 +430,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder,
>  	intel_de_rmw(display, HSW_AUD_PIN_ELD_CP_VLD,
>  		     AUDIO_OUTPUT_ENABLE(cpu_transcoder), 0);
>  
> -	if (needs_wa_14020863754(display))
> +	if (intel_display_wa(display, 14020863754))

This thing is still a major disaster. There is no way to get from
here to the list of affected platforms without jumping through crazy
hoops.

At the very least the intel_display_wa() macro magic needs to die
and this should just take the enum directly. Then I could at least
jump to places where said enum value is used fairly quickly with
cscope.

>  		intel_de_rmw(display, AUD_CHICKENBIT_REG3, DACBE_DISABLE_MIN_HBLANK_FIX, 0);
>  
>  	intel_audio_sdp_split_update(old_crtc_state, false);
> @@ -572,7 +562,7 @@ static void hsw_audio_codec_enable(struct intel_encoder *encoder,
>  
>  	intel_audio_sdp_split_update(crtc_state, true);
>  
> -	if (needs_wa_14020863754(display))
> +	if (intel_display_wa(display, 14020863754))
>  		intel_de_rmw(display, AUD_CHICKENBIT_REG3, 0, DACBE_DISABLE_MIN_HBLANK_FIX);
>  
>  	/* Enable audio presence detect */
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c
> index c2ccdca2c2f3..99ccc383ee70 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c
> @@ -74,6 +74,10 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
>  			DISPLAY_VERx100(display) == 3500;
>  	case INTEL_DISPLAY_WA_14011503117:
>  		return DISPLAY_VER(display) == 13;
> +	case INTEL_DISPLAY_WA_14020863754:
> +		return DISPLAY_VERx100(display) == 3000 ||
> +			DISPLAY_VERx100(display) == 2000 ||
> +			DISPLAY_VERx100(display) == 1401;
>  	case INTEL_DISPLAY_WA_14025769978:
>  		return DISPLAY_VER(display) == 35;
>  	case INTEL_DISPLAY_WA_15018326506:
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h
> index 767420d5f406..bb1382148b6e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h
> @@ -29,6 +29,7 @@ bool intel_display_needs_wa_16023588340(struct intel_display *display);
>  enum intel_display_wa {
>  	INTEL_DISPLAY_WA_13012396614,
>  	INTEL_DISPLAY_WA_14011503117,
> +	INTEL_DISPLAY_WA_14020863754,
>  	INTEL_DISPLAY_WA_14025769978,
>  	INTEL_DISPLAY_WA_15018326506,
>  	INTEL_DISPLAY_WA_16023588340,
> -- 
> 2.51.0

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-02-13  4:55 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 18:45 [PATCH v2 00/15] drm/i915/display: convert a bunch of W/A checks to the new framework Luca Coelho
2026-02-12 18:45 ` [PATCH v2 01/15] drm/i915/display: convert audio workaround to " Luca Coelho
2026-02-13  4:54   ` Ville Syrjälä [this message]
2026-02-13  7:36     ` Luca Coelho
2026-02-12 18:46 ` [PATCH v2 02/15] drm/i915/display: convert W/As in intel_display_power.c " Luca Coelho
2026-02-12 18:46 ` [PATCH v2 03/15] drm/i915/display: convert W/As in intel_cdclk.c " Luca Coelho
2026-02-13  8:44   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 04/15] drm/i915/display: convert W/As in intel_cursor.c " Luca Coelho
2026-02-13  8:42   ` Kandpal, Suraj
2026-02-13  9:17     ` Luca Coelho
2026-02-12 18:46 ` [PATCH v2 05/15] drm/i915/display: convert W/As in intel_ddi.c " Luca Coelho
2026-02-13  8:39   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 06/15] drm/i915/display: convert W/As in intel_display.c " Luca Coelho
2026-02-13  8:38   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 07/15] drm/i915/display: convert W/As in intel_display_device.c " Luca Coelho
2026-02-13  8:29   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 08/15] drm/i915/display: convert W/As in intel_dp_mst.c " Luca Coelho
2026-02-13  8:36   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 09/15] drm/i915/display: convert W/As in intel_fbc.c " Luca Coelho
2026-02-13  8:32   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 10/15] drm/i915/display: convert W/As in intel_flipq.c " Luca Coelho
2026-02-13  8:26   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 11/15] drm/i915/display: convert W/As in intel_modeset_setup.c " Luca Coelho
2026-02-13  5:04   ` Ville Syrjälä
2026-02-13  8:04     ` Luca Coelho
2026-02-13  8:24       ` Kandpal, Suraj
2026-02-13  9:19         ` Luca Coelho
2026-02-12 18:46 ` [PATCH v2 12/15] drm/i915/display: convert W/As in intel_pmdemand.c " Luca Coelho
2026-02-13  8:20   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 13/15] drm/i915/display: convert W/As in intel_psr.c " Luca Coelho
2026-02-13  5:09   ` Ville Syrjälä
2026-02-13  8:11     ` Luca Coelho
2026-02-12 18:46 ` [PATCH v2 14/15] drm/i915/display: convert W/As in skl_universal_plane.c " Luca Coelho
2026-02-13  8:18   ` Kandpal, Suraj
2026-02-12 18:46 ` [PATCH v2 15/15] drm/i915/display: convert W/As in skl_watermark.c " Luca Coelho
2026-02-13  4:26   ` Kandpal, Suraj
2026-02-12 18:58 ` ✓ CI.KUnit: success for drm/i915/display: convert a bunch of W/A checks to the " Patchwork
2026-02-12 19:13 ` ✗ CI.checksparse: warning " Patchwork
2026-02-12 19:33 ` ✓ Xe.CI.BAT: 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=aY6uooHNa6cfXAOr@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=luciano.coelho@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