From patchwork Fri Sep 28 07:27:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 1517991 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id E8431DF283 for ; Fri, 28 Sep 2012 09:36:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B0186A09DE for ; Fri, 28 Sep 2012 02:36:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 532D09E93D for ; Fri, 28 Sep 2012 00:27:29 -0700 (PDT) Received: by oagl10 with SMTP id l10so2862812oag.36 for ; Fri, 28 Sep 2012 00:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=Dj/Pgh8im8TjTrMXZIZu25f+6sPfLrIXaSHEY4imzQY=; b=VGk6y5a7wiFlj0hmBivJaK77ZD6cPtAWLX28vcXxHUuLruS0vdUZVdS10uTRcwNLAS dysOSLqM1AnvMJUfxIBUyIO8oTaUt6hXxp6XbGxiM+KHoIVdIpdoDU3SbhiNefnYRrf5 vvPnJQRGFujta3Y8mohCCgG1/mzIXxXYtn8ZBIuQvy5knKoZxshCFb7DvaLx4G9v99mr BdDEcmZjV3yvLsIp40m/3VLVlCpJyW4TZfkl8DUhRS+a1p+tAg/ng7FNV7XDupMY/ufD Uk15QbymY5bg2sca3RlGDkRlmPMF+tUBqmFQ4vns/+LKwWPbcWVe5Wxpq1sZDN1lzitk +6Gg== Received: by 10.60.14.5 with SMTP id l5mr5314940oec.39.1348817248609; Fri, 28 Sep 2012 00:27:28 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id r3sm6085081oef.2.2012.09.28.00.27.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 00:27:27 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: call connector->dpms(OFF) when disabling Date: Fri, 28 Sep 2012 09:27:18 +0200 Message-Id: <1348817238-30228-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 Cc: Rob Clark , rogerq@ti.com, patches@linaro.org 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 From: Rob Clark When disabling unused connectors, be sure to call connector->dpms(OFF), so if there is actually some IP to turn off (such as external bridge chips, etc), these actually do get turned off. Signed-off-by: Rob Clark Tested-by: Roger Quadros NACKed-by: Daniel Vetter --- drivers/gpu/drm/drm_crtc_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 3252e70..000cda4 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -244,16 +244,16 @@ void drm_helper_disable_unused_functions(struct drm_device *dev) 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; + if (!connector->encoder) + connector->funcs->dpms(connector, DRM_MODE_DPMS_OFF); } list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { if (!drm_helper_encoder_in_use(encoder)) { drm_encoder_disable(encoder); - /* disconnector encoder from any connector */ + /* disconnect encoder from any connector */ encoder->crtc = NULL; } }