diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2008-04-28 05:14:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:35 -0400 |
commit | f0a0c1f20f837221c0d990a54ae5426acf039036 (patch) | |
tree | 619a01ed5ae72fe6e918e99b5492db2cfce8bbe7 /drivers/video/geode/video_gx.c | |
parent | e9338364e6989ca2707638c7c70ae22975b0bb6c (diff) |
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.
Note that this also fixes inverted logic; we want CRT_VSYNC_POL to be set (ie,
vsync is normally high) when FB_SYNC_VERT_HIGH_ACT is unset.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/geode/video_gx.c')
-rw-r--r-- | drivers/video/geode/video_gx.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c index d0885370675d..06245a8400c7 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) | |||
208 | 208 | ||
209 | fp = 0x0F100000; | 209 | fp = 0x0F100000; |
210 | 210 | ||
211 | /* Add sync polarity */ | 211 | /* Configure sync polarity */ |
212 | 212 | ||
213 | if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) | 213 | if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) |
214 | fp |= GX_FP_PT2_VSP; | 214 | fp |= GX_FP_PT2_VSP; |
@@ -269,11 +269,15 @@ static void gx_configure_display(struct fb_info *info) | |||
269 | /* Enable hsync and vsync. */ | 269 | /* Enable hsync and vsync. */ |
270 | dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN; | 270 | dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN; |
271 | 271 | ||
272 | /* Sync polarities. */ | 272 | /* Only change the sync polarities if we are running |
273 | if (info->var.sync & FB_SYNC_HOR_HIGH_ACT) | 273 | * in CRT mode. The FP polarities will be handled in |
274 | dcfg |= GX_DCFG_CRT_HSYNC_POL; | 274 | * gxfb_configure_tft */ |
275 | if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) | 275 | if (par->enable_crt) { |
276 | dcfg |= GX_DCFG_CRT_VSYNC_POL; | 276 | if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT)) |
277 | dcfg |= GX_DCFG_CRT_HSYNC_POL; | ||
278 | if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) | ||
279 | dcfg |= GX_DCFG_CRT_VSYNC_POL; | ||
280 | } | ||
277 | 281 | ||
278 | /* Enable the display logic */ | 282 | /* Enable the display logic */ |
279 | /* Set up the DACS to blank normally */ | 283 | /* Set up the DACS to blank normally */ |