From: Ville Syrjälä Date: Fri, 7 Mar 2014 16:32:10 +0000 (+0200) Subject: drm/i915: Skip watermark merging for inactive pipes X-Git-Tag: firefly_0821_release~176^2~3773^2~63^2~34 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fe392efdae2982243e3a560b8f41c8e4c89b5d51;p=firefly-linux-kernel-4.4.55.git drm/i915: Skip watermark merging for inactive pipes 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ä Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 855c01b2b0c1..c0c0390dd52a 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -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;