[PATCH] Savage: Do not add panel modes when there is no panel

lists.tormod at gmail.com lists.tormod at gmail.com
Wed Jan 21 14:49:13 PST 2009


From: Tormod Volden <debian.tormod at gmail.com>

SavageGetPanelInfo will reset DisplayType if the panel is not
active, so check again before calling SavageAddPanelMode so that
bogus modes are not added.

This fixes startup failures in some cases, for instance when there is no
real panel and EDID is missing. The bogus sync ranges (typically 0 Hz) 
would also block the default sync ranges from being applied.

Thanks to Peter Belew for testing.
https://bugs.launchpad.net/bugs/294899
---
 src/savage_driver.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/savage_driver.c b/src/savage_driver.c
index da472e9..4115fb0 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -2206,10 +2206,11 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
     /* Check LCD panel information */
 
     if(psav->DisplayType == MT_LCD)
-    {
 	SavageGetPanelInfo(pScrn);
+
+    /* DisplayType will be reset if panel is not active */
+    if(psav->DisplayType == MT_LCD)
 	SavageAddPanelMode(pScrn);
-    }
   
 #if 0
     if (psav->CrtOnly && !psav->UseBIOS) {
-- 
1.6.0.4




More information about the xorg mailing list