summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-15 00:36:05 -0400
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-15 00:36:05 -0400
commit9ed00e959fcdab2739a7e64ca1e303a6faf28f15 (patch)
tree9084f8104489f701780c01bf2d63743247766c1b /src
parent5106c8fe5f74865cac8b00937739a4efde9fc254 (diff)
RADEON: Lots of small fixes
- remove extra crtc2_base set - remove some debugging code - clean up RestoreMode() - make sure a DDC reg gets assigned for LCD_DDC - make sure we adjust the right frame in AdjustFrame() - rename RADEONMapControllers() to RADEONPrintPortMap() to reflect what it actually does now - make i2c bus name match the DDC port - remove or comment out un-needed code
Diffstat (limited to 'src')
-rw-r--r--src/radeon.h2
-rw-r--r--src/radeon_bios.c4
-rw-r--r--src/radeon_display.c2
-rw-r--r--src/radeon_driver.c25
-rw-r--r--src/radeon_output.c15
5 files changed, 17 insertions, 31 deletions
diff --git a/src/radeon.h b/src/radeon.h
index e0b4b9b3..fde7f79e 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -833,7 +833,7 @@ extern void RADEONInitDispBandwidth(ScrnInfoPtr pScrn);
extern Bool RADEONI2cInit(ScrnInfoPtr pScrn);
extern void RADEONSetSyncRangeFromEdid(ScrnInfoPtr pScrn, int flag);
extern Bool RADEONSetupConnectors(ScrnInfoPtr pScrn);
-extern Bool RADEONMapControllers(ScrnInfoPtr pScrn);
+extern void RADEONPrintPortMap(ScrnInfoPtr pScrn);
extern void RADEONEnableDisplay(xf86OutputPtr pPort, BOOL bEnable);
extern void RADEONDisableDisplays(ScrnInfoPtr pScrn);
extern void RADEONGetPanelInfo(ScrnInfoPtr pScrn);
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 6e08f241..f63eec7b 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -408,8 +408,6 @@ Bool RADEONGetLVDSInfoFromBIOS (xf86OutputPtr output)
RADEONOutputPrivatePtr radeon_output = output->driver_private;
unsigned long tmp, i;
- ErrorF("grabbing LVDS from bios");
-
if (!info->VBIOS) return FALSE;
if (info->IsAtomBios) {
@@ -551,8 +549,6 @@ Bool RADEONGetTMDSInfoFromBIOS (xf86OutputPtr output)
CARD32 tmp, maxfreq;
int i, n;
- ErrorF("grabbing LVDS from bios");
-
if (!info->VBIOS) return FALSE;
if (info->IsAtomBios) {
diff --git a/src/radeon_display.c b/src/radeon_display.c
index c3167bc3..85a4844b 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -742,8 +742,6 @@ Bool RADEONGetLVDSInfo (xf86OutputPtr output)
RADEONOutputPrivatePtr radeon_output = output->driver_private;
char* s;
- ErrorF("LVDS get info");
-
if (!RADEONGetLVDSInfoFromBIOS(output))
RADEONGetPanelInfoFromReg(output);
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c82c6baa..32f51d66 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -116,8 +116,6 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore);
static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen);
static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode);
static void RADEONSave(ScrnInfoPtr pScrn);
-//static void RADEONRestore(ScrnInfoPtr pScrn);
-//static Bool RADEONModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
static void RADEONSetDynamicClock(ScrnInfoPtr pScrn, int mode);
static void RADEONForceSomeClocks(ScrnInfoPtr pScrn);
@@ -2498,7 +2496,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10
return FALSE;
}
- RADEONMapControllers(pScrn);
+ RADEONPrintPortMap(pScrn);
RADEONGetClockInfo(pScrn);
@@ -3577,7 +3575,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
RADEONSaveScreen(pScreen, SCREEN_SAVER_ON);
- pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ // pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
/* Backing store setup */
RADEONTRACE(("Initializing backing store\n"));
@@ -4612,10 +4610,8 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore)
*/
RADEONRestoreMemMapRegisters(pScrn, restore);
RADEONRestoreCommonRegisters(pScrn, restore);
- if ((pCRTC2->binding == 1) || pRADEONEnt->HasSecondary) {
- RADEONRestoreCrtc2Registers(pScrn, restore);
- RADEONRestorePLL2Registers(pScrn, restore);
- }
+ RADEONRestoreCrtc2Registers(pScrn, restore);
+ RADEONRestorePLL2Registers(pScrn, restore);
RADEONRestoreCrtcRegisters(pScrn, restore);
RADEONRestorePLLRegisters(pScrn, restore);
@@ -4623,10 +4619,7 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore)
RADEONRestoreDACRegisters(pScrn, restore);
RADEONEnableOutputs(pScrn, 0);
-
- if ((pCRTC2->binding == 1) || pRADEONEnt->HasSecondary) {
- RADEONEnableOutputs(pScrn, 1);
- }
+ RADEONEnableOutputs(pScrn, 1);
#if 0
RADEONRestorePalette(pScrn, &info->SavedReg);
@@ -5732,7 +5725,6 @@ Bool RADEONInitCrtc2Registers(xf86CrtcPtr crtc, RADEONSavePtr save,
}
Base &= ~7; /* 3 lower bits are always 0 */
- save->crtc2_offset = Base;
#ifdef XF86DRI
if (info->directRenderingInited) {
@@ -6189,6 +6181,7 @@ void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
xf86OutputPtr output = config->output[config->compat_output];
xf86CrtcPtr crtc = output->crtc;
@@ -6204,7 +6197,10 @@ void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
if (info->FBDev) {
fbdevHWAdjustFrame(scrnIndex, crtc->desiredX + x, crtc->desiredY + y, flags);
} else {
- RADEONDoAdjustFrame(pScrn, crtc->desiredX + x, crtc->desiredY + y, FALSE);
+ if (crtc == pRADEONEnt->pCrtc[0])
+ RADEONDoAdjustFrame(pScrn, crtc->desiredX + x, crtc->desiredY + y, FALSE);
+ else
+ RADEONDoAdjustFrame(pScrn, crtc->desiredX + x, crtc->desiredY + y, TRUE);
}
crtc->x = output->initial_x + x;
crtc->y = output->initial_y + y;
@@ -6258,7 +6254,6 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
{
xf86CrtcPtr crtc = xf86_config->crtc[i];
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
- radeon_crtc->binding = 1;
/* Mark that we'll need to re-set the mode for sure */
memset(&crtc->mode, 0, sizeof(crtc->mode));
if (!crtc->desiredMode.CrtcHDisplay) {
diff --git a/src/radeon_output.c b/src/radeon_output.c
index e9e1aeac..3052c36c 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -126,7 +126,7 @@ const char *OutputType[10] = {
static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr output);
-Bool RADEONMapControllers(ScrnInfoPtr pScrn)
+void RADEONPrintPortMap(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
@@ -136,9 +136,6 @@ Bool RADEONMapControllers(ScrnInfoPtr pScrn)
xf86OutputPtr output;
int o;
- pRADEONEnt->Controller[0]->binding = 1;
- pRADEONEnt->Controller[1]->binding = 1;
-
for (o = 0; o < xf86_config->num_output; o++) {
output = xf86_config->output[o];
radeon_output = output->driver_private;
@@ -156,7 +153,6 @@ Bool RADEONMapControllers(ScrnInfoPtr pScrn)
}
- return TRUE;
}
/* Primary Head (DVI or Laptop Int. panel)*/
@@ -433,13 +429,14 @@ void RADEONInitConnector(xf86OutputPtr output)
ScrnInfoPtr pScrn = output->scrn;
RADEONOutputPrivatePtr radeon_output = output->driver_private;
int DDCReg = 0;
- char* name = OutputType[radeon_output->type];
+ char* name = (char*) DDCTypeName[radeon_output->DDCType];
switch(radeon_output->DDCType) {
case DDC_MONID: DDCReg = RADEON_GPIO_MONID; break;
case DDC_DVI : DDCReg = RADEON_GPIO_DVI_DDC; break;
- case DDC_VGA: DDCReg = RADEON_GPIO_VGA_DDC; break;
- case DDC_CRT2: DDCReg = RADEON_GPIO_CRT2_DDC; break;
+ case DDC_VGA : DDCReg = RADEON_GPIO_VGA_DDC; break;
+ case DDC_CRT2 : DDCReg = RADEON_GPIO_CRT2_DDC; break;
+ case DDC_LCD : DDCReg = RADEON_LCD_GPIO_MASK; break;
default: break;
}
@@ -455,7 +452,7 @@ void RADEONInitConnector(xf86OutputPtr output)
if (radeon_output->type == OUTPUT_DVI) {
RADEONGetTMDSInfo(output);
- // FIXME
+ // FIXME -- this should be done in detect or getmodes
/*if (i == 0)
RADEONGetHardCodedEDIDFromBIOS(output);*/