From patchwork Thu Feb 3 22:10:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Torvalds X-Patchwork-Id: 81729 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id AC971B70EA for ; Fri, 4 Feb 2011 09:11:44 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060Ab1BCWLR (ORCPT ); Thu, 3 Feb 2011 17:11:17 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:44081 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540Ab1BCWLP (ORCPT ); Thu, 3 Feb 2011 17:11:15 -0500 Received: from mail-iy0-f174.google.com (mail-iy0-f174.google.com [209.85.210.174]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p13MBDxt018462 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL); Thu, 3 Feb 2011 14:11:13 -0800 Received: by iyj18 with SMTP id 18so1535481iyj.19 for ; Thu, 03 Feb 2011 14:11:11 -0800 (PST) Received: by 10.231.145.68 with SMTP id c4mr12283335ibv.47.1296771071201; Thu, 03 Feb 2011 14:11:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.191.213 with HTTP; Thu, 3 Feb 2011 14:10:51 -0800 (PST) In-Reply-To: References: <201102032009.17100.rjw@sisk.pl> From: Linus Torvalds Date: Thu, 3 Feb 2011 14:10:51 -0800 Message-ID: Subject: Re: 2.6.38-rc3-git1: Reported regressions 2.6.36 -> 2.6.37 To: Carlos Mafra , Keith Packard , Dave Airlie Cc: "Rafael J. Wysocki" , Takashi Iwai , Linux Kernel Mailing List , Maciej Rutecki , Florian Mickler , Andrew Morton , Kernel Testers List , Network Development , Linux ACPI , Linux PM List , Linux SCSI List , Linux Wireless List , DRI X-Spam-Status: No, hits=-102.974 required=5 tests=AWL, BAYES_00, USER_IN_WHITELIST X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 3, 2011 at 1:56 PM, Carlos Mafra wrote: >> >> I added https://bugzilla.kernel.org/show_bug.cgi?id=24982 to the list of >> post-2.6.36 regressions for further tracking. > > I also tested on 2.6.38-rc3+ now and the issue is not solved, > just like Takashi expected. Hmm. That commit (bf9dc102e284) still reverts cleanly. Keith, Dave, should we just revert it? It's definitely a regression, and we do _not_ allow "fixes" to one thing that just causes a regression to another. Quite frankly, I think it's totally wrong to just blindly set DPMS status to ON like that. It's as wrong as it was to leave it off, and the regressions reported are basically mirror images of the exact same bug that that commit tried to fix. IOW, the commit message says: When setting a new crtc configuration, force the DPMS state of all connectors to ON. Otherwise, they'll be left at OFF and a future mode set that disables the specified connector will not turn the connector off. but setting it to ON doesn't actually _fix_ anything, because you just get the exact same issue in reverse, ie you just get .. and a future mode set that ENables the specified connector will not turn the connector ON. instead. Which is exactly what Carlos and Takashi are reporting. Maybe the right thing to do is to set it to 'unknown', something like this. TOTALLY UNTESTED! Linus drivers/gpu/drm/drm_crtc_helper.c | 6 +++--- include/drm/drm_mode.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 952b3d4..7f585ed 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -681,11 +681,11 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) goto fail; } } - DRM_DEBUG_KMS("Setting connector DPMS state to on\n"); + DRM_DEBUG_KMS("Setting connector DPMS state to 'unknown'\n"); for (i = 0; i < set->num_connectors; i++) { - DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id, + DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS 'unknown'\n", set->connectors[i]->base.id, drm_get_connector_name(set->connectors[i])); - set->connectors[i]->dpms = DRM_MODE_DPMS_ON; + set->connectors[i]->dpms = DRM_MODE_DPMS_UNKNOWN; } kfree(save_connectors); diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 0fc7397..4b5144c 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h @@ -59,6 +59,7 @@ /* DPMS flags */ /* bit compatible with the xorg definitions. */ +#define DRM_MODE_DPMS_UNKNOWN (-1) #define DRM_MODE_DPMS_ON 0 #define DRM_MODE_DPMS_STANDBY 1 #define DRM_MODE_DPMS_SUSPEND 2