From patchwork Thu Oct 11 17:46:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1582861 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 7488F3FD9C for ; Thu, 11 Oct 2012 18:56:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7489DA089C for ; Thu, 11 Oct 2012 11:56:24 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id E14D59EFEA for ; Thu, 11 Oct 2012 11:54:28 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hj13so7454657wib.12 for ; Thu, 11 Oct 2012 11:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer; bh=OWRYKccDi4k9Kw9PHBLODtm5i0MIIW193ieL2WQI0R8=; b=MD1Kba92k/oMkGgWob5BtE3M8yL6uJEp3Y8UV5ax3H2bP0tEbwqippve99QXuX5V1r CVayzt+LowgkVwOkgrBG9G1Nnix2vwtSXSlEcKCC2RrB7KS9CgmjvFhVBJ8BTKkhkOvz uQj9JBekODB+x8hIV7JbNHn7PLb7iiATQmBZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=OWRYKccDi4k9Kw9PHBLODtm5i0MIIW193ieL2WQI0R8=; b=I18JCGmUJPbPUdBUto+UW/BPJUE2aRAVStIfJLLTXITsXe7vECKr96igpd6uaZPUA5 nXV5wV1/9fEwF33NxKrwX7jVcexPmRgSBDz4dTCyxfeT5xYim8MUa32/OTXH65dbQuIP BaBOrnhRe9Tsz3ABc/yXxw3MlO6YQXSwoIKpq4YzdxbI1AQsnDTOP+ph3knZcjZa4eX0 beM4KFlXlmNJWAjDOkUMsiJzL2FuiXMEVzb1mBLW3OWJmvZoCqNitY/pmgFSYtOJ7bAy hsKOO6ebHoJBnaOL8HqA1SZ0VR4WiBMlKb6Ely5uPU4hP9ZXt/V6Hfndwfk4opFG/pCZ hHrw== Received: by 10.216.194.38 with SMTP id l38mr1054521wen.80.1349981668496; Thu, 11 Oct 2012 11:54:28 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id b3sm12403wie.0.2012.10.11.11.54.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 11:54:27 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 11 Oct 2012 19:46:27 +0200 Message-Id: <1349977587-7534-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.2 X-Gm-Message-State: ALoCoQmDtN62pFOhm3stkAU8yVM2w7vuqV38KC/+kSevZHsbVvEjLo4YOxbUmnf0xBCFDgOs7Rf1 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: don't disable disconnected outputs X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org This piece of neat lore has been ported painstakingly and bug-for-bug compatible from the old crtc helper code. Imo it's utter nonsense. If you have disconnect a cable and before you reconnect it, userspace (or the kernel) does an set_crtc call, this will result in that connector getting disable. Which will result in a nice black screen when plugging in the cable again. There's absolutely no reason the kernel does such policy changes - if userspace tries to set up a mode on something disconnected we might fail loudly (since the dp link training fails), but silently adjusting the output configuration behind userspace's back is a recipe for disaster. Specifically I think that this could explain some of our MI_WAIT hangs around suspend, where userspace issues a scanline wait on a disable pipe. This mechanisims here could explain how that pipe got disabled without userspace noticing. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f84fb2e..d469b42 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7319,10 +7319,6 @@ intel_modeset_stage_output_state(struct drm_device *dev, DRM_DEBUG_KMS("encoder changed, full mode switch\n"); config->mode_changed = true; } - - /* Disable all disconnected encoders. */ - if (connector->base.status == connector_status_disconnected) - connector->new_encoder = NULL; } /* connector->new_encoder is now updated for all connectors. */