]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Rename bw_state to new_bw_state
authorStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Thu, 23 Apr 2020 07:59:00 +0000 (10:59 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 4 May 2020 15:44:52 +0000 (18:44 +0300)
That is a preparation patch before next one where we
introduce old_bw_state and a bunch of other changes
as well.
In a review comment it was suggested to split out
at least that renaming into a separate patch, what
is done here.

v2: Removed spurious space

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200423075902.21892-8-stanislav.lisovskiy@intel.com
drivers/gpu/drm/i915/display/intel_bw.c

index 4aa54fcb0629b89f08e9b8031b914ef09f023277..6e7cc3a4f1aa42d60bfef0161eedd81fbb7c2363 100644 (file)
@@ -414,7 +414,7 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
 {
        struct drm_i915_private *dev_priv = to_i915(state->base.dev);
        struct intel_crtc_state *new_crtc_state, *old_crtc_state;
-       struct intel_bw_state *bw_state = NULL;
+       struct intel_bw_state *new_bw_state = NULL;
        unsigned int data_rate, max_data_rate;
        unsigned int num_active_planes;
        struct intel_crtc *crtc;
@@ -443,29 +443,29 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
                    old_active_planes == new_active_planes)
                        continue;
 
-               bw_state  = intel_atomic_get_bw_state(state);
-               if (IS_ERR(bw_state))
-                       return PTR_ERR(bw_state);
+               new_bw_state = intel_atomic_get_bw_state(state);
+               if (IS_ERR(new_bw_state))
+                       return PTR_ERR(new_bw_state);
 
-               bw_state->data_rate[crtc->pipe] = new_data_rate;
-               bw_state->num_active_planes[crtc->pipe] = new_active_planes;
+               new_bw_state->data_rate[crtc->pipe] = new_data_rate;
+               new_bw_state->num_active_planes[crtc->pipe] = new_active_planes;
 
                drm_dbg_kms(&dev_priv->drm,
                            "pipe %c data rate %u num active planes %u\n",
                            pipe_name(crtc->pipe),
-                           bw_state->data_rate[crtc->pipe],
-                           bw_state->num_active_planes[crtc->pipe]);
+                           new_bw_state->data_rate[crtc->pipe],
+                           new_bw_state->num_active_planes[crtc->pipe]);
        }
 
-       if (!bw_state)
+       if (!new_bw_state)
                return 0;
 
-       ret = intel_atomic_lock_global_state(&bw_state->base);
+       ret = intel_atomic_lock_global_state(&new_bw_state->base);
        if (ret)
                return ret;
 
-       data_rate = intel_bw_data_rate(dev_priv, bw_state);
-       num_active_planes = intel_bw_num_active_planes(dev_priv, bw_state);
+       data_rate = intel_bw_data_rate(dev_priv, new_bw_state);
+       num_active_planes = intel_bw_num_active_planes(dev_priv, new_bw_state);
 
        max_data_rate = intel_max_data_rate(dev_priv, num_active_planes);