Re: [PATCH 01/12] drm/i915: Ignore initial lid state for eDP

Ville Syrjälä
2016-07-28T16:48:42Z

On Thu, Jul 28, 2016 at 05:36:27PM +0100, Chris Wilson wrote:
> On Thu, Jul 28, 2016 at 07:01:29PM +0300, Ville Syrjälä wrote:
> > On Thu, Jul 28, 2016 at 04:47:07PM +0100, Chris Wilson wrote:
> > > On Thu, Jul 28, 2016 at 05:50:37PM +0300, ville.syrjala@linux.intel.com wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > Currently we try to check the lid status to see whether eDP is connected
> > > > or not. However we ignore the result anyway, and we have no lid notifier
> > > > to fire off uevents, so let's just ignore the lid stuff for eDP
> > > > entirely.
> > >
> > > You mean the OpRegion no longer contains lid_state? I don't see it being
> > > disabled... The lid notifier is from acpi/button.c. I haven't looked at
> > > why the result would be ignored, but you haven't convinced me why eDP is
> > > special.
> >
> > We don't register a lid notifier for eDP. So if the initial detect would
> > happen with lid closed we'd mark eDP as disconnected, and when the lid
> > gets opened we won't even notice, and thus the connector never becomes
> > connected.
>
> That was meant to be part of the intel_panel so that we have consistent
> behaviour on any laptop. I would still rather we have consistent
> behaviour, but eDP has been different for so long that any change now is
> going to be painful.
>
> > IIRC on my ILK the lid state in OpRegion didn't work anyway. But I
> > should probably double check.
>
> Yup, the lid button was unreliable as every other piece of hw. Looking
> at intel_lid_notify(), would it not be easier just to send the hotplug
> uevent.

I thought the main point of the lid notifier was to restore any state
trampled by the VBIOS. I've been hoping that I'd find some magic thing
to get the VBIOS to not do that. IIRC there are some semi-interesting
looking things in OpRegion that might just do it. But to know for sure
I'd first have to get my hands on a machine that suffers from this
affliction.

--
Ville Syrjälä
Intel OTC