All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Grzelak" <michal.grzelak@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "Michał Grzelak" <michal.grzelak@intel.com>,
	intel-gfx@lists.freedesktop.org,
	"Nemesa Garg" <nemesa.garg@intel.com>
Subject: Re: [PATCH v1 06/10] drm/i915/casf: remove id in favor of scaler_id
Date: Sat, 11 Apr 2026 22:04:09 +0200 (CEST)	[thread overview]
Message-ID: <868b4fca-1dd4-244b-e4f7-ce298fe60a64@intel.com> (raw)
In-Reply-To: <adjYa5dEFcDPTD48@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]

On Fri, 10 Apr 2026, Ville Syrjälä wrote:
> On Sat, Mar 28, 2026 at 03:32:08PM +0100, Michał Grzelak wrote:
>> id is not really used anywhere in skl_scaler_get_config(). Replace it
>> with scaler_id.
>>
>> Cc: Nemesa Garg <nemesa.garg@intel.com>
>> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/skl_scaler.c | 9 +++------
>>  1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
>> index 729ef51beeb4..5954f5beb19c 100644
>> --- a/drivers/gpu/drm/i915/display/skl_scaler.c
>> +++ b/drivers/gpu/drm/i915/display/skl_scaler.c
>> @@ -969,7 +969,6 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
>>  	struct intel_display *display = to_intel_display(crtc_state);
>>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
>>  	struct intel_crtc_scaler_state *scaler_state = &crtc_state->scaler_state;
>> -	int id = -1;
>>  	int scaler_id;
>>
>>  	/* find scaler attached to this pipe */
>> @@ -980,10 +979,8 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
>>  		if ((ctl & (PS_SCALER_EN | PS_BINDING_MASK)) != (PS_SCALER_EN | PS_BINDING_PIPE))
>>  			continue;
>>
>> -		id = scaler_id;
>> -
>>  		/* Read CASF regs for second scaler */
>> -		if (HAS_CASF(display) && id == 1)
>> +		if (HAS_CASF(display) && scaler_id == 1)
>>  			intel_casf_sharpness_get_config(crtc_state);
>>
>>  		if (!crtc_state->hw.casf_params.casf_enable)
>> @@ -1003,8 +1000,8 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
>>  		break;
>>  	}
>>
>> -	scaler_state->scaler_id = id;
>> -	if (id >= 0)
>> +	scaler_state->scaler_id = scaler_id;
>> +	if (scaler_id >= 0)
>
> We'll have scaler_id == crtc->num_scalers if the loop
> didn't find a pipe scaler. So this is now a bit busted.

Definitively. Should be addressed in v2.

> Otherwise I think this stuff looks pretty reasonable, but it no longer
> applies since my casf reorganization landed. Please rebase and repost.

Thanks :)

BR,
Michał

>
>>  		scaler_state->scaler_users |= (1 << SKL_CRTC_INDEX);
>>  	else
>>  		scaler_state->scaler_users &= ~(1 << SKL_CRTC_INDEX);
>> --
>> 2.45.2
>
> -- 
> Ville Syrjälä
> Intel
>

  reply	other threads:[~2026-04-11 20:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28 14:32 [PATCH v1 00/10] drm/i915: casf & scaler refactoring Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 01/10] drm/i915/casf: fix comment typos Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 02/10] drm/i915/casf: rename convert_sharpness_coef_binary() Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 03/10] drm/i915/casf: rename t into tap in casf_coeff() Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 04/10] drm/i915/casf: rename sumcoeff into sum_coeff Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 05/10] drm/i915/casf: s/i/scaler_id where appropriate Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 06/10] drm/i915/casf: remove id in favor of scaler_id Michał Grzelak
2026-04-10 11:00   ` Ville Syrjälä
2026-04-11 20:04     ` Michał Grzelak [this message]
2026-03-28 14:32 ` [PATCH v1 07/10] drm/i915/casf: unloop scaler readout that is run once Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 08/10] drm/i915/casf: invert loop's breaking logic Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 09/10] drm/i915/casf: abstract scaler searching loop Michał Grzelak
2026-03-28 14:32 ` [PATCH v1 10/10] drm/i915/casf: eliminate dead code Michał Grzelak
2026-03-28 15:30 ` ✓ i915.CI.BAT: success for drm/i915: casf & scaler refactoring Patchwork
2026-03-29  8:53 ` ✗ 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=868b4fca-1dd4-244b-e4f7-ce298fe60a64@intel.com \
    --to=michal.grzelak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nemesa.garg@intel.com \
    --cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.