summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-10-23 16:49:59 +1000
committerDave Airlie <airlied@linux.ie>2006-11-12 15:43:13 +1100
commit78061ca460c9d6fd338ccf273bbfa152f471622e (patch)
tree098313ca49517319cc58abd692fcf2e8e10ef32d
parentf917f65e8d2b13d8b9bfc4320f4a935f5a5c4bff (diff)
radeon: separate static controller setup from non-static
-rw-r--r--src/radeon.h1
-rw-r--r--src/radeon_display.c37
-rw-r--r--src/radeon_driver.c1
3 files changed, 37 insertions, 2 deletions
diff --git a/src/radeon.h b/src/radeon.h
index a7b0dfda..c0dbd3d1 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -891,6 +891,7 @@ extern Bool RADEONGetHardCodedEDIDFromBIOS (ScrnInfoPtr pScrn);
extern void RADEONInitDispBandwidth(ScrnInfoPtr pScrn);
extern Bool RADEONI2cInit(ScrnInfoPtr pScrn);
extern void RADEONSetSyncRangeFromEdid(ScrnInfoPtr pScrn, int flag);
+extern void RADEONSetupConnectors(ScrnInfoPtr pScrn);
extern Bool RADEONMapControllers(ScrnInfoPtr pScrn);
extern void RADEONEnableDisplay(ScrnInfoPtr pScrn, RADEONController* pCRTC, BOOL bEnable);
extern void RADEONDisableDisplays(ScrnInfoPtr pScrn);
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 23aea172..e2d895d1 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -919,7 +919,9 @@ void RADEONGetTVDacAdjInfo(ScrnInfoPtr pScrn)
}
}
-static void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
+/*
+ * initialise the static data sos we don't have to re-do at randr change */
+void RADEONSetupConnectors(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
@@ -1136,6 +1138,32 @@ static void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
pRADEONEnt->PortInfo[0].TMDSType = TMDS_UNKNOWN;
}
+ }
+}
+
+static void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
+{
+
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
+ unsigned char *RADEONMMIO = info->MMIO;
+ const char *s;
+ Bool ignore_edid = FALSE;
+ int i = 0, second = 0, max_mt = 5;
+
+ /* IgnoreEDID option is different from the NoDDCxx options used by DDC module
+ * When IgnoreEDID is used, monitor detection will still use DDC
+ * detection, but all EDID data will not be used in mode validation.
+ * You can use this option when you have a DDC monitor but want specify your own
+ * monitor timing parameters by using HSync, VRefresh and Modeline,
+ */
+ if (xf86GetOptValBool(info->Options, OPTION_IGNORE_EDID, &ignore_edid)) {
+ if (ignore_edid)
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "IgnoreEDID is specified, EDID data will be ignored\n");
+ }
+
+ if ((s = xf86GetOptValString(info->Options, OPTION_MONITOR_LAYOUT))) {
if (!ignore_edid) {
if ((pRADEONEnt->PortInfo[0].MonType > MT_NONE) &&
(pRADEONEnt->PortInfo[0].MonType < MT_STV))
@@ -1146,8 +1174,13 @@ static void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
RADEONDisplayDDCConnected(pScrn, pRADEONEnt->PortInfo[1].DDCType,
&pRADEONEnt->PortInfo[1]);
}
-
}
+ else {
+ /* force monitor redetection */
+ pRADEONEnt->PortInfo[0].MonType = MT_UNKNOWN;
+ pRADEONEnt->PortInfo[1].MonType = MT_UNKNOWN;
+ }
+
if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN || pRADEONEnt->PortInfo[1].MonType == MT_UNKNOWN) {
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 163d19c7..b38c6ef2 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3550,6 +3550,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10
{
RADEONGetBIOSInfo(pScrn, pInt10);
+ RADEONSetupConnectors(pScrn);
RADEONMapControllers(pScrn);
RADEONGetClockInfo(pScrn);