Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH v2] drm/i915/ddi: Guard reg_val against a INVALID_TRANSCODER
Date: Fri, 19 Sep 2025 13:27:28 +0300	[thread overview]
Message-ID: <002eef91ca8636d18f6d83482699c59e1e82e02e@intel.com> (raw)
In-Reply-To: <20250908042208.1011144-1-suraj.kandpal@intel.com>

On Mon, 08 Sep 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> Currently we check if the encoder is INVALID or -1 and throw a
> WARN_ON but we still end up writing the temp value which will
> overflow and corrupt the whole programmed value.
>
> --v2
> -Assign a bogus transcoder to master in case we get a INVALID
> TRANSCODER [Jani]
>
> Fixes: 6671c367a9bea ("drm/i915/tgl: Select master transcoder for MST stream")
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 46017091bb0b..f67ce35c1c00 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -596,8 +596,9 @@ intel_ddi_transcoder_func_reg_val_get(struct intel_encoder *encoder,
>  			enum transcoder master;
>  
>  			master = crtc_state->mst_master_transcoder;
> -			drm_WARN_ON(display->drm,
> -				    master == INVALID_TRANSCODER);
> +			if (drm_WARN_ON(display->drm,
> +					master == INVALID_TRANSCODER))
> +				master = TRANSCODER_A;
>  			temp |= TRANS_DDI_MST_TRANSPORT_SELECT(master);
>  		}
>  	} else {

-- 
Jani Nikula, Intel

      parent reply	other threads:[~2025-09-19 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08  4:22 [PATCH v2] drm/i915/ddi: Guard reg_val against a INVALID_TRANSCODER Suraj Kandpal
2025-09-08  4:29 ` ✓ CI.KUnit: success for drm/i915/ddi: Guard reg_val against a INVALID_TRANSCODER (rev2) Patchwork
2025-09-08  5:03 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-08  6:11 ` ✓ Xe.CI.Full: " Patchwork
2025-09-19 10:27 ` Jani Nikula [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=002eef91ca8636d18f6d83482699c59e1e82e02e@intel.com \
    --to=jani.nikula@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@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