diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drmmode_display.c | 20 | ||||
-rw-r--r-- | src/drmmode_display.h | 2 | ||||
-rw-r--r-- | src/radeon_kms.c | 18 |
3 files changed, 15 insertions, 25 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); diff --git a/src/drmmode_display.h b/src/drmmode_display.h index 371ad18e..1576d499 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -74,7 +74,7 @@ typedef struct { } drmmode_output_private_rec, *drmmode_output_private_ptr; -extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, char *driver_name, int cpp, int zaphod_mask); +extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, char *driver_name, int cpp); extern Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr); extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index b4e17594..427004e7 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -367,10 +367,8 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) RADEONInfoPtr info; RADEONEntPtr pRADEONEnt; DevUnion* pPriv; - int zaphod_mask = 0; char *bus_id; Gamma zeros = { 0.0, 0.0, 0.0 }; - const char *s; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONPreInit_KMS\n"); @@ -427,20 +425,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) if (!radeon_alloc_dri(pScrn)) return FALSE; - /* crtc low bits - output high bits */ - zaphod_mask = 0xff; - if (info->IsPrimary) { - if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) - zaphod_mask = 0xfd; - else - zaphod_mask = 0xdd; - } - if (info->IsSecondary) { - if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) - zaphod_mask = 0xf2; - else - zaphod_mask = 0x22; - } info->allowColorTiling = xf86ReturnOptValBool(info->Options, OPTION_COLOR_TILING, FALSE); if (info->ChipFamily >= CHIP_FAMILY_R600) { @@ -451,7 +435,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) "KMS Color Tiling: %sabled\n", info->allowColorTiling ? "en" : "dis"); bus_id = DRICreatePCIBusID(info->PciInfo); - if (drmmode_pre_init(pScrn, &info->drmmode, bus_id, "radeon", pScrn->bitsPerPixel / 8, zaphod_mask) == FALSE) { + if (drmmode_pre_init(pScrn, &info->drmmode, bus_id, "radeon", pScrn->bitsPerPixel / 8) == FALSE) { xfree(bus_id); xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup failed\n"); goto fail; |