summaryrefslogtreecommitdiff
path: root/hw/xfree86/drivers
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-09-25 16:18:22 -0700
committerAdam Jackson <ajax@redhat.com>2017-10-04 14:38:07 -0400
commit5571318f22f17883e26977a4c72e1e46d17bdf5d (patch)
treec4edb8e288be09a79bcf9717b82086091c68379f /hw/xfree86/drivers
parent787655d5df0c8c43e5e424af3e6e35b8daf54a7d (diff)
modesetting: Skip no-longer-present connectors when resetting BAD links
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. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 37f4e7651a2fd51efa613a08a1e705553be33e76)
Diffstat (limited to 'hw/xfree86/drivers')
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 6236fb0b6..53e1cf545 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2298,9 +2298,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
*/