diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-02-17 12:22:48 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-02-17 12:34:53 -0500 |
commit | 579cdcf9b4e38c791a497b747a055fc0a07d8dd6 (patch) | |
tree | ecb395794693564fcc77a9d77c2ab62777241f84 /src/drmmode_display.c | |
parent | 47136fa347d1756523239746b4c74cd5278a1118 (diff) |
radeon: add ZaphodHeads option
Allows users that want to use zaphod mode to select
which xrandr outputs are assigned to which head. E.g.,
Option "ZaphodHeads" "LVDS,VGA-0"
will assign LVDS to the first zaphod driver instance
and VGA-0 to the second instance.
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; |