aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/display_gx.c
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-12-08 05:40:53 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:08 -0500
commitf378819a19e2b9639f17a1a82c5e12adc9512390 (patch)
treeef6278a50642f63d3ae1667fe33e92fb78536f5b /drivers/video/geode/display_gx.c
parent4c1979c8963528cc6f52203ae62162ed22e171f4 (diff)
[PATCH] gxfb: Fixups for the AMD Geode GX framebuffer driver
We cannot assume that the BIOS will be correctly setting up the hardware, so set some bits in various display registers to enable video output. Allow an advanced user to specify a frambuffer size, rather then probing the BIOS. All of these fixes were prompted by the OLPC effort. [akpm@osdl.org: cleanups] Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/geode/display_gx.c')
-rw-r--r--drivers/video/geode/display_gx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/geode/display_gx.c b/drivers/video/geode/display_gx.c
index 0245169366b3..0f16e4bffc6c 100644
--- a/drivers/video/geode/display_gx.c
+++ b/drivers/video/geode/display_gx.c
@@ -21,6 +21,12 @@
21#include "geodefb.h" 21#include "geodefb.h"
22#include "display_gx.h" 22#include "display_gx.h"
23 23
24#ifdef CONFIG_FB_GEODE_GX_SET_FBSIZE
25unsigned int gx_frame_buffer_size(void)
26{
27 return CONFIG_FB_GEODE_GX_FBSIZE;
28}
29#else
24unsigned int gx_frame_buffer_size(void) 30unsigned int gx_frame_buffer_size(void)
25{ 31{
26 unsigned int val; 32 unsigned int val;
@@ -35,6 +41,7 @@ unsigned int gx_frame_buffer_size(void)
35 val = (unsigned int)(inw(0xAC1E)) & 0xFFl; 41 val = (unsigned int)(inw(0xAC1E)) & 0xFFl;
36 return (val << 19); 42 return (val << 19);
37} 43}
44#endif
38 45
39int gx_line_delta(int xres, int bpp) 46int gx_line_delta(int xres, int bpp)
40{ 47{
@@ -90,6 +97,7 @@ static void gx_set_mode(struct fb_info *info)
90 writel(((info->var.xres * info->var.bits_per_pixel/8) >> 3) + 2, 97 writel(((info->var.xres * info->var.bits_per_pixel/8) >> 3) + 2,
91 par->dc_regs + DC_LINE_SIZE); 98 par->dc_regs + DC_LINE_SIZE);
92 99
100
93 /* Enable graphics and video data and unmask address lines. */ 101 /* Enable graphics and video data and unmask address lines. */
94 dcfg |= DC_DCFG_GDEN | DC_DCFG_VDEN | DC_DCFG_A20M | DC_DCFG_A18M; 102 dcfg |= DC_DCFG_GDEN | DC_DCFG_VDEN | DC_DCFG_A20M | DC_DCFG_A18M;
95 103