summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-09 15:48:40 +0200
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-09 15:48:40 +0200
commit2618cf2aa8ed76411b943eb90c95869814c2f151 (patch)
tree8c0b2b986e1c36018adcb1a633a176801272171b
parent61b9e79cbeee6f735a4c82ec8a802aee85d8b890 (diff)
More re-org to allow more than 2 outputs
- Move radeon output crtc map into crtc_set_mode - in modeinit, set up all outputs attached to crtc
-rw-r--r--src/radeon_display.c4
-rw-r--r--src/radeon_driver.c18
2 files changed, 19 insertions, 3 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 7d31a526..e79895f3 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -1312,9 +1312,10 @@ Bool RADEONMapControllers(ScrnInfoPtr pScrn)
xf86OutputPtr output;
int o;
+ /*
pRADEONEnt->PortInfo[0]->crtc_num = 1;
pRADEONEnt->PortInfo[1]->crtc_num = 2;
-
+ */
for (o = 0; o < xf86_config->num_output; o++) {
output = xf86_config->output[o];
radeon_output = output->driver_private;
@@ -2251,6 +2252,7 @@ radeon_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
if (output->crtc == crtc) {
montype = radeon_output->MonType;
+ radeon_output->crtc_num = radeon_crtc->crtc_id + 1;
}
}
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 18752449..d05d9f70 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -5420,8 +5420,9 @@ static Bool RADEONInitCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save,
int hsync_start;
int hsync_wid;
int vsync_wid;
+ int i;
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- xf86OutputPtr connector;
+
switch (info->CurrentLayout.pixel_code) {
case 4: format = 1; break;
@@ -5570,11 +5571,17 @@ static Bool RADEONInitCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save,
}
/* get the output connected to this CRTC */
+ for (i = 0; i < RADEON_MAX_CONNECTOR; i++) {
+ if (pRADEONEnt->PortInfo[i]->crtc_num == 1)
+ RADEONInitOutputRegisters(pScrn, save, mode, pRADEONEnt->pOutput[i], 1);
+ }
+#if 0
if (pRADEONEnt->PortInfo[0]->crtc_num == 1) {
RADEONInitOutputRegisters(pScrn, save, mode, pRADEONEnt->pOutput[0], 1);
} else if (pRADEONEnt->PortInfo[1]->crtc_num == 1) {
RADEONInitOutputRegisters(pScrn, save, mode, pRADEONEnt->pOutput[1], 1);
}
+#endif
if (info->IsDellServer) {
save->dac2_cntl = info->SavedReg.dac2_cntl;
@@ -5604,9 +5611,10 @@ static Bool RADEONInitCrtc2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save,
int hsync_start;
int hsync_wid;
int vsync_wid;
-
+ int i;
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
RADEONInfoPtr info0 = NULL;
+
if (info->IsSecondary)
info0 = RADEONPTR(pRADEONEnt->pPrimaryScrn);
@@ -5701,11 +5709,17 @@ static Bool RADEONInitCrtc2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save,
save->fp_v2_sync_strt_wid = save->crtc2_v_sync_strt_wid;
/* get the output connected to this CRTC */
+ for (i = 0; i < RADEON_MAX_CONNECTOR; i++) {
+ if (pRADEONEnt->PortInfo[i]->crtc_num == 2)
+ RADEONInitOutputRegisters(pScrn, save, mode, pRADEONEnt->pOutput[i], 1);
+ }
+#if 0
if (pRADEONEnt->PortInfo[0]->crtc_num == 2) {
RADEONInitOutputRegisters(pScrn, save, mode, pRADEONEnt->pOutput[0], 2);
} else if (pRADEONEnt->PortInfo[1]->crtc_num == 2) {
RADEONInitOutputRegisters(pScrn, save, mode, pRADEONEnt->pOutput[1], 2);
}
+#endif
/* We must set SURFACE_CNTL properly on the second screen too */
save->surface_cntl = 0;