[PATCH] gxfb: Set the right registers to tweak the sync polarity

Jordan Crouse jordan.crouse at amd.com
Tue Nov 7 22:38:37 EST 2006


Commit:     9dd3f7e15f313efc588f2b7cc19c0647948e0c09
Parent:     14d9e919978a010317904cdbc44f7d8d8277f014
commit 9dd3f7e15f313efc588f2b7cc19c0647948e0c09
Author:     Jordan Crouse <jordan.crouse at amd.com>
AuthorDate: Mon Nov 6 13:33:21 2006 -0700
Commit:     Jordan Crouse <jordan.crouse at amd.com>
CommitDate: Mon Nov 6 13:34:06 2006 -0700

    [PATCH] gxfb:  Set the right registers to tweak the sync polarity
    
    While running in flatpanel mode it is important to change the FP
    sync bits (VG register 0x408) rather then the CRT sync bits
    (VG register 0x008).  This patch keeps the CRT sync bits at default
    when a flatpanel exists.
    
    Signed-off-by: Jordan Crouse <jordan.crouse at amd.com>
---
 drivers/video/geode/video_gx.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c
index bcd319b..92cf68d 100644
--- a/drivers/video/geode/video_gx.c
+++ b/drivers/video/geode/video_gx.c
@@ -208,7 +208,7 @@ gx_configure_tft(struct fb_info *info) {
 
 	fp = 0x0F100000;
 
-	/* Add sync polarity */
+	/* Configure sync polarity */
 
 	if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
 		fp |= GX_FP_PT2_VSP;
@@ -270,11 +270,18 @@ static void gx_configure_display(struct 
 	/* Enable hsync and vsync. */
 	dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN;
 
-	/* Sync polarities. */
-	if (info->var.sync & FB_SYNC_HOR_HIGH_ACT)
-		dcfg |= GX_DCFG_CRT_HSYNC_POL;
-	if (info->var.sync & FB_SYNC_VERT_HIGH_ACT)
-		dcfg |= GX_DCFG_CRT_VSYNC_POL;
+	/* Only change the sync polarities if we are running
+	 * in CRT mode.  The FP polarities will be handled in
+	 * gxfb_configure_tft
+	 */
+
+	if (par->enable_crt) {
+		if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT))
+			dcfg |= GX_DCFG_CRT_HSYNC_POL;
+
+		if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
+			dcfg |= GX_DCFG_CRT_VSYNC_POL;
+	}
 
 	/* Enable the display logic */
 	/* Set up the DACS to blank normally */


More information about the Commits-kernel mailing list