From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: resurrect panel lid handling Date: Tue, 20 Nov 2012 13:59:14 +0000 Message-ID: References: <1353094469-13163-1-git-send-email-daniel.vetter@ffwll.ch> <1353419408-30767-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 302B7E6221 for ; Tue, 20 Nov 2012 05:59:18 -0800 (PST) In-Reply-To: <1353419408-30767-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Tue, 20 Nov 2012 14:50:08 +0100, Daniel Vetter wrote: > But disabled by default. This essentially reverts > > commit bcd5023c961a44c7149936553b6929b2b233dd27 > Author: Dave Airlie > Date: Mon Mar 14 14:17:55 2011 +1000 > > drm/i915: disable opregion lid detection for now > > but leaves the autodetect mode disabled. There's also the explicit lid > status option added in > > commit fca874092597ef946b8f07031d8c31c58b212144 > Author: Chris Wilson > Date: Thu Feb 17 13:44:48 2011 +0000 > > drm/i915: Add a module parameter to ignore lid status > > Which overloaded the meaning for the panel_ignore_lid parameter even > more. To fix up this mess, give the non-negative numbers 0,1 the > original meaning back and use negative numbers to force a given state. > So now we have > > 1 - disable autodetect, return unknown > 0 - enable autodetect > -1 - force to disconnected/lid closed > -2 - force to connected/lid open > > v2: My C programmer license has been revoked ... > > v3: Beautify the code a bit, as suggested by Chris Wilson. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27622 > Tested-by: Andreas Sturmlechner > Signed-off-by: Daniel Vetter One day, I would like for lid state detection to be default, but as always the hw manufacturers conspire against us. Out of curiousity, Dave does your HP 2540p work yet? Reviewed-by: Chris Wilson (You could lose the enclosing { } around the single line statement.) -Chris -- Chris Wilson, Intel Open Source Technology Centre