mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 00:53:40 +00:00
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>
This commit is contained in:
parent
e9338364e6
commit
f0a0c1f20f
@ -208,7 +208,7 @@ gx_configure_tft(struct fb_info *info)
|
|||||||
|
|
||||||
fp = 0x0F100000;
|
fp = 0x0F100000;
|
||||||
|
|
||||||
/* Add sync polarity */
|
/* Configure sync polarity */
|
||||||
|
|
||||||
if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
|
if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
|
||||||
fp |= GX_FP_PT2_VSP;
|
fp |= GX_FP_PT2_VSP;
|
||||||
@ -269,11 +269,15 @@ static void gx_configure_display(struct fb_info *info)
|
|||||||
/* Enable hsync and vsync. */
|
/* Enable hsync and vsync. */
|
||||||
dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN;
|
dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN;
|
||||||
|
|
||||||
/* Sync polarities. */
|
/* Only change the sync polarities if we are running
|
||||||
if (info->var.sync & FB_SYNC_HOR_HIGH_ACT)
|
* in CRT mode. The FP polarities will be handled in
|
||||||
dcfg |= GX_DCFG_CRT_HSYNC_POL;
|
* gxfb_configure_tft */
|
||||||
if (info->var.sync & FB_SYNC_VERT_HIGH_ACT)
|
if (par->enable_crt) {
|
||||||
dcfg |= GX_DCFG_CRT_VSYNC_POL;
|
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 */
|
/* Enable the display logic */
|
||||||
/* Set up the DACS to blank normally */
|
/* Set up the DACS to blank normally */
|
||||||
|
Loading…
Reference in New Issue
Block a user