drm/i915: Don't try to calculate relative data rates during hw readout
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 16 May 2016 22:51:58 +0000 (15:51 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 1 Jun 2016 14:32:23 +0000 (07:32 -0700)
We don't actually read out full plane state during driver startup (only
whether the primary plane is enabled/disabled), so all of the src/dest
rectangles are invalid at this point.  However this calculation was
needless anyway since we re-calculate them from scratch on the very
first atomic transaction after boot anyway.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Kumar Mahesh <mahesh1.kumar@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463439121-28974-2-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/intel_pm.c

index b6dfd026495044b60bc0b3ce27470133d19b5325..3cf36dc012c6dc18ba8bacd5dafb2f189ef1134f 100644 (file)
@@ -4046,7 +4046,6 @@ void skl_wm_get_hw_state(struct drm_device *dev)
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct skl_ddb_allocation *ddb = &dev_priv->wm.skl_hw.ddb;
        struct drm_crtc *crtc;
-       struct intel_crtc *intel_crtc;
 
        skl_ddb_get_hw_state(dev_priv, ddb);
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
@@ -4059,23 +4058,6 @@ void skl_wm_get_hw_state(struct drm_device *dev)
                /* Easy/common case; just sanitize DDB now if everything off */
                memset(ddb, 0, sizeof(*ddb));
        }
-
-       /* Calculate plane data rates */
-       for_each_intel_crtc(dev, intel_crtc) {
-               struct intel_crtc_state *cstate = intel_crtc->config;
-               struct intel_plane *intel_plane;
-
-               for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
-                       const struct drm_plane_state *pstate =
-                               intel_plane->base.state;
-                       int id = skl_wm_plane_id(intel_plane);
-
-                       cstate->wm.skl.plane_data_rate[id] =
-                               skl_plane_relative_data_rate(cstate, pstate, 0);
-                       cstate->wm.skl.plane_y_data_rate[id] =
-                               skl_plane_relative_data_rate(cstate, pstate, 1);
-               }
-       }
 }
 
 static void ilk_pipe_wm_get_hw_state(struct drm_crtc *crtc)