Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43827
b: refs/heads/master
c: 16ef987
h: refs/heads/master
i:
  43825: 7369d07
  43823: 4e8949c
v: v3
  • Loading branch information
Jordan Crouse authored and Linus Torvalds committed Dec 8, 2006
1 parent f174f93 commit 3d7a23b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 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: ab1db0cfcf69f94a5c6831db230982cd6bbeb2e1
refs/heads/master: 16ef9870959621fa437d25ead28a7199acc6ce49
37 changes: 31 additions & 6 deletions trunk/drivers/video/geode/gxfb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
#include "display_gx.h"
#include "video_gx.h"

static char mode_option[32] = "640x480-16@60";
static char *mode_option;

/* Modes relevant to the GX (taken from modedb.c) */
static const struct fb_videomode __initdata gx_modedb[] = {
static const struct fb_videomode gx_modedb[] __initdata = {
/* 640x480-60 VESA */
{ NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
Expand Down Expand Up @@ -341,7 +341,8 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i
goto err;
}

/* Clear the frame buffer of garbage. */

/* Clear the frame buffer of garbage. */
memset_io(info->screen_base, 0, info->fix.smem_len);

gxfb_check_var(&info->var, info);
Expand Down Expand Up @@ -411,11 +412,35 @@ static struct pci_driver gxfb_driver = {
.remove = gxfb_remove,
};

#ifndef MODULE
static int __init gxfb_setup(char *options)
{

char *opt;

if (!options || !*options)
return 0;

while ((opt = strsep(&options, ",")) != NULL) {
if (!*opt)
continue;

mode_option = opt;
}

return 0;
}
#endif

static int __init gxfb_init(void)
{
#ifndef MODULE
if (fb_get_options("gxfb", NULL))
char *option = NULL;

if (fb_get_options("gxfb", &option))
return -ENODEV;

gxfb_setup(option);
#endif
return pci_register_driver(&gxfb_driver);
}
Expand All @@ -428,8 +453,8 @@ static void __exit gxfb_cleanup(void)
module_init(gxfb_init);
module_exit(gxfb_cleanup);

module_param_string(mode, mode_option, sizeof(mode_option), 0444);
MODULE_PARM_DESC(mode, "video mode (<x>x<y>[-<bpp>][@<refr>])");
module_param(mode_option, charp, 0);
MODULE_PARM_DESC(mode_option, "video mode (<x>x<y>[-<bpp>][@<refr>])");

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

0 comments on commit 3d7a23b

Please sign in to comment.