Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94146
b: refs/heads/master
c: fa20c8a
h: refs/heads/master
v: v3
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Apr 28, 2008
1 parent ea3d9cc commit 3b89db1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a5e79098799a4bead070a9bd7f1a2213ba5eef5
refs/heads/master: fa20c8a6e520d9ccd68c8101155ffdbc19c977c3
51 changes: 51 additions & 0 deletions trunk/Documentation/fb/gxfb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[This file is cloned from VesaFB/aty128fb]

What is gxfb?
=================

This is a graphics framebuffer driver for AMD Geode GX2 based processors.

Advantages:

* No need to use AMD's VSA code (or other VESA emulation layer) in the
BIOS.
* It provides a nice large console (128 cols + 48 lines with 1024x768)
without using tiny, unreadable fonts.
* You can run XF68_FBDev on top of /dev/fb0
* Most important: boot logo :-)

Disadvantages:

* graphic mode is slower than text mode...


How to use it?
==============

Switching modes is done using gxfb.mode_option=<resolution>... boot
parameter or using `fbset' program.

See Documentation/fb/modedb.txt for more information on modedb
resolutions.


X11
===

XF68_FBDev should generally work fine, but it is non-accelerated.


Configuration
=============

You can pass kernel command line options to gxfb with gxfb.<option>.
For example, gxfb.mode_option=800x600@75.
Accepted options:

mode_option - specify the video mode. Of the form
<x>x<y>[-<bpp>][@<refresh>]
vram - size of video ram (normally auto-detected)


--
Andres Salomon <dilinger@debian.org>
20 changes: 0 additions & 20 deletions trunk/drivers/video/geode/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,6 @@ config FB_GEODE_GX

If unsure, say N.

config FB_GEODE_GX_SET_FBSIZE
bool "Manually specify the Geode GX framebuffer size"
depends on FB_GEODE_GX
default n
---help---
If you want to manually specify the size of your GX framebuffer,
say Y here, otherwise say N to dynamically probe it.

Say N unless you know what you are doing.

config FB_GEODE_GX_FBSIZE
hex "Size of the GX framebuffer, in bytes"
depends on FB_GEODE_GX_SET_FBSIZE
default "0x1600000"
---help---
Specify the size of the GX framebuffer. Normally, you will
want this to be MB aligned. Common values are 0x80000 (8MB)
and 0x1600000 (16MB). Don't change this unless you know what
you are doing

config FB_GEODE_GX1
tristate "AMD Geode GX1 framebuffer support (EXPERIMENTAL)"
depends on FB && FB_GEODE && EXPERIMENTAL
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/video/geode/display_gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
#include "geodefb.h"
#include "display_gx.h"

#ifdef CONFIG_FB_GEODE_GX_SET_FBSIZE
unsigned int gx_frame_buffer_size(void)
{
return CONFIG_FB_GEODE_GX_FBSIZE;
}
#else
unsigned int gx_frame_buffer_size(void)
{
unsigned int val;
Expand All @@ -41,7 +35,6 @@ unsigned int gx_frame_buffer_size(void)
val = (unsigned int)(inw(0xAC1E)) & 0xFFl;
return (val << 19);
}
#endif

int gx_line_delta(int xres, int bpp)
{
Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/video/geode/gxfb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "video_gx.h"

static char *mode_option;
static int vram;

/* Modes relevant to the GX (taken from modedb.c) */
static const struct fb_videomode gx_modedb[] __initdata = {
Expand Down Expand Up @@ -208,7 +209,6 @@ static int gxfb_blank(int blank_mode, struct fb_info *info)
static int __init gxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
{
struct geodefb_par *par = info->par;
int fb_len;
int ret;

ret = pci_enable_device(dev);
Expand All @@ -233,21 +233,20 @@ static int __init gxfb_map_video_memory(struct fb_info *info, struct pci_dev *de
ret = pci_request_region(dev, 0, "gxfb (framebuffer)");
if (ret < 0)
return ret;
if ((fb_len = gx_frame_buffer_size()) < 0)
return -ENOMEM;

info->fix.smem_start = pci_resource_start(dev, 0);
info->fix.smem_len = fb_len;
info->fix.smem_len = vram ? vram : gx_frame_buffer_size();
info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
if (!info->screen_base)
return -ENOMEM;

/* Set the 16MB aligned base address of the graphics memory region
/* Set the 16MiB aligned base address of the graphics memory region
* in the display controller */

writel(info->fix.smem_start & 0xFF000000,
par->dc_regs + DC_GLIU0_MEM_OFFSET);

dev_info(&dev->dev, "%d Kibyte of video memory at 0x%lx\n",
dev_info(&dev->dev, "%d KiB of video memory at 0x%lx\n",
info->fix.smem_len / 1024, info->fix.smem_start);

return 0;
Expand Down Expand Up @@ -455,5 +454,8 @@ module_exit(gxfb_cleanup);
module_param(mode_option, charp, 0);
MODULE_PARM_DESC(mode_option, "video mode (<x>x<y>[-<bpp>][@<refr>])");

module_param(vram, int, 0);
MODULE_PARM_DESC(vram, "video memory size");

MODULE_DESCRIPTION("Framebuffer driver for the AMD Geode GX");
MODULE_LICENSE("GPL");

0 comments on commit 3b89db1

Please sign in to comment.