On Fri, Dec 21, 2018 at 07:14:28PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <[email protected]>
> 
> On glk+ the level 0 lines watermark actually matters. Do not ignore it.
> And while at it let's change things so that we always program a
> consistnet 0 to the register when the lines watermarks is ignored
> by the hardware.
> 
> Signed-off-by: Ville Syrjälä <[email protected]>

Looks like this just got added to the bspec on Dec 18th, 2018.

Reviewed-by: Matt Roper <[email protected]>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 2a6ffb8b975a..d132ef10fa60 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4675,6 +4675,15 @@ skl_compute_plane_wm_params(const struct 
> intel_crtc_state *cstate,
>       return 0;
>  }
>  
> +static bool skl_wm_has_lines(struct drm_i915_private *dev_priv, int level)
> +{
> +     if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
> +             return true;
> +
> +     /* The number of lines are ignored for the level 0 watermark. */
> +     return level > 0;
> +}
> +
>  static void skl_compute_plane_wm(const struct intel_crtc_state *cstate,
>                                const struct intel_plane_state *intel_pstate,
>                                int level,
> @@ -4757,8 +4766,10 @@ static void skl_compute_plane_wm(const struct 
> intel_crtc_state *cstate,
>               }
>       }
>  
> -     /* The number of lines are ignored for the level 0 watermark. */
> -     if (level > 0 && res_lines > 31)
> +     if (!skl_wm_has_lines(dev_priv, level))
> +             res_lines = 0;
> +
> +     if (res_lines > 31)
>               return;
>  
>       /*
> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to