diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/amba-clcd.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/corgi_bl.c | 10 | ||||
-rw-r--r-- | drivers/video/console/Kconfig | 8 | ||||
-rw-r--r-- | drivers/video/console/sticore.c | 126 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 2 | ||||
-rw-r--r-- | drivers/video/imxfb.c | 10 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 10 | ||||
-rw-r--r-- | drivers/video/s1d13xxxfb.c | 7 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.c | 27 | ||||
-rw-r--r-- | drivers/video/sa1100fb.c | 10 | ||||
-rw-r--r-- | drivers/video/w100fb.c | 46 |
11 files changed, 117 insertions, 140 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 321dbe91dc14..cde6fd8eb390 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | 24 | ||
25 | #include <asm/sizes.h> | ||
25 | #include <asm/hardware/amba.h> | 26 | #include <asm/hardware/amba.h> |
26 | #include <asm/hardware/clock.h> | 27 | #include <asm/hardware/clock.h> |
27 | 28 | ||
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c index 3c72c627e65e..1991fdb32dfb 100644 --- a/drivers/video/backlight/corgi_bl.c +++ b/drivers/video/backlight/corgi_bl.c | |||
@@ -73,17 +73,15 @@ static void corgibl_blank(int blank) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | #ifdef CONFIG_PM | 75 | #ifdef CONFIG_PM |
76 | static int corgibl_suspend(struct device *dev, pm_message_t state, u32 level) | 76 | static int corgibl_suspend(struct device *dev, pm_message_t state) |
77 | { | 77 | { |
78 | if (level == SUSPEND_POWER_DOWN) | 78 | corgibl_blank(FB_BLANK_POWERDOWN); |
79 | corgibl_blank(FB_BLANK_POWERDOWN); | ||
80 | return 0; | 79 | return 0; |
81 | } | 80 | } |
82 | 81 | ||
83 | static int corgibl_resume(struct device *dev, u32 level) | 82 | static int corgibl_resume(struct device *dev) |
84 | { | 83 | { |
85 | if (level == RESUME_POWER_ON) | 84 | corgibl_blank(FB_BLANK_UNBLANK); |
86 | corgibl_blank(FB_BLANK_UNBLANK); | ||
87 | return 0; | 85 | return 0; |
88 | } | 86 | } |
89 | #else | 87 | #else |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index eb83a7874c71..7e731691e2a9 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -110,7 +110,7 @@ config STI_CONSOLE | |||
110 | 110 | ||
111 | config FONTS | 111 | config FONTS |
112 | bool "Select compiled-in fonts" | 112 | bool "Select compiled-in fonts" |
113 | depends on FRAMEBUFFER_CONSOLE | 113 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
114 | help | 114 | help |
115 | Say Y here if you would like to use fonts other than the default | 115 | Say Y here if you would like to use fonts other than the default |
116 | your frame buffer console usually use. | 116 | your frame buffer console usually use. |
@@ -123,7 +123,7 @@ config FONTS | |||
123 | 123 | ||
124 | config FONT_8x8 | 124 | config FONT_8x8 |
125 | bool "VGA 8x8 font" if FONTS | 125 | bool "VGA 8x8 font" if FONTS |
126 | depends on FRAMEBUFFER_CONSOLE | 126 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
127 | default y if !SPARC32 && !SPARC64 && !FONTS | 127 | default y if !SPARC32 && !SPARC64 && !FONTS |
128 | help | 128 | help |
129 | This is the "high resolution" font for the VGA frame buffer (the one | 129 | This is the "high resolution" font for the VGA frame buffer (the one |
@@ -137,7 +137,7 @@ config FONT_8x8 | |||
137 | 137 | ||
138 | config FONT_8x16 | 138 | config FONT_8x16 |
139 | bool "VGA 8x16 font" if FONTS | 139 | bool "VGA 8x16 font" if FONTS |
140 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || USB_SISUSBVGA_CON | 140 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON |
141 | default y if !SPARC32 && !SPARC64 && !FONTS | 141 | default y if !SPARC32 && !SPARC64 && !FONTS |
142 | help | 142 | help |
143 | This is the "high resolution" font for the VGA frame buffer (the one | 143 | This is the "high resolution" font for the VGA frame buffer (the one |
@@ -147,7 +147,7 @@ config FONT_8x16 | |||
147 | 147 | ||
148 | config FONT_6x11 | 148 | config FONT_6x11 |
149 | bool "Mac console 6x11 font (not supported by all drivers)" if FONTS | 149 | bool "Mac console 6x11 font (not supported by all drivers)" if FONTS |
150 | depends on FRAMEBUFFER_CONSOLE | 150 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
151 | default y if !SPARC32 && !SPARC64 && !FONTS && MAC | 151 | default y if !SPARC32 && !SPARC64 && !FONTS && MAC |
152 | help | 152 | help |
153 | Small console font with Macintosh-style high-half glyphs. Some Mac | 153 | Small console font with Macintosh-style high-half glyphs. Some Mac |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index d940f605acb6..a7bcd17112c0 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -511,12 +511,12 @@ sti_select_fbfont( struct sti_cooked_rom *cooked_rom, char *fbfont_name ) | |||
511 | struct sti_cooked_font *cooked_font; | 511 | struct sti_cooked_font *cooked_font; |
512 | 512 | ||
513 | if (!fbfont_name || !strlen(fbfont_name)) | 513 | if (!fbfont_name || !strlen(fbfont_name)) |
514 | return NULL; | 514 | return NULL; |
515 | fbfont = find_font(fbfont_name); | 515 | fbfont = find_font(fbfont_name); |
516 | if (!fbfont) | 516 | if (!fbfont) |
517 | fbfont = get_default_font(1024,768); | 517 | fbfont = get_default_font(1024,768); |
518 | if (!fbfont) | 518 | if (!fbfont) |
519 | return NULL; | 519 | return NULL; |
520 | 520 | ||
521 | DPRINTK((KERN_DEBUG "selected %dx%d fb-font %s\n", | 521 | DPRINTK((KERN_DEBUG "selected %dx%d fb-font %s\n", |
522 | fbfont->width, fbfont->height, fbfont->name)); | 522 | fbfont->width, fbfont->height, fbfont->name)); |
@@ -527,7 +527,7 @@ sti_select_fbfont( struct sti_cooked_rom *cooked_rom, char *fbfont_name ) | |||
527 | 527 | ||
528 | nf = kmalloc(size, GFP_KERNEL); | 528 | nf = kmalloc(size, GFP_KERNEL); |
529 | if (!nf) | 529 | if (!nf) |
530 | return NULL; | 530 | return NULL; |
531 | memset(nf, 0, size); | 531 | memset(nf, 0, size); |
532 | 532 | ||
533 | nf->first_char = 0; | 533 | nf->first_char = 0; |
@@ -546,8 +546,8 @@ sti_select_fbfont( struct sti_cooked_rom *cooked_rom, char *fbfont_name ) | |||
546 | 546 | ||
547 | cooked_font = kmalloc(sizeof(*cooked_font), GFP_KERNEL); | 547 | cooked_font = kmalloc(sizeof(*cooked_font), GFP_KERNEL); |
548 | if (!cooked_font) { | 548 | if (!cooked_font) { |
549 | kfree(nf); | 549 | kfree(nf); |
550 | return NULL; | 550 | return NULL; |
551 | } | 551 | } |
552 | 552 | ||
553 | cooked_font->raw = nf; | 553 | cooked_font->raw = nf; |
@@ -595,7 +595,7 @@ sti_select_font(struct sti_cooked_rom *rom, | |||
595 | static void __init | 595 | static void __init |
596 | sti_dump_rom(struct sti_rom *rom) | 596 | sti_dump_rom(struct sti_rom *rom) |
597 | { | 597 | { |
598 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", | 598 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", |
599 | rom->graphics_id[0], | 599 | rom->graphics_id[0], |
600 | rom->graphics_id[1], | 600 | rom->graphics_id[1], |
601 | rom->revno[0] >> 4, | 601 | rom->revno[0] >> 4, |
@@ -651,15 +651,16 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width) | |||
651 | struct sti_cooked_font *font; | 651 | struct sti_cooked_font *font; |
652 | int i = 0; | 652 | int i = 0; |
653 | 653 | ||
654 | for(font = rom->font_start; font; font = font->next_font, i++) { | 654 | for (font = rom->font_start; font; font = font->next_font, i++) { |
655 | if((font->raw->width == width) && (font->raw->height == height)) | 655 | if ((font->raw->width == width) && |
656 | (font->raw->height == height)) | ||
656 | return i; | 657 | return i; |
657 | } | 658 | } |
658 | return 0; | 659 | return 0; |
659 | } | 660 | } |
660 | 661 | ||
661 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; | 662 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; |
662 | #define BMODE_LAST_ADDR_OFFS 0x50 | 663 | #define BMODE_LAST_ADDR_OFFS 0x50 |
663 | 664 | ||
664 | static void * __init | 665 | static void * __init |
665 | sti_bmode_font_raw(struct sti_cooked_font *f) | 666 | sti_bmode_font_raw(struct sti_cooked_font *f) |
@@ -700,35 +701,35 @@ sti_get_bmode_rom (unsigned long address) | |||
700 | { | 701 | { |
701 | struct sti_rom *raw; | 702 | struct sti_rom *raw; |
702 | u32 size; | 703 | u32 size; |
703 | struct sti_rom_font *raw_font, *font_start; | 704 | struct sti_rom_font *raw_font, *font_start; |
704 | 705 | ||
705 | sti_bmode_rom_copy(address + BMODE_LAST_ADDR_OFFS, sizeof(size), &size); | 706 | sti_bmode_rom_copy(address + BMODE_LAST_ADDR_OFFS, sizeof(size), &size); |
706 | 707 | ||
707 | size = (size+3) / 4; | 708 | size = (size+3) / 4; |
708 | raw = kmalloc(size, GFP_KERNEL); | 709 | raw = kmalloc(size, GFP_KERNEL); |
709 | if (raw) { | 710 | if (raw) { |
710 | sti_bmode_rom_copy(address, size, raw); | 711 | sti_bmode_rom_copy(address, size, raw); |
711 | memmove (&raw->res004, &raw->type[0], 0x3c); | 712 | memmove (&raw->res004, &raw->type[0], 0x3c); |
712 | raw->type[3] = raw->res004; | 713 | raw->type[3] = raw->res004; |
713 | 714 | ||
714 | BMODE_RELOCATE (raw->region_list); | 715 | BMODE_RELOCATE (raw->region_list); |
715 | BMODE_RELOCATE (raw->font_start); | 716 | BMODE_RELOCATE (raw->font_start); |
716 | 717 | ||
717 | BMODE_RELOCATE (raw->init_graph); | 718 | BMODE_RELOCATE (raw->init_graph); |
718 | BMODE_RELOCATE (raw->state_mgmt); | 719 | BMODE_RELOCATE (raw->state_mgmt); |
719 | BMODE_RELOCATE (raw->font_unpmv); | 720 | BMODE_RELOCATE (raw->font_unpmv); |
720 | BMODE_RELOCATE (raw->block_move); | 721 | BMODE_RELOCATE (raw->block_move); |
721 | BMODE_RELOCATE (raw->inq_conf); | 722 | BMODE_RELOCATE (raw->inq_conf); |
722 | 723 | ||
723 | raw_font = ((void *)raw) + raw->font_start; | 724 | raw_font = ((void *)raw) + raw->font_start; |
724 | font_start = raw_font; | 725 | font_start = raw_font; |
725 | 726 | ||
726 | while (raw_font->next_font) { | 727 | while (raw_font->next_font) { |
727 | BMODE_RELOCATE (raw_font->next_font); | 728 | BMODE_RELOCATE (raw_font->next_font); |
728 | raw_font = ((void *)font_start) + raw_font->next_font; | 729 | raw_font = ((void *)font_start) + raw_font->next_font; |
729 | } | 730 | } |
730 | } | 731 | } |
731 | return raw; | 732 | return raw; |
732 | } | 733 | } |
733 | 734 | ||
734 | struct sti_rom * __init | 735 | struct sti_rom * __init |
@@ -736,15 +737,15 @@ sti_get_wmode_rom (unsigned long address) | |||
736 | { | 737 | { |
737 | struct sti_rom *raw; | 738 | struct sti_rom *raw; |
738 | unsigned long size; | 739 | unsigned long size; |
739 | 740 | ||
740 | /* read the ROM size directly from the struct in ROM */ | 741 | /* read the ROM size directly from the struct in ROM */ |
741 | size = gsc_readl(address + offsetof(struct sti_rom,last_addr)); | 742 | size = gsc_readl(address + offsetof(struct sti_rom,last_addr)); |
742 | 743 | ||
743 | raw = kmalloc(size, GFP_KERNEL); | 744 | raw = kmalloc(size, GFP_KERNEL); |
744 | if(raw) | 745 | if (raw) |
745 | sti_rom_copy(address, size, raw); | 746 | sti_rom_copy(address, size, raw); |
746 | 747 | ||
747 | return raw; | 748 | return raw; |
748 | } | 749 | } |
749 | 750 | ||
750 | int __init | 751 | int __init |
@@ -757,14 +758,14 @@ sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) | |||
757 | if (!cooked) | 758 | if (!cooked) |
758 | goto out_err; | 759 | goto out_err; |
759 | 760 | ||
760 | if (wordmode) | 761 | if (wordmode) |
761 | raw = sti_get_wmode_rom (address); | 762 | raw = sti_get_wmode_rom (address); |
762 | else | 763 | else |
763 | raw = sti_get_bmode_rom (address); | 764 | raw = sti_get_bmode_rom (address); |
765 | |||
766 | if (!raw) | ||
767 | goto out_err; | ||
764 | 768 | ||
765 | if (!raw) | ||
766 | goto out_err; | ||
767 | |||
768 | if (!sti_cook_fonts(cooked, raw)) { | 769 | if (!sti_cook_fonts(cooked, raw)) { |
769 | printk(KERN_ERR "No font found for STI at %08lx\n", address); | 770 | printk(KERN_ERR "No font found for STI at %08lx\n", address); |
770 | goto out_err; | 771 | goto out_err; |
@@ -787,7 +788,7 @@ sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) | |||
787 | sti->font_width = sti->font->raw->width; | 788 | sti->font_width = sti->font->raw->width; |
788 | sti->font_height = sti->font->raw->height; | 789 | sti->font_height = sti->font->raw->height; |
789 | if (!wordmode) | 790 | if (!wordmode) |
790 | sti->font->raw = sti_bmode_font_raw(sti->font); | 791 | sti->font->raw = sti_bmode_font_raw(sti->font); |
791 | 792 | ||
792 | sti->sti_mem_request = raw->sti_mem_req; | 793 | sti->sti_mem_request = raw->sti_mem_req; |
793 | sti->graphics_id[0] = raw->graphics_id[0]; | 794 | sti->graphics_id[0] = raw->graphics_id[0]; |
@@ -811,16 +812,16 @@ sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd | |||
811 | u32 sig; | 812 | u32 sig; |
812 | 813 | ||
813 | if (num_sti_roms >= MAX_STI_ROMS) { | 814 | if (num_sti_roms >= MAX_STI_ROMS) { |
814 | printk(KERN_WARNING "maximum number of STI ROMS reached !\n"); | 815 | printk(KERN_WARNING "maximum number of STI ROMS reached !\n"); |
815 | return NULL; | 816 | return NULL; |
816 | } | 817 | } |
817 | 818 | ||
818 | sti = kmalloc(sizeof(*sti), GFP_KERNEL); | 819 | sti = kmalloc(sizeof(*sti), GFP_KERNEL); |
819 | if (!sti) { | 820 | if (!sti) { |
820 | printk(KERN_ERR "Not enough memory !\n"); | 821 | printk(KERN_ERR "Not enough memory !\n"); |
821 | return NULL; | 822 | return NULL; |
822 | } | 823 | } |
823 | 824 | ||
824 | memset(sti, 0, sizeof(*sti)); | 825 | memset(sti, 0, sizeof(*sti)); |
825 | spin_lock_init(&sti->lock); | 826 | spin_lock_init(&sti->lock); |
826 | 827 | ||
@@ -932,28 +933,21 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p | |||
932 | */ | 933 | */ |
933 | static int __init sticore_pa_init(struct parisc_device *dev) | 934 | static int __init sticore_pa_init(struct parisc_device *dev) |
934 | { | 935 | { |
935 | unsigned long rom = 0; | ||
936 | char pa_path[21]; | 936 | char pa_path[21]; |
937 | struct sti_struct *sti = NULL; | 937 | struct sti_struct *sti = NULL; |
938 | 938 | int hpa = dev->hpa.start; | |
939 | if(dev->num_addrs) { | 939 | |
940 | rom = dev->addr[0]; | 940 | if (dev->num_addrs && dev->addr[0]) |
941 | } | 941 | sti = sti_try_rom_generic(dev->addr[0], hpa, NULL); |
942 | if (!rom) { | 942 | if (!sti) |
943 | rom = dev->hpa; | 943 | sti = sti_try_rom_generic(hpa, hpa, NULL); |
944 | DPRINTK((KERN_DEBUG "Trying STI ROM at %08lx, hpa at %08lx\n", rom, dev->hpa)); | 944 | if (!sti) |
945 | sti = sti_try_rom_generic(rom, dev->hpa, NULL); | 945 | sti = sti_try_rom_generic(PAGE0->proc_sti, hpa, NULL); |
946 | rom = PAGE0->proc_sti; | ||
947 | } | ||
948 | if (!sti) { | ||
949 | DPRINTK((KERN_DEBUG "Trying STI ROM at %08lx, hpa at %08lx\n", rom, dev->hpa)); | ||
950 | sti = sti_try_rom_generic(rom, dev->hpa, NULL); | ||
951 | } | ||
952 | if (!sti) | 946 | if (!sti) |
953 | return 1; | 947 | return 1; |
954 | 948 | ||
955 | print_pa_hwpath(dev, pa_path); | 949 | print_pa_hwpath(dev, pa_path); |
956 | sticore_check_for_default_sti (sti, pa_path); | 950 | sticore_check_for_default_sti(sti, pa_path); |
957 | return 0; | 951 | return 0; |
958 | } | 952 | } |
959 | 953 | ||
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 70be7009f8af..9073be4221a8 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1031,7 +1031,7 @@ register_framebuffer(struct fb_info *fb_info) | |||
1031 | break; | 1031 | break; |
1032 | fb_info->node = i; | 1032 | fb_info->node = i; |
1033 | 1033 | ||
1034 | fb_info->class_device = class_device_create(fb_class, MKDEV(FB_MAJOR, i), | 1034 | fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i), |
1035 | fb_info->device, "fb%d", i); | 1035 | fb_info->device, "fb%d", i); |
1036 | if (IS_ERR(fb_info->class_device)) { | 1036 | if (IS_ERR(fb_info->class_device)) { |
1037 | /* Not fatal */ | 1037 | /* Not fatal */ |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 1d54d3d6960b..0b9301facbd3 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -424,23 +424,21 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi) | |||
424 | * Power management hooks. Note that we won't be called from IRQ context, | 424 | * Power management hooks. Note that we won't be called from IRQ context, |
425 | * unlike the blank functions above, so we may sleep. | 425 | * unlike the blank functions above, so we may sleep. |
426 | */ | 426 | */ |
427 | static int imxfb_suspend(struct device *dev, pm_message_t state, u32 level) | 427 | static int imxfb_suspend(struct device *dev, pm_message_t state) |
428 | { | 428 | { |
429 | struct imxfb_info *fbi = dev_get_drvdata(dev); | 429 | struct imxfb_info *fbi = dev_get_drvdata(dev); |
430 | pr_debug("%s\n",__FUNCTION__); | 430 | pr_debug("%s\n",__FUNCTION__); |
431 | 431 | ||
432 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) | 432 | imxfb_disable_controller(fbi); |
433 | imxfb_disable_controller(fbi); | ||
434 | return 0; | 433 | return 0; |
435 | } | 434 | } |
436 | 435 | ||
437 | static int imxfb_resume(struct device *dev, u32 level) | 436 | static int imxfb_resume(struct device *dev) |
438 | { | 437 | { |
439 | struct imxfb_info *fbi = dev_get_drvdata(dev); | 438 | struct imxfb_info *fbi = dev_get_drvdata(dev); |
440 | pr_debug("%s\n",__FUNCTION__); | 439 | pr_debug("%s\n",__FUNCTION__); |
441 | 440 | ||
442 | if (level == RESUME_ENABLE) | 441 | imxfb_enable_controller(fbi); |
443 | imxfb_enable_controller(fbi); | ||
444 | return 0; | 442 | return 0; |
445 | } | 443 | } |
446 | #else | 444 | #else |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 194eed0a238c..6206da9dd5da 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -981,21 +981,19 @@ pxafb_freq_policy(struct notifier_block *nb, unsigned long val, void *data) | |||
981 | * Power management hooks. Note that we won't be called from IRQ context, | 981 | * Power management hooks. Note that we won't be called from IRQ context, |
982 | * unlike the blank functions above, so we may sleep. | 982 | * unlike the blank functions above, so we may sleep. |
983 | */ | 983 | */ |
984 | static int pxafb_suspend(struct device *dev, pm_message_t state, u32 level) | 984 | static int pxafb_suspend(struct device *dev, pm_message_t state) |
985 | { | 985 | { |
986 | struct pxafb_info *fbi = dev_get_drvdata(dev); | 986 | struct pxafb_info *fbi = dev_get_drvdata(dev); |
987 | 987 | ||
988 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) | 988 | set_ctrlr_state(fbi, C_DISABLE_PM); |
989 | set_ctrlr_state(fbi, C_DISABLE_PM); | ||
990 | return 0; | 989 | return 0; |
991 | } | 990 | } |
992 | 991 | ||
993 | static int pxafb_resume(struct device *dev, u32 level) | 992 | static int pxafb_resume(struct device *dev) |
994 | { | 993 | { |
995 | struct pxafb_info *fbi = dev_get_drvdata(dev); | 994 | struct pxafb_info *fbi = dev_get_drvdata(dev); |
996 | 995 | ||
997 | if (level == RESUME_ENABLE) | 996 | set_ctrlr_state(fbi, C_ENABLE_PM); |
998 | set_ctrlr_state(fbi, C_ENABLE_PM); | ||
999 | return 0; | 997 | return 0; |
1000 | } | 998 | } |
1001 | #else | 999 | #else |
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index fa98d91c42eb..cb2f7a1de947 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
@@ -655,7 +655,7 @@ bail: | |||
655 | } | 655 | } |
656 | 656 | ||
657 | #ifdef CONFIG_PM | 657 | #ifdef CONFIG_PM |
658 | static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state, u32 level) | 658 | static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state) |
659 | { | 659 | { |
660 | struct fb_info *info = dev_get_drvdata(dev); | 660 | struct fb_info *info = dev_get_drvdata(dev); |
661 | struct s1d13xxxfb_par *s1dfb = info->par; | 661 | struct s1d13xxxfb_par *s1dfb = info->par; |
@@ -702,15 +702,12 @@ static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state, u32 level) | |||
702 | return 0; | 702 | return 0; |
703 | } | 703 | } |
704 | 704 | ||
705 | static int s1d13xxxfb_resume(struct device *dev, u32 level) | 705 | static int s1d13xxxfb_resume(struct device *dev) |
706 | { | 706 | { |
707 | struct fb_info *info = dev_get_drvdata(dev); | 707 | struct fb_info *info = dev_get_drvdata(dev); |
708 | struct s1d13xxxfb_par *s1dfb = info->par; | 708 | struct s1d13xxxfb_par *s1dfb = info->par; |
709 | struct s1d13xxxfb_pdata *pdata = NULL; | 709 | struct s1d13xxxfb_pdata *pdata = NULL; |
710 | 710 | ||
711 | if (level != RESUME_ENABLE) | ||
712 | return 0; | ||
713 | |||
714 | /* awaken the chip */ | 711 | /* awaken the chip */ |
715 | s1d13xxxfb_writereg(s1dfb, S1DREG_PS_CNF, 0x10); | 712 | s1d13xxxfb_writereg(s1dfb, S1DREG_PS_CNF, 0x10); |
716 | 713 | ||
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 5ab79afb53b7..3862d3cb1fb2 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -847,37 +847,32 @@ static int s3c2410fb_remove(struct device *dev) | |||
847 | 847 | ||
848 | /* suspend and resume support for the lcd controller */ | 848 | /* suspend and resume support for the lcd controller */ |
849 | 849 | ||
850 | static int s3c2410fb_suspend(struct device *dev, pm_message_t state, u32 level) | 850 | static int s3c2410fb_suspend(struct device *dev, pm_message_t state) |
851 | { | 851 | { |
852 | struct fb_info *fbinfo = dev_get_drvdata(dev); | 852 | struct fb_info *fbinfo = dev_get_drvdata(dev); |
853 | struct s3c2410fb_info *info = fbinfo->par; | 853 | struct s3c2410fb_info *info = fbinfo->par; |
854 | 854 | ||
855 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) { | 855 | s3c2410fb_stop_lcd(); |
856 | s3c2410fb_stop_lcd(); | ||
857 | 856 | ||
858 | /* sleep before disabling the clock, we need to ensure | 857 | /* sleep before disabling the clock, we need to ensure |
859 | * the LCD DMA engine is not going to get back on the bus | 858 | * the LCD DMA engine is not going to get back on the bus |
860 | * before the clock goes off again (bjd) */ | 859 | * before the clock goes off again (bjd) */ |
861 | 860 | ||
862 | msleep(1); | 861 | msleep(1); |
863 | clk_disable(info->clk); | 862 | clk_disable(info->clk); |
864 | } | ||
865 | 863 | ||
866 | return 0; | 864 | return 0; |
867 | } | 865 | } |
868 | 866 | ||
869 | static int s3c2410fb_resume(struct device *dev, u32 level) | 867 | static int s3c2410fb_resume(struct device *dev) |
870 | { | 868 | { |
871 | struct fb_info *fbinfo = dev_get_drvdata(dev); | 869 | struct fb_info *fbinfo = dev_get_drvdata(dev); |
872 | struct s3c2410fb_info *info = fbinfo->par; | 870 | struct s3c2410fb_info *info = fbinfo->par; |
873 | 871 | ||
874 | if (level == RESUME_ENABLE) { | 872 | clk_enable(info->clk); |
875 | clk_enable(info->clk); | 873 | msleep(1); |
876 | msleep(1); | ||
877 | |||
878 | s3c2410fb_init_registers(info); | ||
879 | 874 | ||
880 | } | 875 | s3c2410fb_init_registers(info); |
881 | 876 | ||
882 | return 0; | 877 | return 0; |
883 | } | 878 | } |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 8000890e4271..78e5f194b0df 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -1309,21 +1309,19 @@ sa1100fb_freq_policy(struct notifier_block *nb, unsigned long val, | |||
1309 | * Power management hooks. Note that we won't be called from IRQ context, | 1309 | * Power management hooks. Note that we won't be called from IRQ context, |
1310 | * unlike the blank functions above, so we may sleep. | 1310 | * unlike the blank functions above, so we may sleep. |
1311 | */ | 1311 | */ |
1312 | static int sa1100fb_suspend(struct device *dev, pm_message_t state, u32 level) | 1312 | static int sa1100fb_suspend(struct device *dev, pm_message_t state) |
1313 | { | 1313 | { |
1314 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); | 1314 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); |
1315 | 1315 | ||
1316 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) | 1316 | set_ctrlr_state(fbi, C_DISABLE_PM); |
1317 | set_ctrlr_state(fbi, C_DISABLE_PM); | ||
1318 | return 0; | 1317 | return 0; |
1319 | } | 1318 | } |
1320 | 1319 | ||
1321 | static int sa1100fb_resume(struct device *dev, u32 level) | 1320 | static int sa1100fb_resume(struct device *dev) |
1322 | { | 1321 | { |
1323 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); | 1322 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); |
1324 | 1323 | ||
1325 | if (level == RESUME_ENABLE) | 1324 | set_ctrlr_state(fbi, C_ENABLE_PM); |
1326 | set_ctrlr_state(fbi, C_ENABLE_PM); | ||
1327 | return 0; | 1325 | return 0; |
1328 | } | 1326 | } |
1329 | #else | 1327 | #else |
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 0030c071da8f..752bf88906a9 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
@@ -438,36 +438,34 @@ static void w100fb_restore_vidmem(struct w100fb_par *par) | |||
438 | } | 438 | } |
439 | } | 439 | } |
440 | 440 | ||
441 | static int w100fb_suspend(struct device *dev, pm_message_t state, uint32_t level) | 441 | static int w100fb_suspend(struct device *dev, pm_message_t state) |
442 | { | 442 | { |
443 | if (level == SUSPEND_POWER_DOWN) { | 443 | struct fb_info *info = dev_get_drvdata(dev); |
444 | struct fb_info *info = dev_get_drvdata(dev); | 444 | struct w100fb_par *par=info->par; |
445 | struct w100fb_par *par=info->par; | 445 | struct w100_tg_info *tg = par->mach->tg; |
446 | struct w100_tg_info *tg = par->mach->tg; | 446 | |
447 | 447 | w100fb_save_vidmem(par); | |
448 | w100fb_save_vidmem(par); | 448 | if(tg && tg->suspend) |
449 | if(tg && tg->suspend) | 449 | tg->suspend(par); |
450 | tg->suspend(par); | 450 | w100_suspend(W100_SUSPEND_ALL); |
451 | w100_suspend(W100_SUSPEND_ALL); | 451 | par->blanked = 1; |
452 | par->blanked = 1; | 452 | |
453 | } | ||
454 | return 0; | 453 | return 0; |
455 | } | 454 | } |
456 | 455 | ||
457 | static int w100fb_resume(struct device *dev, uint32_t level) | 456 | static int w100fb_resume(struct device *dev) |
458 | { | 457 | { |
459 | if (level == RESUME_POWER_ON) { | 458 | struct fb_info *info = dev_get_drvdata(dev); |
460 | struct fb_info *info = dev_get_drvdata(dev); | 459 | struct w100fb_par *par=info->par; |
461 | struct w100fb_par *par=info->par; | 460 | struct w100_tg_info *tg = par->mach->tg; |
462 | struct w100_tg_info *tg = par->mach->tg; | 461 | |
462 | w100_hw_init(par); | ||
463 | w100fb_activate_var(par); | ||
464 | w100fb_restore_vidmem(par); | ||
465 | if(tg && tg->resume) | ||
466 | tg->resume(par); | ||
467 | par->blanked = 0; | ||
463 | 468 | ||
464 | w100_hw_init(par); | ||
465 | w100fb_activate_var(par); | ||
466 | w100fb_restore_vidmem(par); | ||
467 | if(tg && tg->resume) | ||
468 | tg->resume(par); | ||
469 | par->blanked = 0; | ||
470 | } | ||
471 | return 0; | 469 | return 0; |
472 | } | 470 | } |
473 | #else | 471 | #else |