diff options
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index b7a62189..bb29c251 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -854,6 +854,7 @@ const char *output_names[] = { "None", static void drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) { + RADEONInfoPtr info = RADEONPTR(pScrn); xf86OutputPtr output; drmModeConnectorPtr koutput; drmModeEncoderPtr *kencoders = NULL; @@ -861,6 +862,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) drmModePropertyPtr props; char name[32]; int i; + const char *s; koutput = drmModeGetConnector(drmmode->fd, drmmode->mode_res->connectors[num]); if (!koutput) @@ -870,7 +872,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) if (!kencoders) { goto out_free_encoders; } - + for (i = 0; i < koutput->count_encoders; i++) { kencoders[i] = drmModeGetEncoder(drmmode->fd, koutput->encoders[i]); if (!kencoders[i]) { @@ -897,6 +899,11 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1); } + if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) { + if (!RADEONZaphodStringMatches(pScrn, info->IsPrimary, s, name)) + goto out_free_encoders; + } + output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name); if (!output) { goto out_free_encoders; |