That is the connector_type, connector_type_id and path_blob. We'll identify a connector using this information later, as the output_id is unreliable.
Signed-off-by: Daniel Martin <consume.no...@gmail.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 10 +++++++--- hw/xfree86/drivers/modesetting/drmmode_display.h | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 537b2b2c0..b6835572a 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -1355,6 +1355,7 @@ drmmode_output_destroy(xf86OutputPtr output) int i; drmModeFreePropertyBlob(drmmode_output->edid_blob); + drmModeFreePropertyBlob(drmmode_output->path_blob); drmModeFreePropertyBlob(drmmode_output->tile_blob); for (i = 0; i < drmmode_output->num_props; i++) { @@ -1728,9 +1729,6 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r drmmode_create_name(pScrn, koutput, name, path_blob); - if (path_blob) - drmModeFreePropertyBlob(path_blob); - if (path_blob && dynamic) { /* see if we have an output with this name already and hook stuff up */ @@ -1742,6 +1740,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r drmmode_output = output->driver_private; drmmode_output->output_id = mode_res->connectors[num]; + + drmModeFreePropertyBlob(path_blob); return 1; } } @@ -1782,8 +1782,11 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r } drmmode_output->output_id = mode_res->connectors[num]; + drmmode_output->connector_type = koutput->connector_type; + drmmode_output->connector_type_id = koutput->connector_type_id; drmmode_output->num_encoders = koutput->count_encoders; drmmode_output->mode_encoders = kencoders; + drmmode_output->path_blob = path_blob; drmmode_output->drmmode = drmmode; output->mm_width = koutput->mmWidth; output->mm_height = koutput->mmHeight; @@ -1816,6 +1819,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r free(kencoders); } drmModeFreeConnector(koutput); + drmModeFreePropertyBlob(path_blob); return 0; } diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h b/hw/xfree86/drivers/modesetting/drmmode_display.h index b146e717a..9b5407709 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.h +++ b/hw/xfree86/drivers/modesetting/drmmode_display.h @@ -129,9 +129,12 @@ typedef struct { typedef struct { drmmode_ptr drmmode; int output_id; + int connector_type; + int connector_type_id; int num_encoders; drmModeEncoderPtr *mode_encoders; drmModePropertyBlobPtr edid_blob; + drmModePropertyBlobPtr path_blob; drmModePropertyBlobPtr tile_blob; int dpms_enum_id; int num_props; -- 2.13.6 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel