[Intel-gfx] [PATCH 2/2] drm/i915: Move intel_crtc_disable_noatomic to intel_sanitize_crtc.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Sep 1 03:11:05 PDT 2015


To make it clear it is only called from that function.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 54 ++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 904e900c0d83..eacb911b2636 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6142,33 +6142,6 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
 	intel_update_watermarks(crtc);
 }
 
-static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
-{
-	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-	struct drm_i915_private *dev_priv = to_i915(crtc->dev);
-	enum intel_display_power_domain domain;
-	unsigned long domains;
-
-	if (!intel_crtc->active)
-		return;
-
-	if (to_intel_plane_state(crtc->primary->state)->visible) {
-		unsigned plane_mask = 1 << drm_plane_index(crtc->primary);
-
-		intel_pre_disable_primary(crtc);
-
-		intel_crtc_disable_planes(crtc, plane_mask);
-	}
-
-	dev_priv->display.crtc_disable(crtc);
-	intel_disable_shared_dpll(intel_crtc);
-
-	domains = intel_crtc->enabled_power_domains;
-	for_each_power_domain(domain, domains)
-		intel_display_power_put(dev_priv, domain);
-	intel_crtc->enabled_power_domains = 0;
-}
-
 /*
  * turn all crtc's off, but do not adjust state
  * This has to be paired with a call to intel_modeset_setup_hw_state.
@@ -14826,6 +14799,33 @@ intel_check_plane_mapping(struct intel_crtc *crtc)
 	return true;
 }
 
+static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
+{
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+	struct drm_i915_private *dev_priv = to_i915(crtc->dev);
+	enum intel_display_power_domain domain;
+	unsigned long domains;
+
+	if (!intel_crtc->active)
+		return;
+
+	if (to_intel_plane_state(crtc->primary->state)->visible) {
+		unsigned plane_mask = 1 << drm_plane_index(crtc->primary);
+
+		intel_pre_disable_primary(crtc);
+
+		intel_crtc_disable_planes(crtc, plane_mask);
+	}
+
+	dev_priv->display.crtc_disable(crtc);
+	intel_disable_shared_dpll(intel_crtc);
+
+	domains = intel_crtc->enabled_power_domains;
+	for_each_power_domain(domain, domains)
+		intel_display_power_put(dev_priv, domain);
+	intel_crtc->enabled_power_domains = 0;
+}
+
 static void intel_sanitize_crtc(struct intel_crtc *crtc)
 {
 	struct drm_device *dev = crtc->base.dev;
-- 
2.1.0



More information about the Intel-gfx mailing list