drm/i915: Skip watermark merging for inactive pipes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Mar 2014 16:32:10 +0000 (18:32 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 9 Apr 2014 12:43:09 +0000 (14:43 +0200)
Even though the inactive pipes should have their watermarks set to all 0
with enable=true, we can possibly shave off a few cycles by completely
skipping the merge procedure for inactive pipes.

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>
drivers/gpu/drm/i915/intel_pm.c

index 855c01b2b0c156cd94608e46e209864902be4a4e..c0c0390dd52a119b013bc67244d6cedba0f3033d 100644 (file)
@@ -2206,8 +2206,11 @@ static void ilk_merge_wm_level(struct drm_device *dev,
        const struct intel_crtc *intel_crtc;
 
        list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, base.head) {
-               const struct intel_wm_level *wm =
-                       &intel_crtc->wm.active.wm[level];
+               const struct intel_pipe_wm *active = &intel_crtc->wm.active;
+               const struct intel_wm_level *wm = &active->wm[level];
+
+               if (!active->pipe_enabled)
+                       continue;
 
                if (!wm->enable)
                        return;