[Intel-gfx] [PATCH 05/11] drm/i915: simplify wm->is_planar assignment

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Oct 18 13:34:48 UTC 2018


On Tue, Oct 16, 2018 at 03:01:27PM -0700, Paulo Zanoni wrote:
> We're currently doing it in two different ways, none of them based on
> the wm_params struct. Both places are correct, so I chose to keep the
> one in skl_compute_wm_levels() since it's the function that sets the
> other values for the same struct. But I'm open to better suggestions
> on the place to assign it.

I'm not a huge fan of the entire wm_params thing. Lots of
duplicated infromation for dubious gain. But given that we have
it I think this patch is fine.

Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index d1dd3ae408f9..7fd344b81d66 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4832,8 +4832,7 @@ skl_compute_wm_levels(const struct drm_i915_private *dev_priv,
>  			return ret;
>  	}
>  
> -	if (intel_pstate->base.fb->format->format == DRM_FORMAT_NV12)
> -		wm->is_planar = true;
> +	wm->is_planar = wm_params->is_planar;
>  
>  	return 0;
>  }
> @@ -4972,8 +4971,6 @@ static int skl_build_pipe_wm(struct intel_crtc_state *cstate,
>  
>  		/* uv plane watermarks must also be validated for NV12/Planar */
>  		if (wm_params.is_planar) {
> -			wm->is_planar = true;
> -
>  			ret = skl_compute_plane_wm_params(dev_priv, cstate,
>  							  intel_pstate,
>  							  &wm_params, 1);
> -- 
> 2.14.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list