]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: resurrect panel lid handling
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 Nov 2012 13:50:08 +0000 (14:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 Nov 2012 16:45:05 +0000 (17:45 +0100)
commit1732d071a967e39929d377899ac6d8f841e74f1d
tree5702e3b08ee6bf844278a77b7ff695cf82b39385
parent39c17af4581c9457ca74db5508a72ccc522d4073
drm/i915: resurrect panel lid handling

But disabled by default. This essentially reverts

commit 022fdc59f34296c97d1a91bbd0b47490fdec51b8
Author: Dave Airlie <airlied@redhat.com>
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 cb8353ac28b9472a9d0d28594eac35ea1390e47c
Author: Chris Wilson <chris@chris-wilson.co.uk>
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 <andreas.sturmlechner@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_panel.c