summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 a7b0dfd..c0dbd3d 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 23aea17..e2d895d 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 163d19c..b38c6ef 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);