aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2007-02-12 03:55:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:42 -0500
commitc7b54477d36fc5d6bd3c4e2e025a39ad9ccb5188 (patch)
treea971c3c918e883558c733b664f1663cbab86daaf /drivers/video/geode
parentf9506a53b446bc942c79584d3ce442d6334de697 (diff)
[PATCH] Recognize video=gx1fb:... option
Juergen Beisert reported that the following option doesn't work for him video=gx1fb:1024x768-16@60 though sisfb was able to parse similar option correctly. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/geode')
-rw-r--r--drivers/video/geode/gx1fb_core.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
index bcf9cea54d8b..bb20a2289760 100644
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -401,6 +401,30 @@ static void gx1fb_remove(struct pci_dev *pdev)
401 framebuffer_release(info); 401 framebuffer_release(info);
402} 402}
403 403
404#ifndef MODULE
405static void __init gx1fb_setup(char *options)
406{
407 char *this_opt;
408
409 if (!options || !*options)
410 return;
411
412 while ((this_opt = strsep(&options, ","))) {
413 if (!*this_opt)
414 continue;
415
416 if (!strncmp(this_opt, "mode:", 5))
417 strlcpy(mode_option, this_opt + 5, sizeof(mode_option));
418 else if (!strncmp(this_opt, "crt:", 4))
419 crt_option = !!simple_strtoul(this_opt + 4, NULL, 0);
420 else if (!strncmp(this_opt, "panel:", 6))
421 strlcpy(panel_option, this_opt + 6, sizeof(panel_option));
422 else
423 strlcpy(mode_option, this_opt, sizeof(mode_option));
424 }
425}
426#endif
427
404static struct pci_device_id gx1fb_id_table[] = { 428static struct pci_device_id gx1fb_id_table[] = {
405 { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO, 429 { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO,
406 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, 430 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
@@ -420,8 +444,11 @@ static struct pci_driver gx1fb_driver = {
420static int __init gx1fb_init(void) 444static int __init gx1fb_init(void)
421{ 445{
422#ifndef MODULE 446#ifndef MODULE
423 if (fb_get_options("gx1fb", NULL)) 447 char *option = NULL;
448
449 if (fb_get_options("gx1fb", &option))
424 return -ENODEV; 450 return -ENODEV;
451 gx1fb_setup(option);
425#endif 452#endif
426 return pci_register_driver(&gx1fb_driver); 453 return pci_register_driver(&gx1fb_driver);
427} 454}