summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@aura-online.co.uk>2010-02-25 21:13:18 -0500
committerAlex Deucher <alexdeucher@gmail.com>2010-02-25 21:13:18 -0500
commitb499eee7506f7478649e0000e9f8fcd00ac9d88d (patch)
tree758834e129225d7aa97c1cc1a26c660231c180ad /src/drmmode_display.c
parent433c8617341f5768255826435a2b09afba684f02 (diff)
clean up kms zaphod handling
Taken from James patch on bug 24523 agd5f: adapt to the current code
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ed3d9275..7fd57252 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -899,9 +899,16 @@ 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, s, name))
- goto out_free_encoders;
+ if (xf86IsEntityShared(pScrn->entityList[0])) {
+ if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) {
+ if (!RADEONZaphodStringMatches(pScrn, s, name))
+ goto out_free_encoders;
+ } else {
+ if (info->IsPrimary && (num != 0))
+ goto out_free_encoders;
+ else if (info->IsSecondary && (num != 1))
+ goto out_free_encoders;
+ }
}
output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name);
@@ -1143,7 +1150,7 @@ static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
};
-Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, char *driver_name, int cpp, int zaphod_mask)
+Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, char *driver_name, int cpp)
{
xf86CrtcConfigPtr xf86_config;
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
@@ -1178,12 +1185,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, char
xf86CrtcSetSizeRange(pScrn, 320, 200, drmmode->mode_res->max_width, drmmode->mode_res->max_height);
for (i = 0; i < drmmode->mode_res->count_crtcs; i++)
- if ((zaphod_mask & 0xf) & (1 << i))
+ if (!xf86IsEntityShared(pScrn->entityList[0]) || pScrn->confScreen->device->screen == i)
drmmode_crtc_init(pScrn, drmmode, i);
for (i = 0; i < drmmode->mode_res->count_connectors; i++)
- if (((zaphod_mask >> 4) & 0xf) & (1 << i))
- drmmode_output_init(pScrn, drmmode, i);
+ drmmode_output_init(pScrn, drmmode, i);
/* workout clones */
drmmode_clones_init(pScrn, drmmode);