diff mbox

[45/58] drm/i915: remove crtc disabling special case

Message ID 1345403595-9678-46-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State Accepted
Headers show

Commit Message

Daniel Vetter Aug. 19, 2012, 7:13 p.m. UTC
Originally this has been introduced in

commit 6eebd6bb5f1ea04f04019e5c39f87a0f17ffb472
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Nov 28 21:10:05 2011 +0000

    drm: Fix lack of CRTC disable for drm_crtc_helper_set_config(.fb=NULL)

With the improvements of the output state staging and no longer
overwriting crtc->fb before the hw state is updated we can now handle
crtc disabling as part of the normal modeset sequence.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 25 -------------------------
 1 file changed, 25 deletions(-)

Comments

Jesse Barnes Sept. 5, 2012, 5:56 p.m. UTC | #1
On Sun, 19 Aug 2012 21:13:02 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> Originally this has been introduced in
> 
> commit 6eebd6bb5f1ea04f04019e5c39f87a0f17ffb472
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Mon Nov 28 21:10:05 2011 +0000
> 
>     drm: Fix lack of CRTC disable for drm_crtc_helper_set_config(.fb=NULL)
> 
> With the improvements of the output state staging and no longer
> overwriting crtc->fb before the hw state is updated we can now handle
> crtc disabling as part of the normal modeset sequence.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index cd3606c..4e72119 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6585,30 +6585,6 @@  static bool intel_encoder_crtc_ok(struct drm_encoder *encoder,
 	return false;
 }
 
-static int
-intel_crtc_helper_disable(struct drm_crtc *crtc)
-{
-	struct drm_device *dev = crtc->dev;
-	struct drm_connector *connector;
-	struct drm_encoder *encoder;
-
-	/* Decouple all encoders and their attached connectors from this crtc */
-	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
-		if (encoder->crtc != crtc)
-			continue;
-
-		list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-			if (connector->encoder != encoder)
-				continue;
-
-			connector->encoder = NULL;
-		}
-	}
-
-	drm_helper_disable_unused_functions(dev);
-	return 0;
-}
-
 static void
 intel_crtc_prepare_encoders(struct drm_device *dev)
 {
@@ -7015,7 +6991,6 @@  static int intel_crtc_set_config(struct drm_mode_set *set)
 				(int)set->num_connectors, set->x, set->y);
 	} else {
 		DRM_DEBUG_KMS("[CRTC:%d] [NOFB]\n", set->crtc->base.id);
-		return intel_crtc_helper_disable(set->crtc);
 	}
 
 	dev = set->crtc->dev;