aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/geode/display_gx.c15
-rw-r--r--drivers/video/geode/display_gx.h2
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/geode/display_gx.c b/drivers/video/geode/display_gx.c
index 825c3405f5c2..0245169366b3 100644
--- a/drivers/video/geode/display_gx.c
+++ b/drivers/video/geode/display_gx.c
@@ -21,10 +21,19 @@
21#include "geodefb.h" 21#include "geodefb.h"
22#include "display_gx.h" 22#include "display_gx.h"
23 23
24int gx_frame_buffer_size(void) 24unsigned int gx_frame_buffer_size(void)
25{ 25{
26 /* Assuming 16 MiB. */ 26 unsigned int val;
27 return 16*1024*1024; 27
28 /* FB size is reported by a virtual register */
29 /* Virtual register class = 0x02 */
30 /* VG_MEM_SIZE(512Kb units) = 0x00 */
31
32 outw(0xFC53, 0xAC1C);
33 outw(0x0200, 0xAC1C);
34
35 val = (unsigned int)(inw(0xAC1E)) & 0xFFl;
36 return (val << 19);
28} 37}
29 38
30int gx_line_delta(int xres, int bpp) 39int gx_line_delta(int xres, int bpp)
diff --git a/drivers/video/geode/display_gx.h b/drivers/video/geode/display_gx.h
index 86c623361305..41e79f440670 100644
--- a/drivers/video/geode/display_gx.h
+++ b/drivers/video/geode/display_gx.h
@@ -11,7 +11,7 @@
11#ifndef __DISPLAY_GX_H__ 11#ifndef __DISPLAY_GX_H__
12#define __DISPLAY_GX_H__ 12#define __DISPLAY_GX_H__
13 13
14int gx_frame_buffer_size(void); 14unsigned int gx_frame_buffer_size(void);
15int gx_line_delta(int xres, int bpp); 15int gx_line_delta(int xres, int bpp);
16 16
17extern struct geode_dc_ops gx_dc_ops; 17extern struct geode_dc_ops gx_dc_ops;