aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-26 15:43:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-26 15:43:57 -0500
commit0dbfe8ddaaab9fe5bc8672c064d3ede6cd66201a (patch)
tree93eefb55eb9a9e41053e6de032e49e92c7be5574 /drivers/video
parent87f71ae2dd7471c1b4c94100be1f218e91dc64c3 (diff)
parent2a3535069e33d8b416f406c159ce924427315303 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Fix assembler constraint to prevent overeager gcc optimisation mac_esp: rename irq mac_scsi: dont enable mac_scsi irq before requesting it macfb: fix black and white modes m68k/irq: Remove obsolete IRQ_FLG_* definitions Fix up trivial conflict in arch/m68k/kernel/process_mm.c as per Geert.
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/macfb.c60
1 files changed, 28 insertions, 32 deletions
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
index 43207cc6cc19..fe01add3700e 100644
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -592,12 +592,12 @@ static int __init macfb_init(void)
592 if (!fb_info.screen_base) 592 if (!fb_info.screen_base)
593 return -ENODEV; 593 return -ENODEV;
594 594
595 printk("macfb: framebuffer at 0x%08lx, mapped to 0x%p, size %dk\n", 595 pr_info("macfb: framebuffer at 0x%08lx, mapped to 0x%p, size %dk\n",
596 macfb_fix.smem_start, fb_info.screen_base, 596 macfb_fix.smem_start, fb_info.screen_base,
597 macfb_fix.smem_len / 1024); 597 macfb_fix.smem_len / 1024);
598 printk("macfb: mode is %dx%dx%d, linelength=%d\n", 598 pr_info("macfb: mode is %dx%dx%d, linelength=%d\n",
599 macfb_defined.xres, macfb_defined.yres, 599 macfb_defined.xres, macfb_defined.yres,
600 macfb_defined.bits_per_pixel, macfb_fix.line_length); 600 macfb_defined.bits_per_pixel, macfb_fix.line_length);
601 601
602 /* Fill in the available video resolution */ 602 /* Fill in the available video resolution */
603 macfb_defined.xres_virtual = macfb_defined.xres; 603 macfb_defined.xres_virtual = macfb_defined.xres;
@@ -613,14 +613,10 @@ static int __init macfb_init(void)
613 613
614 switch (macfb_defined.bits_per_pixel) { 614 switch (macfb_defined.bits_per_pixel) {
615 case 1: 615 case 1:
616 /*
617 * XXX: I think this will catch any program that tries
618 * to do FBIO_PUTCMAP when the visual is monochrome.
619 */
620 macfb_defined.red.length = macfb_defined.bits_per_pixel; 616 macfb_defined.red.length = macfb_defined.bits_per_pixel;
621 macfb_defined.green.length = macfb_defined.bits_per_pixel; 617 macfb_defined.green.length = macfb_defined.bits_per_pixel;
622 macfb_defined.blue.length = macfb_defined.bits_per_pixel; 618 macfb_defined.blue.length = macfb_defined.bits_per_pixel;
623 video_cmap_len = 0; 619 video_cmap_len = 2;
624 macfb_fix.visual = FB_VISUAL_MONO01; 620 macfb_fix.visual = FB_VISUAL_MONO01;
625 break; 621 break;
626 case 2: 622 case 2:
@@ -660,11 +656,10 @@ static int __init macfb_init(void)
660 macfb_fix.visual = FB_VISUAL_TRUECOLOR; 656 macfb_fix.visual = FB_VISUAL_TRUECOLOR;
661 break; 657 break;
662 default: 658 default:
663 video_cmap_len = 0; 659 pr_err("macfb: unknown or unsupported bit depth: %d\n",
664 macfb_fix.visual = FB_VISUAL_MONO01;
665 printk("macfb: unknown or unsupported bit depth: %d\n",
666 macfb_defined.bits_per_pixel); 660 macfb_defined.bits_per_pixel);
667 break; 661 err = -EINVAL;
662 goto fail_unmap;
668 } 663 }
669 664
670 /* 665 /*
@@ -734,8 +729,8 @@ static int __init macfb_init(void)
734 case MAC_MODEL_Q950: 729 case MAC_MODEL_Q950:
735 strcpy(macfb_fix.id, "DAFB"); 730 strcpy(macfb_fix.id, "DAFB");
736 macfb_setpalette = dafb_setpalette; 731 macfb_setpalette = dafb_setpalette;
737 macfb_defined.activate = FB_ACTIVATE_NOW;
738 dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000); 732 dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000);
733 macfb_defined.activate = FB_ACTIVATE_NOW;
739 break; 734 break;
740 735
741 /* 736 /*
@@ -744,8 +739,8 @@ static int __init macfb_init(void)
744 case MAC_MODEL_LCII: 739 case MAC_MODEL_LCII:
745 strcpy(macfb_fix.id, "V8"); 740 strcpy(macfb_fix.id, "V8");
746 macfb_setpalette = v8_brazil_setpalette; 741 macfb_setpalette = v8_brazil_setpalette;
747 macfb_defined.activate = FB_ACTIVATE_NOW;
748 v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); 742 v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
743 macfb_defined.activate = FB_ACTIVATE_NOW;
749 break; 744 break;
750 745
751 /* 746 /*
@@ -758,8 +753,8 @@ static int __init macfb_init(void)
758 case MAC_MODEL_P600: 753 case MAC_MODEL_P600:
759 strcpy(macfb_fix.id, "Brazil"); 754 strcpy(macfb_fix.id, "Brazil");
760 macfb_setpalette = v8_brazil_setpalette; 755 macfb_setpalette = v8_brazil_setpalette;
761 macfb_defined.activate = FB_ACTIVATE_NOW;
762 v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); 756 v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
757 macfb_defined.activate = FB_ACTIVATE_NOW;
763 break; 758 break;
764 759
765 /* 760 /*
@@ -773,10 +768,10 @@ static int __init macfb_init(void)
773 case MAC_MODEL_P520: 768 case MAC_MODEL_P520:
774 case MAC_MODEL_P550: 769 case MAC_MODEL_P550:
775 case MAC_MODEL_P460: 770 case MAC_MODEL_P460:
776 macfb_setpalette = v8_brazil_setpalette;
777 macfb_defined.activate = FB_ACTIVATE_NOW;
778 strcpy(macfb_fix.id, "Sonora"); 771 strcpy(macfb_fix.id, "Sonora");
772 macfb_setpalette = v8_brazil_setpalette;
779 v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); 773 v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
774 macfb_defined.activate = FB_ACTIVATE_NOW;
780 break; 775 break;
781 776
782 /* 777 /*
@@ -786,10 +781,10 @@ static int __init macfb_init(void)
786 */ 781 */
787 case MAC_MODEL_IICI: 782 case MAC_MODEL_IICI:
788 case MAC_MODEL_IISI: 783 case MAC_MODEL_IISI:
789 macfb_setpalette = rbv_setpalette;
790 macfb_defined.activate = FB_ACTIVATE_NOW;
791 strcpy(macfb_fix.id, "RBV"); 784 strcpy(macfb_fix.id, "RBV");
785 macfb_setpalette = rbv_setpalette;
792 rbv_cmap_regs = ioremap(DAC_BASE, 0x1000); 786 rbv_cmap_regs = ioremap(DAC_BASE, 0x1000);
787 macfb_defined.activate = FB_ACTIVATE_NOW;
793 break; 788 break;
794 789
795 /* 790 /*
@@ -797,10 +792,10 @@ static int __init macfb_init(void)
797 */ 792 */
798 case MAC_MODEL_Q840: 793 case MAC_MODEL_Q840:
799 case MAC_MODEL_C660: 794 case MAC_MODEL_C660:
800 macfb_setpalette = civic_setpalette;
801 macfb_defined.activate = FB_ACTIVATE_NOW;
802 strcpy(macfb_fix.id, "Civic"); 795 strcpy(macfb_fix.id, "Civic");
796 macfb_setpalette = civic_setpalette;
803 civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000); 797 civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
798 macfb_defined.activate = FB_ACTIVATE_NOW;
804 break; 799 break;
805 800
806 801
@@ -809,26 +804,26 @@ static int __init macfb_init(void)
809 * We think this may be like the LC II 804 * We think this may be like the LC II
810 */ 805 */
811 case MAC_MODEL_LC: 806 case MAC_MODEL_LC:
807 strcpy(macfb_fix.id, "LC");
812 if (vidtest) { 808 if (vidtest) {
813 macfb_setpalette = v8_brazil_setpalette; 809 macfb_setpalette = v8_brazil_setpalette;
814 macfb_defined.activate = FB_ACTIVATE_NOW;
815 v8_brazil_cmap_regs = 810 v8_brazil_cmap_regs =
816 ioremap(DAC_BASE, 0x1000); 811 ioremap(DAC_BASE, 0x1000);
812 macfb_defined.activate = FB_ACTIVATE_NOW;
817 } 813 }
818 strcpy(macfb_fix.id, "LC");
819 break; 814 break;
820 815
821 /* 816 /*
822 * We think this may be like the LC II 817 * We think this may be like the LC II
823 */ 818 */
824 case MAC_MODEL_CCL: 819 case MAC_MODEL_CCL:
820 strcpy(macfb_fix.id, "Color Classic");
825 if (vidtest) { 821 if (vidtest) {
826 macfb_setpalette = v8_brazil_setpalette; 822 macfb_setpalette = v8_brazil_setpalette;
827 macfb_defined.activate = FB_ACTIVATE_NOW;
828 v8_brazil_cmap_regs = 823 v8_brazil_cmap_regs =
829 ioremap(DAC_BASE, 0x1000); 824 ioremap(DAC_BASE, 0x1000);
825 macfb_defined.activate = FB_ACTIVATE_NOW;
830 } 826 }
831 strcpy(macfb_fix.id, "Color Classic");
832 break; 827 break;
833 828
834 /* 829 /*
@@ -893,10 +888,10 @@ static int __init macfb_init(void)
893 case MAC_MODEL_PB270C: 888 case MAC_MODEL_PB270C:
894 case MAC_MODEL_PB280: 889 case MAC_MODEL_PB280:
895 case MAC_MODEL_PB280C: 890 case MAC_MODEL_PB280C:
896 macfb_setpalette = csc_setpalette;
897 macfb_defined.activate = FB_ACTIVATE_NOW;
898 strcpy(macfb_fix.id, "CSC"); 891 strcpy(macfb_fix.id, "CSC");
892 macfb_setpalette = csc_setpalette;
899 csc_cmap_regs = ioremap(CSC_BASE, 0x1000); 893 csc_cmap_regs = ioremap(CSC_BASE, 0x1000);
894 macfb_defined.activate = FB_ACTIVATE_NOW;
900 break; 895 break;
901 896
902 default: 897 default:
@@ -918,8 +913,9 @@ static int __init macfb_init(void)
918 if (err) 913 if (err)
919 goto fail_dealloc; 914 goto fail_dealloc;
920 915
921 printk("fb%d: %s frame buffer device\n", 916 pr_info("fb%d: %s frame buffer device\n",
922 fb_info.node, fb_info.fix.id); 917 fb_info.node, fb_info.fix.id);
918
923 return 0; 919 return 0;
924 920
925fail_dealloc: 921fail_dealloc: