[RFC v2 1/6] drm/i915/scaler: Add and compute scaling factors

Golani, Mitulkumar Ajitkumar mitulkumar.ajitkumar.golani at intel.com
Mon Jan 6 16:59:01 UTC 2025



> -----Original Message-----
> From: Nautiyal, Ankit K <ankit.k.nautiyal at intel.com>
> Sent: 23 December 2024 13:59
> To: Golani, Mitulkumar Ajitkumar <mitulkumar.ajitkumar.golani at intel.com>;
> intel-gfx at lists.freedesktop.org; intel-xe at lists.freedesktop.org
> Subject: Re: [RFC v2 1/6] drm/i915/scaler: Add and compute scaling factors
> 
> 
> On 12/17/2024 11:37 PM, Mitul Golani wrote:
> > Add scaling factors to scaler_state for a perticular scaler user, use
> > it later to compute scaler prefill latency. Also to extend this when
> > either pipe or plane scaler is in use.
> >
> > Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
> > ---
> >   drivers/gpu/drm/i915/display/intel_display_types.h | 2 ++
> >   drivers/gpu/drm/i915/display/skl_scaler.c          | 3 +++
> >   2 files changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> > b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index b71416ff5b7f..28b2861df42b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -710,6 +710,8 @@ struct intel_initial_plane_config {
> >   struct intel_scaler {
> >   	u32 mode;
> >   	bool in_use;
> > +	int hscale;
> > +	int vscale;
> 
> Probably should fill these in skl_scaler_get_config() and add in
> intel_pipe_config_compare() to compare.
> 
> 
> Regards,

Thanks for the review Ankit,

It seems, we do readout only for pipe during skl_scaler_get_config, where as we are computing hscale and vscale for plane as well. While readout it may create mismatch. 

Wanted to bring for more discussion, I have addressed comments on rest other patches. 

Again Thanks.
> 
> Ankit
> 
> 
> >   };
> >
> >   struct intel_crtc_scaler_state {
> > diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c
> b/drivers/gpu/drm/i915/display/skl_scaler.c
> > index 11f73659c1b6..e00c6830ef65 100644
> > --- a/drivers/gpu/drm/i915/display/skl_scaler.c
> > +++ b/drivers/gpu/drm/i915/display/skl_scaler.c
> > @@ -423,6 +423,9 @@ static int intel_atomic_setup_scaler(struct
> intel_crtc_scaler_state *scaler_stat
> >
> >   			return -EINVAL;
> >   		}
> > +
> > +		scaler_state->scalers[*scaler_id].hscale = hscale;
> > +		scaler_state->scalers[*scaler_id].vscale = vscale;
> >   	}
> >
> >   	drm_dbg_kms(display->drm, "Attached scaler id %u.%u to %s:%d\n",


More information about the Intel-gfx mailing list