I think your ilk_wm_method2 is busted. Method 2 should always give more than one full line, making this 1 line redundant. -----Original Message----- From: Daniel Vetter [mailto:daniel.vetter@xxxxxxxx] Sent: Monday, March 02, 2015 9:09 AM To: Intel Graphics Development; Runyan, Arthur J Cc: Daniel Vetter; Ville Syrjälä; Roper, Matthew D; Paulo Zanoni; Vetter, Daniel Subject: Re: [PATCH] drm/i915: Fix big cursors on snb Forgotten to cc Art as fyi. -Daniel On Mon, Mar 2, 2015 at 5:35 PM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote: > My snb seemed somewhat unhappy with 256x256 cursors and failed all the > relevant kms_cursor_crc subtests sporadically, including logging cpu > fifo underruns. Smaller cursor work perfectly with a failure rate at > least 1000x less (got bored after running tests for days). > > After some playing around with impressive hammers Ville suggested to > increase the watermarks to at least cover a full cursor line. It seems > to work thus far. This means that for lp wms we now required 1/4th of > the fifo for 256 wide cursors, and much less on gen7+. Hence fetches > should still be nice&big. Therefore I expect very little power impact > and decided to just do this everywhere, even though I've only seen > this on my snb laptop. Especially since Ville is thinking about > similar changes for the gmch wm code. skl separate wm code and also > completely new plane hw, so hopefully isn't affected. > > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Cc: Matt Roper <matthew.d.roper@xxxxxxxxx> > Cc: Paulo Zanoni <przanoni@xxxxxxxxx> > Testcase: igt/kms_cursor_crc/*-256x256-* > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_pm.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 7dcb5b60600b..7e97a30bd6c0 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm[Art] /i915/intel_pm.c > @@ -1449,14 +1449,21 @@ static uint32_t ilk_compute_spr_wm(const struct ilk_pipe_wm_parameters *params, > static uint32_t ilk_compute_cur_wm(const struct ilk_pipe_wm_parameters *params, > uint32_t mem_value) > { > + uint32_t line_wm, method2; > + > if (!params->active || !params->cur.enabled) > return 0; > > - return ilk_wm_method2(params->pixel_rate, > - params->pipe_htotal, > - params->cur.horiz_pixels, > - params->cur.bytes_per_pixel, > - mem_value); > + /* HACK: Big cursors tend to underrun, load at least one line. */ > + line_wm = params->cur.horiz_pixels * params->cur.bytes_per_pixel / 64; > + > + method2 = ilk_wm_method2(params->pixel_rate, > + params->pipe_htotal, > + params->cur.horiz_pixels, > + params->cur.bytes_per_pixel, > + mem_value); > + > + return max(line_wm, method2); > } > > /* Only for WM_LP. */ > -- > 1.9.3 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx