[Intel-gfx] [PATCH] drm/i915: Pretend cursor is always on for ILK-style WM calculations (v2)

Matt Roper matthew.d.roper at intel.com
Thu Feb 11 16:12:11 CET 2016


On Thu, Feb 11, 2016 at 09:50:45AM +0100, Daniel Vetter wrote:
> On Wed, Feb 03, 2016 at 06:05:01AM -0800, Matt Roper wrote:
> > On Wed, Feb 03, 2016 at 01:16:38PM +0200, Ville Syrjälä wrote:
> > > On Tue, Feb 02, 2016 at 10:06:51PM -0800, Matt Roper wrote:
> > > > Due to our lack of two-step watermark programming, our driver has
> > > > historically pretended that the cursor plane is always on for the
> > > > purpose of watermark calculations; this helps avoid serious flickering
> > > > when the cursor turns off/on (e.g., when the user moves the mouse
> > > > pointer to a different screen).  That workaround was accidentally
> > > > dropped as we started working toward atomic watermark updates.  Since we
> > > > still aren't quite there yet with two-stage updates, we need to
> > > > resurrect the workaround and treat the cursor as always active.
> > > > 
> > > > v2: Tweak cursor width calculations slightly to more closely match the
> > > >     logic we used before the atomic overhaul began.  (Ville)
> > > > 
> > > > Cc: simdev11 at outlook.com
> > > > Cc: manfred.kitzbichler at gmail.com
> > > > Reported-by: simdev11 at outlook.com
> > > > Reported-by: manfred.kitzbichler at gmail.com
> > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93892
> > > > Fixes: 43d59eda1 ("drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2)")
> > > > Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_pm.c | 15 ++++++++++-----
> > > >  1 file changed, 10 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > > > index 31bc4ea..5888632 100644
> > > > --- a/drivers/gpu/drm/i915/intel_pm.c
> > > > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > > > @@ -1799,16 +1799,21 @@ static uint32_t ilk_compute_cur_wm(const struct intel_crtc_state *cstate,
> > > >  				   const struct intel_plane_state *pstate,
> > > >  				   uint32_t mem_value)
> > > >  {
> > > > -	int cpp = pstate->base.fb ?
> > > > -		drm_format_plane_cpp(pstate->base.fb->pixel_format, 0) : 0;
> > > > +	/*
> > > > +	 * We treat the cursor plane as always-on for the purposes of watermark
> > > > +	 * calculation.  Until we have two-stage watermark programming merged,
> > > > +	 * this is necessary to avoid flickering.
> > > > +	 */
> > > > +	int cpp = 4;
> > > > +	int width = pstate->visible ? pstate->base.crtc_w : 64;
> > > >  
> > > > -	if (!cstate->base.active || !pstate->visible)
> > > > +	if (!cstate->base.active)
> > > >  		return 0;
> > > >  
> > > > +
> > > 
> > > Stray whitespace.
> > > 
> > > Otherwise lgtm
> > > Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > Whitespace fixed and pushed to dinq.  Also added a Cc: for -fixes since
> > this is relevant to 4.5.
> > 
> > Thanks for the review.
> 
> Hm, I don't see the CI result for v2 of this patch anywhere. Is my mailer
> lossy?
> -Daniel

Looks like they were here:

https://lists.freedesktop.org/archives/intel-gfx/2016-February/086953.html


Matt



> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795


More information about the Intel-gfx mailing list