drm/i915: Check 5/6 DDB split only when sprites are enabled
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 11 Oct 2013 12:26:26 +0000 (15:26 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Oct 2013 17:01:31 +0000 (19:01 +0200)
Using the 5/6 DDB split make sense only when sprites are enabled.
So check that before we waste any cycles computing the merged
watermarks with the 5/6 DDB split.

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 cdd78f69a28b69349f5fb5be52859edbfd6dd803..8064ff927bccf93755caf7a62debe9fcab5a917b 100644 (file)
@@ -2931,7 +2931,8 @@ static void haswell_update_wm(struct drm_crtc *crtc)
        ilk_wm_merge(dev, &max, &lp_wm_1_2);
 
        /* 5/6 split only in single pipe config on IVB+ */
-       if (INTEL_INFO(dev)->gen >= 7 && config.num_pipes_active == 1) {
+       if (INTEL_INFO(dev)->gen >= 7 &&
+           config.num_pipes_active == 1 && config.sprites_enabled) {
                ilk_compute_wm_maximums(dev, 1, &config, INTEL_DDB_PART_5_6, &max);
                ilk_wm_merge(dev, &max, &lp_wm_5_6);