summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-11-12 15:59:02 +1100
committerDave Airlie <airlied@linux.ie>2006-11-12 15:59:02 +1100
commitd0828804aec0852afaca44ee41c4792edc40dbb4 (patch)
tree28a25ba5bbdb9a143f6ac378b4a7ef7da7f98e18
parent78061ca460c9d6fd338ccf273bbfa152f471622e (diff)
add initial controller binding, remove uses of mergedfb test
-rw-r--r--src/radeon_display.c21
-rw-r--r--src/radeon_driver.c12
-rw-r--r--src/radeon_probe.h1
3 files changed, 20 insertions, 14 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c
index e2d895d..63b804e 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -1347,14 +1347,17 @@ Bool RADEONMapControllers(ScrnInfoPtr pScrn)
if(info->HasCRTC2) {
if(info->IsSecondary) {
+ pRADEONEnt->Controller[1].binding = 2;
info->DisplayType = pRADEONEnt->Controller[1].pPort->MonType;
pScrn->monitor->DDC = pRADEONEnt->Controller[1].pPort->MonInfo;
} else {
+ pRADEONEnt->Controller[1].binding = 1;
info->DisplayType = pRADEONEnt->Controller[0].pPort->MonType;
pScrn->monitor->DDC = pRADEONEnt->Controller[0].pPort->MonInfo;
}
if(!pRADEONEnt->HasSecondary) {
+ pRADEONEnt->Controller[1].binding = 1;
info->MergeType = pRADEONEnt->Controller[1].pPort->MonType;
}
} else {
@@ -1363,6 +1366,7 @@ Bool RADEONMapControllers(ScrnInfoPtr pScrn)
info->DisplayType = pRADEONEnt->Controller[0].pPort->MonType;
pScrn->monitor->DDC = pRADEONEnt->Controller[0].pPort->MonInfo;
pRADEONEnt->Controller[1].pPort->MonType = MT_NONE;
+ pRADEONEnt->Controller[1].binding = 1;
}
if (!info->IsSecondary) {
@@ -2008,7 +2012,7 @@ void RADEONBlank(ScrnInfoPtr pScrn)
if (!info->HasCRTC2) return;
- if (info->MergedFB) {
+ if (pRADEONEnt->Controller[1].binding == 1) {
RADEONBlankSet(pScrn, 1);
OUTREGP (RADEON_CRTC2_GEN_CNTL,
RADEON_CRTC2_DISP_DIS |
@@ -2077,7 +2081,7 @@ void RADEONUnblank(ScrnInfoPtr pScrn)
if (!info->HasCRTC2) return;
- if (info->MergedFB) {
+ if (pRADEONEnt->Controller[1].binding == 1) {
RADEONUnblankSet(pScrn, 1);
OUTREGP(RADEON_CRTC2_GEN_CNTL, 0,
~(RADEON_CRTC2_DISP_DIS |
@@ -2186,6 +2190,7 @@ void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn,
int flags)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
if (!pScrn->vtSema) return;
@@ -2215,7 +2220,7 @@ void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn,
if (info->IsSecondary)
OUTREGP(RADEON_CRTC2_GEN_CNTL, 0, ~mask2);
else {
- if (info->MergedFB)
+ if (pRADEONEnt->Controller[1].binding == 1)
OUTREGP(RADEON_CRTC2_GEN_CNTL, 0, ~mask2);
OUTREGP(RADEON_CRTC_EXT_CNTL, 0, ~mask1);
}
@@ -2228,7 +2233,7 @@ void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn,
(RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_HSYNC_DIS),
~mask2);
else {
- if (info->MergedFB)
+ if (pRADEONEnt->Controller[1].binding == 1)
OUTREGP(RADEON_CRTC2_GEN_CNTL,
(RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_HSYNC_DIS),
~mask2);
@@ -2245,7 +2250,7 @@ void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn,
(RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_VSYNC_DIS),
~mask2);
else {
- if (info->MergedFB)
+ if (pRADEONEnt->Controller[1].binding == 1)
OUTREGP(RADEON_CRTC2_GEN_CNTL,
(RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_VSYNC_DIS),
~mask2);
@@ -2260,7 +2265,7 @@ void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn,
if (info->IsSecondary)
OUTREGP(RADEON_CRTC2_GEN_CNTL, mask2, ~mask2);
else {
- if (info->MergedFB)
+ if (pRADEONEnt->Controller[1].binding == 1)
OUTREGP(RADEON_CRTC2_GEN_CNTL, mask2, ~mask2);
OUTREGP(RADEON_CRTC_EXT_CNTL, mask1, ~mask1);
}
@@ -2269,14 +2274,14 @@ void RADEONDisplayPowerManagementSet(ScrnInfoPtr pScrn,
if (PowerManagementMode == DPMSModeOn) {
RADEONDPMSSetOn(pScrn, info->IsSecondary ? 1 : 0);
- if (info->MergedFB)
+ if (pRADEONEnt->Controller[1].binding == 1)
RADEONDPMSSetOn(pScrn, 1);
} else if ((PowerManagementMode == DPMSModeOff) ||
(PowerManagementMode == DPMSModeSuspend) ||
(PowerManagementMode == DPMSModeStandby)) {
RADEONDPMSSetOff(pScrn, info->IsSecondary ? 1 : 0);
- if (info->MergedFB)
+ if (pRADEONEnt->Controller[1].binding == 1)
RADEONDPMSSetOff(pScrn, 1);
}
}
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index b38c6ef..da7d637 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2967,7 +2967,7 @@ static Bool RADEONPreInitModes(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
xf86SetCrtcForModes(pScrn, 0);
if (info->HasCRTC2) {
- if (info->MergedFB) {
+ if (pRADEONEnt->Controller[1].binding == 1) {
/* If we have 2 screens from the config file, we don't need
* to do clone thing, let each screen handles one head.
@@ -2996,7 +2996,7 @@ static Bool RADEONPreInitModes(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
}
xf86PrintModes(pScrn);
- if(info->MergedFB) {
+ if(pRADEONEnt->Controller[1].binding == 1) {
xf86SetCrtcForModes(info->CRT2pScrn, INTERLACE_HALVE_V);
@@ -5796,7 +5796,7 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore)
} else {
RADEONRestoreMemMapRegisters(pScrn, restore);
RADEONRestoreCommonRegisters(pScrn, restore);
- if (info->MergedFB) {
+ if (pCRTC2->binding == 1) {
RADEONRestoreCrtc2Registers(pScrn, restore);
RADEONRestorePLL2Registers(pScrn, restore);
}
@@ -5805,14 +5805,14 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore)
RADEONRestorePLLRegisters(pScrn, restore);
RADEONRestoreFPRegisters(pScrn, restore);
RADEONEnableDisplay(pScrn, pCRTC1, TRUE);
- if (info->MergedFB) {
+ if (pCRTC2->binding == 1) {
RADEONEnableDisplay(pScrn, pCRTC2, TRUE);
}
}
} else {
RADEONRestoreMemMapRegisters(pScrn, restore);
RADEONRestoreCommonRegisters(pScrn, restore);
- if ((info->MergedFB) || pRADEONEnt->HasSecondary) {
+ if ((pCRTC2->binding == 1) || pRADEONEnt->HasSecondary) {
RADEONRestoreCrtc2Registers(pScrn, restore);
RADEONRestorePLL2Registers(pScrn, restore);
}
@@ -5821,7 +5821,7 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore)
RADEONRestorePLLRegisters(pScrn, restore);
RADEONRestoreFPRegisters(pScrn, restore);
RADEONEnableDisplay(pScrn, pCRTC1, TRUE);
- if ((info->MergedFB) || pRADEONEnt->HasSecondary) {
+ if ((pCRTC2->binding == 1) || pRADEONEnt->HasSecondary) {
RADEONEnableDisplay(pScrn, pCRTC2, TRUE);
}
}
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index f10ffa1..bdc80fd 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -116,6 +116,7 @@ typedef struct
{
Bool IsUsed;
Bool IsActive;
+ int binding; // which instance of the driver "owns" this controller
DisplayModePtr pCurMode;
RADEONConnector* pPort;
} RADEONController;