intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: nemesa.garg@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>,
	Animesh Manna <animesh.manna@intel.com>
Subject: Re: [PATCH] drm/i915/scaler: Fix WA_14011503117
Date: Wed, 06 Aug 2025 11:23:46 +0300	[thread overview]
Message-ID: <652c33a6b7b69e9cfea511a442df9b1280da752c@intel.com> (raw)
In-Reply-To: <06796b24cd8fcaf992601b92dd8261a13546d22d@intel.com>

On Wed, 06 Aug 2025, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 06 Aug 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
>> This introduces and uses a variable id which is just uninitialized.
>> What really needs to be used is the scaler_id.
>>
>> Fixes: 73309ed9d598 ("drm/i915/display: WA_14011503117")
>> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/skl_scaler.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
>> index 1374fa94ff5c..cd7ebbeb9508 100644
>> --- a/drivers/gpu/drm/i915/display/skl_scaler.c
>> +++ b/drivers/gpu/drm/i915/display/skl_scaler.c
>> @@ -959,11 +959,12 @@ void adl_scaler_ecc_unmask(const struct intel_crtc_state *crtc_state)
>>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
>>  	const struct intel_crtc_scaler_state *scaler_state =
>>  		&crtc_state->scaler_state;
>> -	int id;
>>  
>>  	if (!scaler_state && scaler_state->scaler_id == -1)
>
> That check does also does not make any sense.
>
> scaler_state == NULL && scaler_state->scaler_id

So scaler_state can never be NULL. The whole if statement is a
nop. Previously uninitialized stuff got written to the register, and
with the fix -1 can be written to the register.

The fix passed xe CI, but got merged before i915 CI was run. But xe CI
is meaningless here, because the code doesn't get run with xe, only
i915.


BR,
Jani.


>
> BR,
> Jani.
>
>
>>  		return;
>>  
>> -	intel_de_write_fw(display, SKL_PS_ECC_STAT(crtc->pipe, id), 1);
>> +	intel_de_write_fw(display,
>> +			  SKL_PS_ECC_STAT(crtc->pipe, scaler_state->scaler_id),
>> +			  1);
>>  	intel_de_write(display, XELPD_DISPLAY_ERR_FATAL_MASK, 0);
>>  }

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-08-06  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  3:08 [PATCH] drm/i915/scaler: Fix WA_14011503117 Suraj Kandpal
2025-08-06  5:16 ` Garg, Nemesa
2025-08-06  7:25 ` Jani Nikula
2025-08-06  8:23   ` Jani Nikula [this message]
2025-08-06  8:32     ` Kandpal, Suraj
2025-08-06 15:58 ` ✓ i915.CI.BAT: success for " Patchwork
2025-08-06 18:13 ` ✗ i915.CI.Full: failure " 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=652c33a6b7b69e9cfea511a442df9b1280da752c@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=animesh.manna@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=nemesa.garg@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).