Signed-off-by: Christian Gmeiner <[email protected]>
---
 vgasrc/geodevga.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c
index 5d85dc2..7689c43 100644
--- a/vgasrc/geodevga.c
+++ b/vgasrc/geodevga.c
@@ -245,11 +245,6 @@ static void dc_setup(void)
 
     geode_dc_write(DC_UNLOCK, DC_LOCK_UNLOCK);
 
-    /* zero memory config */
-    geode_dc_write(DC_FB_ST_OFFSET, 0x0);
-    geode_dc_write(DC_CB_ST_OFFSET, 0x0);
-    geode_dc_write(DC_CURS_ST_OFFSET, 0x0);
-
     geode_dc_mask(DC_DISPLAY_CFG, ~DC_CFG_MSK, 
DC_DISPLAY_CFG_GDEN|DC_DISPLAY_CFG_TRUP);
     geode_dc_write(DC_GENERAL_CFG, DC_DISPLAY_CFG_VGAE);
 
@@ -308,6 +303,17 @@ static void vp_setup(void)
 
 int geodevga_set_mode(struct vgamode_s *vmode_g, int flags)
 {
+    /* unlock dc register */
+    geode_dc_write(DC_UNLOCK, DC_LOCK_UNLOCK);
+
+    /* zero memory config */
+    geode_dc_write(DC_FB_ST_OFFSET, 0x0);
+    geode_dc_write(DC_CB_ST_OFFSET, 0x0);
+    geode_dc_write(DC_CURS_ST_OFFSET, 0x0);
+   
+    /* lock dc register */
+    geode_dc_write(DC_UNLOCK, DC_LOCK_LOCK);
+
     return stdvga_set_mode(vmode_g, flags);
 }
 
-- 
1.7.12.2.421.g261b511


_______________________________________________
SeaBIOS mailing list
[email protected]
http://www.seabios.org/mailman/listinfo/seabios

Reply via email to