From patchwork Fri Jun 14 22:13:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2725231 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 875459F967 for ; Fri, 14 Jun 2013 22:16:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 984AB20303 for ; Fri, 14 Jun 2013 22:16:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AEA68202F9 for ; Fri, 14 Jun 2013 22:16:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF706E5ED6 for ; Fri, 14 Jun 2013 15:16:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 5724CE5C11 for ; Fri, 14 Jun 2013 15:13:29 -0700 (PDT) Received: by mail-ee0-f51.google.com with SMTP id e52so617063eek.38 for ; Fri, 14 Jun 2013 15:13: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:in-reply-to:references; bh=f2+ogrPPhcPEvzbJMG1mBZXN5+PMvJXJMQdOEkKUlC4=; b=kJMS6HNE/N352/cHiNWRMbUKV4SjBXNAP5M1WoGqcMpsMMqcaa3jCKmGO1dSbpzF2B ljR9+nniHFEprzl0mw6pzwxsvck6fxZS/92PB1T8smIcTfnpep8CpGGaohFLvLxuI/P9 GpXmTpS4uRE+S+Cw6X3SI45fCzy81q9YATaIY= 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:in-reply-to:references :x-gm-message-state; bh=f2+ogrPPhcPEvzbJMG1mBZXN5+PMvJXJMQdOEkKUlC4=; b=NvEM+sUginrEndejTg1Qhr/mNta2mPVq0qhvJlhj0LZqwN5baU18qbKUStswacTg2d 4tuhJnwsvSW0t0JvgphLgXhBHZJBfvnKELfl4zk/bSKQffC2IjLj4q0vSdSyEMgd1xim EhgAaDXL4w59MJ/ncDL6CLSdNB8FXN76KyCieNNedY8LKIuDaOrJdNGkxjGhVlVILDA2 peMzmvo8rkVjKcuPLOULk+/1mdmRQ9b0g6+8gcO7llB2Y4K1rh2yBPI9C44ujd1ydTRN /TSX0QdBV2WurR8EbJ3s88BxlJMCiF9Sr8DLCtsTig/6FEHjegnJYcueFLAglw5LhIuN 1CaQ== X-Received: by 10.15.34.77 with SMTP id d53mr5203904eev.95.1371248008390; Fri, 14 Jun 2013 15:13:28 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id m1sm6258301eex.17.2013.06.14.15.13.27 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Jun 2013 15:13:27 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 4/6] drm/crtc-helper: don't disable disconnected outputs Date: Sat, 15 Jun 2013 00:13:14 +0200 Message-Id: <1371247996-6052-5-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1371247996-6052-1-git-send-email-daniel.vetter@ffwll.ch> References: <1371247996-6052-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQlPnYb0HadVvE/x7mdkchUPctTIzo+yZyZ993YQTOjAHnmABuvgJ55uw5Htl1mszxlW9nkG Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This has originally been added in commit a3a0544b2c84e1d7a2022b558ecf66d8c6a8dd93 Author: Dave Airlie Date: Mon Aug 31 15:16:30 2009 +1000 drm/kms: add explicit encoder disable function and detach harder. I think it's the wrong thing to do for a few reasons: - It's policy in the kernel. Userspace gets hotplug events when an output disconnects, and it can inquire about all the routing that is already set up. If userspace wants to disable a disconnected output it can simply do so itself. - The reason for adding it given in the commit message was to improve use of shared encoders. But the disable_unused_functions call only happens after the modeset has been completed, so it won't help too much in making the modest succeed. - We (at least in drm/i915, but iirc all other drivers work the same) ensure that if the user accidentally yanks the cable and then replugs, the same configuration will keep on working without any userspace actions required. For most outputs that's the case by default, and DP can have the same semantics with a simple re-train handler fired off from the hpd replug event. This breaks it since if the user is unlucky and hits the mouse, resulting in a panning of e.g. the integrated panel that modeset might kill the accidentally yanked output. Which isn't too great. i915 has applied this behaviour change as part of the bit modeset review, thus far without resulting in an angry crowd with pitchforks: commit b0a2658acb5bf9ca86b4aab011b7106de3af0add Author: Daniel Vetter Date: Tue Dec 18 09:37:54 2012 +0100 drm/i915: don't disable disconnected outputs Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_crtc_helper.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 738a429..917c803 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -279,13 +279,6 @@ void drm_helper_disable_unused_functions(struct drm_device *dev) struct drm_connector *connector; struct drm_crtc *crtc; - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - if (!connector->encoder) - continue; - if (connector->status == connector_status_disconnected) - connector->encoder = NULL; - } - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { if (!drm_helper_encoder_in_use(encoder)) { drm_encoder_disable(encoder);