[OLPC-devel] Updated geode GIT tree
Jordan Crouse
jordan.crouse at amd.com
Mon Jul 31 19:12:03 EDT 2006
Please pull from
git://git.infradead.org/users/jcrouse/geode.git
I've added some code to support FB options so we can now specify
video=gxfb:1200x900-16 from the command line rather then hacking the default
resolution into the kernel. Also, I fixed up the TFT detection so it works
a little better, especially with LinuxBIOS. Shortlog and diff attached.
Jordan Crouse:
gxfb: Support command line options
gxfb: Fixup flatpanel detection
-------------- next part --------------
diff --git a/drivers/video/geode/display_gx.h b/drivers/video/geode/display_gx.h
index ba0ccc8..0af33f3 100644
--- a/drivers/video/geode/display_gx.h
+++ b/drivers/video/geode/display_gx.h
@@ -18,7 +18,7 @@ extern struct geode_dc_ops gx_dc_ops;
/* MSR that tells us if a TFT or CRT is attached */
#define GLD_MSR_CONFIG 0xC0002001
-#define GLD_MSR_CONFIG_FMT_FP 0x01
+#define GLD_MSR_CONFIG_DM_FP 0x40
/* Display controller registers */
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c
index 75c7fd9..1e20a3b 100644
--- a/drivers/video/geode/gxfb_core.c
+++ b/drivers/video/geode/gxfb_core.c
@@ -35,10 +35,10 @@ #include "geodefb.h"
#include "display_gx.h"
#include "video_gx.h"
-static char mode_option[32] = "640x480-16 at 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 },
@@ -331,7 +331,7 @@ static int __init gxfb_probe(struct pci_
rdmsrl(GLD_MSR_CONFIG, val);
- if (val & GLD_MSR_CONFIG_FMT_FP)
+ if ((val & GLD_MSR_CONFIG_DM_FP) == GLD_MSR_CONFIG_DM_FP)
par->enable_crt = 0;
else
par->enable_crt = 1;
@@ -344,7 +344,8 @@ static int __init gxfb_probe(struct pci_
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);
@@ -414,11 +415,34 @@ 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);
}
@@ -431,8 +455,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");
diff --git a/drivers/video/geode/video_gx.h b/drivers/video/geode/video_gx.h
index 8f1e85b..119d0ab 100644
--- a/drivers/video/geode/video_gx.h
+++ b/drivers/video/geode/video_gx.h
@@ -14,7 +14,7 @@ #define __VIDEO_GX_H__
extern struct geode_vid_ops gx_vid_ops;
/* GX Flatpanel control MSR */
-#define GX_VP_MSR_PAD_SELECT 0x2011
+#define GX_VP_MSR_PAD_SELECT 0xC0002011
#define GX_VP_PAD_SELECT_MASK 0x3FFFFFFF
#define GX_VP_PAD_SELECT_TFT 0x1FFFFFFF
More information about the Devel
mailing list