提交 4c1979c8 编写于 作者: J Jordan Crouse 提交者: Linus Torvalds

[PATCH] FB: Get the Geode GX frambuffer size from the BIOS

Use the Geode GX BIOS virtual registers to get the actual size of the
framebuffer.
Signed-off-by: NJordan Crouse <jordan.crouse@amd.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Acked-by: NJames Simmons <jsimmons@infradead.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4437cd1e
...@@ -21,10 +21,19 @@ ...@@ -21,10 +21,19 @@
#include "geodefb.h" #include "geodefb.h"
#include "display_gx.h" #include "display_gx.h"
int gx_frame_buffer_size(void) unsigned int gx_frame_buffer_size(void)
{ {
/* Assuming 16 MiB. */ unsigned int val;
return 16*1024*1024;
/* FB size is reported by a virtual register */
/* Virtual register class = 0x02 */
/* VG_MEM_SIZE(512Kb units) = 0x00 */
outw(0xFC53, 0xAC1C);
outw(0x0200, 0xAC1C);
val = (unsigned int)(inw(0xAC1E)) & 0xFFl;
return (val << 19);
} }
int gx_line_delta(int xres, int bpp) int gx_line_delta(int xres, int bpp)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifndef __DISPLAY_GX_H__ #ifndef __DISPLAY_GX_H__
#define __DISPLAY_GX_H__ #define __DISPLAY_GX_H__
int gx_frame_buffer_size(void); unsigned int gx_frame_buffer_size(void);
int gx_line_delta(int xres, int bpp); int gx_line_delta(int xres, int bpp);
extern struct geode_dc_ops gx_dc_ops; extern struct geode_dc_ops gx_dc_ops;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册