[PATCH xserver] modesetting: Skip no-longer-present connectors when resetting BAD links

Manasi Navare manasi.d.navare at intel.com
Tue Sep 26 01:24:52 UTC 2017


On Mon, Sep 25, 2017 at 04:18:22PM -0700, Keith Packard wrote:
> Outputs may have NULL mode_output (connector) pointers if the
> connector disappears while the server is running. Skip these when
> resetting outputs with BAD link status.
>

Thanks for the patch. Does this take care of the cases where
MST monitors might get unplugged, but not generate the
hotplug event?

Manasi
 
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  hw/xfree86/drivers/modesetting/drmmode_display.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index fec7ac276..1c99dd9f9 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -2278,9 +2278,12 @@ drmmode_handle_uevents(int fd, void *closure)
>      for (i = 0; i < config->num_output; i++) {
>          xf86OutputPtr output = config->output[i];
>          drmmode_output_private_ptr drmmode_output = output->driver_private;
> -        uint32_t con_id = drmmode_output->mode_output->connector_id;
> +        uint32_t con_id;
>          drmModeConnectorPtr koutput;
>  
> +        if (drmmode_output->mode_output == NULL)
> +            continue;
> +        con_id = drmmode_output->mode_output->connector_id;
>          /* Get an updated view of the properties for the current connector and
>           * look for the link-status property
>           */
> -- 
> 2.14.1
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list