Re: [PATCH 8/9] drm/i915: Don't pass pipe_wm around so much

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 12, 2019 at 10:58:43PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> {skl,icl}_build_plane_wm() don't need to be passed the pipe_wm, so
> don't. And skl_build_pipe_wm() can easily dig it out itself.
> 
> Cc: Neel Desai <neel.desai@xxxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Reviewed-by: Matt Roper <matthew.d.roper@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 18 +++++++-----------
>  1 file changed, 7 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b958a1a00014..80e964f7de58 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5017,8 +5017,7 @@ static int skl_build_plane_wm_uv(struct intel_crtc_state *crtc_state,
>  	return 0;
>  }
>  
> -static int skl_build_plane_wm(struct skl_pipe_wm *pipe_wm,
> -			      struct intel_crtc_state *crtc_state,
> +static int skl_build_plane_wm(struct intel_crtc_state *crtc_state,
>  			      const struct intel_plane_state *plane_state)
>  {
>  	struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
> @@ -5044,8 +5043,7 @@ static int skl_build_plane_wm(struct skl_pipe_wm *pipe_wm,
>  	return 0;
>  }
>  
> -static int icl_build_plane_wm(struct skl_pipe_wm *pipe_wm,
> -			      struct intel_crtc_state *crtc_state,
> +static int icl_build_plane_wm(struct intel_crtc_state *crtc_state,
>  			      const struct intel_plane_state *plane_state)
>  {
>  	enum plane_id plane_id = to_intel_plane(plane_state->base.plane)->id;
> @@ -5082,10 +5080,10 @@ static int icl_build_plane_wm(struct skl_pipe_wm *pipe_wm,
>  	return 0;
>  }
>  
> -static int skl_build_pipe_wm(struct intel_crtc_state *cstate,
> -			     struct skl_pipe_wm *pipe_wm)
> +static int skl_build_pipe_wm(struct intel_crtc_state *cstate)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(cstate->base.crtc->dev);
> +	struct skl_pipe_wm *pipe_wm = &cstate->wm.skl.optimal;
>  	struct drm_crtc_state *crtc_state = &cstate->base;
>  	struct drm_plane *plane;
>  	const struct drm_plane_state *pstate;
> @@ -5102,11 +5100,9 @@ static int skl_build_pipe_wm(struct intel_crtc_state *cstate,
>  						to_intel_plane_state(pstate);
>  
>  		if (INTEL_GEN(dev_priv) >= 11)
> -			ret = icl_build_plane_wm(pipe_wm,
> -						 cstate, intel_pstate);
> +			ret = icl_build_plane_wm(cstate, intel_pstate);
>  		else
> -			ret = skl_build_plane_wm(pipe_wm,
> -						 cstate, intel_pstate);
> +			ret = skl_build_plane_wm(cstate, intel_pstate);
>  		if (ret)
>  			return ret;
>  	}
> @@ -5269,7 +5265,7 @@ static int skl_update_pipe_wm(struct intel_crtc_state *cstate,
>  	struct intel_crtc *crtc = to_intel_crtc(cstate->base.crtc);
>  	int ret;
>  
> -	ret = skl_build_pipe_wm(cstate, pipe_wm);
> +	ret = skl_build_pipe_wm(cstate);
>  	if (ret)
>  		return ret;
>  
> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> 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
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux