[PATCH xf86-video-ati] modesetting: Skip no-longer-present connectors when resetting BAD links

Deucher, Alexander Alexander.Deucher at amd.com
Fri Oct 20 15:58:14 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Friday, October 20, 2017 11:50 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-ati] modesetting: Skip no-longer-present
> connectors when resetting BAD links
> 
> From: Keith Packard <keithp at keithp.com>
> 
> 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.
> 
> (Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76)
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 167ecfb43..f57c43647 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -2797,9 +2797,12 @@ radeon_mode_hotplug(ScrnInfoPtr scrn,
> drmmode_ptr drmmode)
>  	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.2
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list