[Intel-gfx] [PATCH 16/16] drm/i915: Don't disable LP1+ watermarks for every frame when scaled
Paulo Zanoni
przanoni at gmail.com
Wed Jun 4 20:49:00 CEST 2014
2014-05-22 11:48 GMT-03:00 <ville.syrjala at linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> If we mark the LP1+ watermarks as disabled every time sprite scaling
> is enabled, we end doing pointless work applying watermarks even though
> nothing has changed. This is an artifact of the way
> dev_priv->wm.lp_disabled affects the operation of
> ilk_setup_pending_watermarks(). If the current pipe is included in
> dev_priv->wm.lp_disabled, ilk_setup_pending_watermarks() will not check
> if the watermarks actually changed since it will assume it will need to
> disable LP1+ watermarks anyway.
>
> A quick fix is to just check if sprite scaling was enabled for the
> previous plane update, and if so, we know that LP1+ watermarks must
> already be disabled. It might be better in long run to attempt to
> change the way the LP1+ disable tracking integrates with the rest of
> the watermark update mechanism. But this seems like a simple enough
> solution for now.
I agree. Adding TODO a comment somewhere describing the possible
improvement wouldn't hurt either.
With or without that: Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index ea1f990..0365ea6 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3180,7 +3180,8 @@ static int ilk_update_sprite_wm(struct intel_plane *plane,
> * primary only and sprite only configurations. Otherwise the screen
> * flashes black. No underrun reported though.
> */
> - if (IS_IVYBRIDGE(dev) && config->spr.scaled && ilk_disable_lp_wm(crtc))
> + if (IS_IVYBRIDGE(dev) && !params.spr.scaled &&
> + config->spr.scaled && ilk_disable_lp_wm(crtc))
> intel_wait_for_vblank(dev, plane->pipe);
> else if (config->pri.enabled != config->spr.enabled &&
> config->pri.enabled != params.pri.enabled &&
> --
> 1.8.5.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Paulo Zanoni
More information about the Intel-gfx
mailing list