aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2013-02-14 10:34:34 +0100
committerKevin O'Connor <kevin@koconnor.net>2013-02-15 22:52:18 -0500
commit320570821ada0c7cace04b6fa793326abc076d84 (patch)
tree2036fdd1c86b8a8a4d404f24b9816e858b0ac915
parentbb7e54a1b28d92a832e4c20fe683df503915388c (diff)
downloadseabios-320570821ada0c7cace04b6fa793326abc076d84.tar.gz
geodevga: move framebuffer setup
Framebuffer setup has nothing to do with dc_setup(..) so move it to geodevga_init(..). Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
-rw-r--r--vgasrc/geodevga.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c
index ef840a4..e96698c 100644
--- a/vgasrc/geodevga.c
+++ b/vgasrc/geodevga.c
@@ -218,22 +218,10 @@ static void dc_setup(void)
geode_dc_write(DC_CB_ST_OFFSET, 0x0);
geode_dc_write(DC_CURS_ST_OFFSET, 0x0);
- /* read fb-bar from pci, then point dc to the fb base */
- u32 fb = GET_GLOBAL(GeodeFB);
- if (geode_dc_read(DC_GLIU0_MEM_OFFSET) != fb)
- geode_dc_write(DC_GLIU0_MEM_OFFSET, fb);
-
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);
geode_dc_write(DC_UNLOCK, DC_LOCK_LOCK);
-
- u32 fb_size = framebuffer_size(); // in byte
- dprintf(1, "%d KB of video memory at 0x%08x\n", fb_size / 1024, fb);
-
- /* update VBE variables */
- SET_VGA(VBE_framebuffer, fb);
- SET_VGA(VBE_total_memory, fb_size / 1024 / 64); // number of 64K blocks
}
/* Setup the vp (video processor) portion of the geodelx
@@ -408,6 +396,23 @@ int geodevga_setup(void)
dprintf(1, "dc addr: 0x%08x\n", GET_GLOBAL(GeodeDC));
dprintf(1, "vp addr: 0x%08x\n", GET_GLOBAL(GeodeVP));
+ /* setup framebuffer */
+ geode_dc_write(DC_UNLOCK, DC_LOCK_UNLOCK);
+
+ /* read fb-bar from pci, then point dc to the fb base */
+ u32 fb = GET_GLOBAL(GeodeFB);
+ if (geode_dc_read(DC_GLIU0_MEM_OFFSET) != fb)
+ geode_dc_write(DC_GLIU0_MEM_OFFSET, fb);
+
+ geode_dc_write(DC_UNLOCK, DC_LOCK_LOCK);
+
+ u32 fb_size = framebuffer_size(); // in byte
+ dprintf(1, "%d KB of video memory at 0x%08x\n", fb_size / 1024, fb);
+
+ /* update VBE variables */
+ SET_VGA(VBE_framebuffer, fb);
+ SET_VGA(VBE_total_memory, fb_size / 1024 / 64); // number of 64K blocks
+
vp_setup();
dc_setup();