[Intel-gfx] [PATCH v19 1/8] drm/i915: Start passing latency as parameter

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Mar 10 20:44:19 UTC 2020


On Tue, Mar 10, 2020 at 02:54:12PM +0000, Lisovskiy, Stanislav wrote:
> On Tue, 2020-03-10 at 16:32 +0200, Ville Syrjälä wrote:
> > On Mon, Mar 09, 2020 at 06:11:57PM +0200, Stanislav Lisovskiy wrote:
> > > We need to start passing memory latency as a
> > > parameter when calculating plane wm levels,
> > > as latency can get changed in different
> > > circumstances(for example with or without SAGV).
> > > So we need to be more flexible on that matter.
> > > 
> > > Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_pm.c | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_pm.c
> > > b/drivers/gpu/drm/i915/intel_pm.c
> > > index 8375054ba27d..c7928c870b0a 100644
> > > --- a/drivers/gpu/drm/i915/intel_pm.c
> > > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > > @@ -4016,6 +4016,7 @@ static int skl_compute_wm_params(const struct
> > > intel_crtc_state *crtc_state,
> > >  				 int color_plane);
> > >  static void skl_compute_plane_wm(const struct intel_crtc_state
> > > *crtc_state,
> > >  				 int level,
> > > +				 u32 latency,
> > 
> > So you didn't change the types?
> 
> Yes, I saw your comment there - and looked into this, however I just
> wondered, does it make any sense do to that. The reason is because
> skl_latency is anyway defined as u16 in i915_drv.h, just as pri/spr/cur
> latencies, so wonder how this "unsigned int" going to fit into this. 
> Should I maybe then change it to u16 - at least that would somehow
> comply with the current declarations.

It's u16 in the struct to not waste space. In the code it's just
a number so a sized type doesn't make all that much sense.
And I think most of the code uses int/unsigned int for it anyway.

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list