[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [RFC xserver 4/4] modesetting: Treat inactive outputs as disconnected during PreInit
From:       Adam Jackson <ajax () nwnk ! net>
Date:       2015-10-30 14:34:32
Message-ID: 1446215672.30268.31.camel () nwnk ! net
[Download RAW message or body]

On Thu, 2015-10-29 at 14:58 +0100, Daniel Martin wrote:

> @@ -868,6 +868,14 @@ drmmode_output_detect(xf86OutputPtr output)
>      switch (drmmode_output->mode_output->connection) {
>      case DRM_MODE_CONNECTED:
>          status = XF86OutputStatusConnected;
> +
> +        /* During PreInit (!configured), we shouldn't try to setup an output
> +         * where the kernel didn't assigned an encoder yet. Because, if we
> +         * fail to set it up at this point to server will exit. Treat it as
> +         * disconnected for the moment. */
> +        if (!output->scrn->configured &&
> +            !drmmode_output->mode_output->encoder_id)
> +            status = XF86OutputStatusDisconnected;
>          break;
>      case DRM_MODE_DISCONNECTED:
>          status = XF86OutputStatusDisconnected;

I think to be screechingly correct this check should go above the
switch. Even for "connected" outputs in the HPD sense you'd still want
to ignore things without an encoder, and I think doing that check
before the switch means we'd inherit exactly the set of lit outputs
from before X startup, which would be nice.  Does your lid-closed
scenario still work correctly if you do that?

- ajax
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic