aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/uvesafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/uvesafb.c')
-rw-r--r--drivers/video/uvesafb.c74
1 files changed, 36 insertions, 38 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 2f8f82d874a1..b75db0186488 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -36,26 +36,26 @@ static struct cb_id uvesafb_cn_id = {
36static char v86d_path[PATH_MAX] = "/sbin/v86d"; 36static char v86d_path[PATH_MAX] = "/sbin/v86d";
37static char v86d_started; /* has v86d been started by uvesafb? */ 37static char v86d_started; /* has v86d been started by uvesafb? */
38 38
39static struct fb_fix_screeninfo uvesafb_fix __devinitdata = { 39static struct fb_fix_screeninfo uvesafb_fix = {
40 .id = "VESA VGA", 40 .id = "VESA VGA",
41 .type = FB_TYPE_PACKED_PIXELS, 41 .type = FB_TYPE_PACKED_PIXELS,
42 .accel = FB_ACCEL_NONE, 42 .accel = FB_ACCEL_NONE,
43 .visual = FB_VISUAL_TRUECOLOR, 43 .visual = FB_VISUAL_TRUECOLOR,
44}; 44};
45 45
46static int mtrr __devinitdata = 3; /* enable mtrr by default */ 46static int mtrr = 3; /* enable mtrr by default */
47static bool blank = 1; /* enable blanking by default */ 47static bool blank = 1; /* enable blanking by default */
48static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ 48static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */
49static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */ 49static bool pmi_setpal = true; /* use PMI for palette changes */
50static bool nocrtc __devinitdata; /* ignore CRTC settings */ 50static bool nocrtc; /* ignore CRTC settings */
51static bool noedid __devinitdata; /* don't try DDC transfers */ 51static bool noedid; /* don't try DDC transfers */
52static int vram_remap __devinitdata; /* set amt. of memory to be used */ 52static int vram_remap; /* set amt. of memory to be used */
53static int vram_total __devinitdata; /* set total amount of memory */ 53static int vram_total; /* set total amount of memory */
54static u16 maxclk __devinitdata; /* maximum pixel clock */ 54static u16 maxclk; /* maximum pixel clock */
55static u16 maxvf __devinitdata; /* maximum vertical frequency */ 55static u16 maxvf; /* maximum vertical frequency */
56static u16 maxhf __devinitdata; /* maximum horizontal frequency */ 56static u16 maxhf; /* maximum horizontal frequency */
57static u16 vbemode __devinitdata; /* force use of a specific VBE mode */ 57static u16 vbemode; /* force use of a specific VBE mode */
58static char *mode_option __devinitdata; 58static char *mode_option;
59static u8 dac_width = 6; 59static u8 dac_width = 6;
60 60
61static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX]; 61static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX];
@@ -418,8 +418,8 @@ static void uvesafb_vbe_state_restore(struct uvesafb_par *par, u8 *state_buf)
418 uvesafb_free(task); 418 uvesafb_free(task);
419} 419}
420 420
421static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task, 421static int uvesafb_vbe_getinfo(struct uvesafb_ktask *task,
422 struct uvesafb_par *par) 422 struct uvesafb_par *par)
423{ 423{
424 int err; 424 int err;
425 425
@@ -477,8 +477,8 @@ static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task,
477 return 0; 477 return 0;
478} 478}
479 479
480static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task, 480static int uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
481 struct uvesafb_par *par) 481 struct uvesafb_par *par)
482{ 482{
483 int off = 0, err; 483 int off = 0, err;
484 u16 *mode; 484 u16 *mode;
@@ -556,8 +556,8 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
556 * x86 and not x86_64. 556 * x86 and not x86_64.
557 */ 557 */
558#ifdef CONFIG_X86_32 558#ifdef CONFIG_X86_32
559static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task, 559static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
560 struct uvesafb_par *par) 560 struct uvesafb_par *par)
561{ 561{
562 int i, err; 562 int i, err;
563 563
@@ -602,8 +602,8 @@ static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
602 * Check whether a video mode is supported by the Video BIOS and is 602 * Check whether a video mode is supported by the Video BIOS and is
603 * compatible with the monitor limits. 603 * compatible with the monitor limits.
604 */ 604 */
605static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode, 605static int uvesafb_is_valid_mode(struct fb_videomode *mode,
606 struct fb_info *info) 606 struct fb_info *info)
607{ 607{
608 if (info->monspecs.gtf) { 608 if (info->monspecs.gtf) {
609 fb_videomode_to_var(&info->var, mode); 609 fb_videomode_to_var(&info->var, mode);
@@ -618,8 +618,7 @@ static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode,
618 return 1; 618 return 1;
619} 619}
620 620
621static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task, 621static int uvesafb_vbe_getedid(struct uvesafb_ktask *task, struct fb_info *info)
622 struct fb_info *info)
623{ 622{
624 struct uvesafb_par *par = info->par; 623 struct uvesafb_par *par = info->par;
625 int err = 0; 624 int err = 0;
@@ -684,8 +683,8 @@ static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task,
684 return err; 683 return err;
685} 684}
686 685
687static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task, 686static void uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task,
688 struct fb_info *info) 687 struct fb_info *info)
689{ 688{
690 struct uvesafb_par *par = info->par; 689 struct uvesafb_par *par = info->par;
691 int i; 690 int i;
@@ -765,8 +764,8 @@ static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task,
765 return; 764 return;
766} 765}
767 766
768static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task, 767static void uvesafb_vbe_getstatesize(struct uvesafb_ktask *task,
769 struct uvesafb_par *par) 768 struct uvesafb_par *par)
770{ 769{
771 int err; 770 int err;
772 771
@@ -794,7 +793,7 @@ static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task,
794 par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff); 793 par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff);
795} 794}
796 795
797static int __devinit uvesafb_vbe_init(struct fb_info *info) 796static int uvesafb_vbe_init(struct fb_info *info)
798{ 797{
799 struct uvesafb_ktask *task = NULL; 798 struct uvesafb_ktask *task = NULL;
800 struct uvesafb_par *par = info->par; 799 struct uvesafb_par *par = info->par;
@@ -839,7 +838,7 @@ out: uvesafb_free(task);
839 return err; 838 return err;
840} 839}
841 840
842static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) 841static int uvesafb_vbe_init_mode(struct fb_info *info)
843{ 842{
844 struct list_head *pos; 843 struct list_head *pos;
845 struct fb_modelist *modelist; 844 struct fb_modelist *modelist;
@@ -1444,8 +1443,7 @@ static struct fb_ops uvesafb_ops = {
1444 .fb_set_par = uvesafb_set_par, 1443 .fb_set_par = uvesafb_set_par,
1445}; 1444};
1446 1445
1447static void __devinit uvesafb_init_info(struct fb_info *info, 1446static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
1448 struct vbe_mode_ib *mode)
1449{ 1447{
1450 unsigned int size_vmode; 1448 unsigned int size_vmode;
1451 unsigned int size_remap; 1449 unsigned int size_remap;
@@ -1540,7 +1538,7 @@ static void __devinit uvesafb_init_info(struct fb_info *info,
1540 info->fbops->fb_pan_display = NULL; 1538 info->fbops->fb_pan_display = NULL;
1541} 1539}
1542 1540
1543static void __devinit uvesafb_init_mtrr(struct fb_info *info) 1541static void uvesafb_init_mtrr(struct fb_info *info)
1544{ 1542{
1545#ifdef CONFIG_MTRR 1543#ifdef CONFIG_MTRR
1546 if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { 1544 if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) {
@@ -1582,7 +1580,7 @@ static void __devinit uvesafb_init_mtrr(struct fb_info *info)
1582#endif /* CONFIG_MTRR */ 1580#endif /* CONFIG_MTRR */
1583} 1581}
1584 1582
1585static void __devinit uvesafb_ioremap(struct fb_info *info) 1583static void uvesafb_ioremap(struct fb_info *info)
1586{ 1584{
1587#ifdef CONFIG_X86 1585#ifdef CONFIG_X86
1588 switch (mtrr) { 1586 switch (mtrr) {
@@ -1738,7 +1736,7 @@ static struct attribute_group uvesafb_dev_attgrp = {
1738 .attrs = uvesafb_dev_attrs, 1736 .attrs = uvesafb_dev_attrs,
1739}; 1737};
1740 1738
1741static int __devinit uvesafb_probe(struct platform_device *dev) 1739static int uvesafb_probe(struct platform_device *dev)
1742{ 1740{
1743 struct fb_info *info; 1741 struct fb_info *info;
1744 struct vbe_mode_ib *mode = NULL; 1742 struct vbe_mode_ib *mode = NULL;
@@ -1882,7 +1880,7 @@ static struct platform_driver uvesafb_driver = {
1882static struct platform_device *uvesafb_device; 1880static struct platform_device *uvesafb_device;
1883 1881
1884#ifndef MODULE 1882#ifndef MODULE
1885static int __devinit uvesafb_setup(char *options) 1883static int uvesafb_setup(char *options)
1886{ 1884{
1887 char *this_opt; 1885 char *this_opt;
1888 1886
@@ -1950,7 +1948,7 @@ static ssize_t store_v86d(struct device_driver *dev, const char *buf,
1950 1948
1951static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d); 1949static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d);
1952 1950
1953static int __devinit uvesafb_init(void) 1951static int uvesafb_init(void)
1954{ 1952{
1955 int err; 1953 int err;
1956 1954
@@ -1994,7 +1992,7 @@ static int __devinit uvesafb_init(void)
1994 1992
1995module_init(uvesafb_init); 1993module_init(uvesafb_init);
1996 1994
1997static void __devexit uvesafb_exit(void) 1995static void uvesafb_exit(void)
1998{ 1996{
1999 struct uvesafb_ktask *task; 1997 struct uvesafb_ktask *task;
2000 1998