[Xorg-driver-geode] [PATCH] Print the panel mode BIOS uses

Huang, FrankR FrankR.Huang at amd.com
Thu Nov 18 18:28:31 PST 2010


From: Frank Huang <frankr.huang at amd.com>

Signed-off-by: Frank Huang<frankr.huang at amd.com>
---
 src/geode.h     |    2 +-
 src/lx_driver.c |    2 +-
 src/lx_panel.c  |   10 +++++++---
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/geode.h b/src/geode.h
index ad94a02..ebf8abb 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -454,7 +454,7 @@ void LXInitVideo(ScreenPtr pScrn);
 void LXSetupOutput(ScrnInfoPtr);
 
 /* lx_panel.c */
-DisplayModePtr LXGetLegacyPanelMode(void);
+DisplayModePtr LXGetLegacyPanelMode(ScrnInfoPtr pScrni);
 DisplayModePtr LXGetManualPanelMode(char *modestr);
 
 void LXAdjustFrame(int scrnIndex, int x, int y, int flags);
diff --git a/src/lx_driver.c b/src/lx_driver.c
index 0fcd51e..477939d 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -452,7 +452,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
 	    pGeode->panelMode = LXGetManualPanelMode(pmode);
 
 	if (pGeode->panelMode == NULL)
-	    pGeode->panelMode = LXGetLegacyPanelMode();
+	    pGeode->panelMode = LXGetLegacyPanelMode(pScrni);
 
 	if (pGeode->panelMode == NULL)
 	    pGeode->Output &= ~OUTPUT_PANEL;
diff --git a/src/lx_panel.c b/src/lx_panel.c
index 6832fec..573c0fb 100644
--- a/src/lx_panel.c
+++ b/src/lx_panel.c
@@ -77,11 +77,10 @@ DisplayModeRec lx_panel_modes[] = {
 /* Get the legacy panel size from VSA, and return the associated mode rec */
 
 DisplayModePtr
-LXGetLegacyPanelMode(void)
+LXGetLegacyPanelMode(ScrnInfoPtr pScrni)
 {
     unsigned short reg = LX_READ_VG(0x00);
     unsigned char ret = (reg >> 8) & 0x07;
-
     if ((ret == 1 || ret == 5)) {
 
 	reg = LX_READ_VG(0x02);
@@ -94,8 +93,13 @@ LXGetLegacyPanelMode(void)
  	 * The user can use this entry for other wide screen resolutions.
 	 */
 
-	if (ret < 8)
+	if (ret < 8) {
+	    xf86DrvMsg(pScrni->scrnIndex, X_INFO,
+		" VSA Panel Mode is: %dx%d, pixel clock freq(kHz) is %d\n",
+		lx_panel_modes[ret].HDisplay, lx_panel_modes[ret].VDisplay,
+		lx_panel_modes[ret].Clock);
 	    return &lx_panel_modes[ret];
+	}
 
     }
 
-- 
1.7.1




More information about the Xorg-driver-geode mailing list