[Intel-gfx] [PATCH 13/24] drm/i915: Refactor ilk_update_wm

Paulo Zanoni przanoni at gmail.com
Wed Apr 23 23:31:13 CEST 2014


2014-03-07 13:32 GMT-03:00  <ville.syrjala at linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Split ilk_update_wm() into two parts; one doing the progragramming
> and the other the calculations.

There are 1.060 google results for the word "progragramming", which
you used above :)
Sounds like one of those words that have some special funny meaning.

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 | 38 ++++++++++++++++++++++----------------
>  1 file changed, 22 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index e142095..3f5c1dc 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2696,27 +2696,14 @@ static bool ilk_disable_lp_wm(struct drm_device *dev)
>         return _ilk_disable_lp_wm(dev_priv, WM_DIRTY_LP_ALL);
>  }
>
> -static void ilk_update_wm(struct drm_crtc *crtc)
> +static void ilk_program_watermarks(struct drm_device *dev)
>  {
> -       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> -       struct drm_device *dev = crtc->dev;
>         struct drm_i915_private *dev_priv = dev->dev_private;
> +       struct intel_pipe_wm lp_wm_1_2 = {}, lp_wm_5_6 = {}, *best_lp_wm;
>         struct ilk_wm_maximums max;
> -       struct ilk_pipe_wm_parameters params = {};
> +       struct intel_wm_config config = {};
>         struct ilk_wm_values results = {};
>         enum intel_ddb_partitioning partitioning;
> -       struct intel_pipe_wm pipe_wm = {};
> -       struct intel_pipe_wm lp_wm_1_2 = {}, lp_wm_5_6 = {}, *best_lp_wm;
> -       struct intel_wm_config config = {};
> -
> -       ilk_compute_wm_parameters(crtc, &params);
> -
> -       intel_compute_pipe_wm(crtc, &params, &pipe_wm);
> -
> -       if (!memcmp(&intel_crtc->wm.active, &pipe_wm, sizeof(pipe_wm)))
> -               return;
> -
> -       intel_crtc->wm.active = pipe_wm;
>
>         ilk_compute_wm_config(dev, &config);
>
> @@ -2742,6 +2729,25 @@ static void ilk_update_wm(struct drm_crtc *crtc)
>         ilk_write_wm_values(dev_priv, &results);
>  }
>
> +static void ilk_update_wm(struct drm_crtc *crtc)
> +{
> +       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> +       struct drm_device *dev = crtc->dev;
> +       struct ilk_pipe_wm_parameters params = {};
> +       struct intel_pipe_wm pipe_wm = {};
> +
> +       ilk_compute_wm_parameters(crtc, &params);
> +
> +       intel_compute_pipe_wm(crtc, &params, &pipe_wm);
> +
> +       if (!memcmp(&intel_crtc->wm.active, &pipe_wm, sizeof(pipe_wm)))
> +               return;
> +
> +       intel_crtc->wm.active = pipe_wm;
> +
> +       ilk_program_watermarks(dev);
> +}
> +
>  static void ilk_update_sprite_wm(struct drm_plane *plane,
>                                      struct drm_crtc *crtc,
>                                      uint32_t sprite_width, int pixel_size,
> --
> 1.8.3.2
>
> _______________________________________________
> 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