| From 5f64ed228d95234db88f37a9cded69e0c3128568 Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> |
| Date: Fri, 30 Aug 2013 14:30:23 +0300 |
| Subject: drm/i915: Constify some watermark data |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| hsw_pipe_wm_parameters and hsw_wm_maximums typically are read only. Make |
| them const. |
| |
| Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> |
| Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> |
| Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> |
| (cherry picked from commit ac830fe1c3d811db2bef1835b6e0c693bc3b237e) |
| Signed-off-by: Darren Hart <dvhart@linux.intel.com> |
| --- |
| drivers/gpu/drm/i915/intel_pm.c | 20 ++++++++++---------- |
| 1 file changed, 10 insertions(+), 10 deletions(-) |
| |
| diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c |
| index 22ee0e8a3b38..573122b5c9bd 100644 |
| --- a/drivers/gpu/drm/i915/intel_pm.c |
| +++ b/drivers/gpu/drm/i915/intel_pm.c |
| @@ -2205,7 +2205,7 @@ struct intel_wm_config { |
| * For both WM_PIPE and WM_LP. |
| * mem_value must be in 0.1us units. |
| */ |
| -static uint32_t ilk_compute_pri_wm(struct hsw_pipe_wm_parameters *params, |
| +static uint32_t ilk_compute_pri_wm(const struct hsw_pipe_wm_parameters *params, |
| uint32_t mem_value, |
| bool is_lp) |
| { |
| @@ -2234,7 +2234,7 @@ static uint32_t ilk_compute_pri_wm(struct hsw_pipe_wm_parameters *params, |
| * For both WM_PIPE and WM_LP. |
| * mem_value must be in 0.1us units. |
| */ |
| -static uint32_t ilk_compute_spr_wm(struct hsw_pipe_wm_parameters *params, |
| +static uint32_t ilk_compute_spr_wm(const struct hsw_pipe_wm_parameters *params, |
| uint32_t mem_value) |
| { |
| uint32_t method1, method2; |
| @@ -2257,7 +2257,7 @@ static uint32_t ilk_compute_spr_wm(struct hsw_pipe_wm_parameters *params, |
| * For both WM_PIPE and WM_LP. |
| * mem_value must be in 0.1us units. |
| */ |
| -static uint32_t ilk_compute_cur_wm(struct hsw_pipe_wm_parameters *params, |
| +static uint32_t ilk_compute_cur_wm(const struct hsw_pipe_wm_parameters *params, |
| uint32_t mem_value) |
| { |
| if (!params->active || !params->cur.enabled) |
| @@ -2271,7 +2271,7 @@ static uint32_t ilk_compute_cur_wm(struct hsw_pipe_wm_parameters *params, |
| } |
| |
| /* Only for WM_LP. */ |
| -static uint32_t ilk_compute_fbc_wm(struct hsw_pipe_wm_parameters *params, |
| +static uint32_t ilk_compute_fbc_wm(const struct hsw_pipe_wm_parameters *params, |
| uint32_t pri_val) |
| { |
| if (!params->active || !params->pri.enabled) |
| @@ -2422,7 +2422,7 @@ static bool ilk_check_wm(int level, |
| |
| static void ilk_compute_wm_level(struct drm_i915_private *dev_priv, |
| int level, |
| - struct hsw_pipe_wm_parameters *p, |
| + const struct hsw_pipe_wm_parameters *p, |
| struct intel_wm_level *result) |
| { |
| uint16_t pri_latency = dev_priv->wm.pri_latency[level]; |
| @@ -2444,8 +2444,8 @@ static void ilk_compute_wm_level(struct drm_i915_private *dev_priv, |
| } |
| |
| static bool hsw_compute_lp_wm(struct drm_i915_private *dev_priv, |
| - int level, struct hsw_wm_maximums *max, |
| - struct hsw_pipe_wm_parameters *params, |
| + int level, const struct hsw_wm_maximums *max, |
| + const struct hsw_pipe_wm_parameters *params, |
| struct intel_wm_level *result) |
| { |
| enum pipe pipe; |
| @@ -2465,7 +2465,7 @@ static bool hsw_compute_lp_wm(struct drm_i915_private *dev_priv, |
| |
| static uint32_t hsw_compute_wm_pipe(struct drm_i915_private *dev_priv, |
| enum pipe pipe, |
| - struct hsw_pipe_wm_parameters *params) |
| + const struct hsw_pipe_wm_parameters *params) |
| { |
| uint32_t pri_val, cur_val, spr_val; |
| /* WM0 latency values stored in 0.1us units */ |
| @@ -2673,8 +2673,8 @@ static void hsw_compute_wm_parameters(struct drm_device *dev, |
| } |
| |
| static void hsw_compute_wm_results(struct drm_device *dev, |
| - struct hsw_pipe_wm_parameters *params, |
| - struct hsw_wm_maximums *lp_maximums, |
| + const struct hsw_pipe_wm_parameters *params, |
| + const struct hsw_wm_maximums *lp_maximums, |
| struct hsw_wm_values *results) |
| { |
| struct drm_i915_private *dev_priv = dev->dev_private; |
| -- |
| 1.8.5.rc3 |
| |