diff options
author | Paul Mackerras <paulus@samba.org> | 2008-12-03 04:11:06 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-03 04:11:06 -0500 |
commit | 527491885554002837b5742202adc0ab5f536e54 (patch) | |
tree | 6d9c44776e0b4368eccd414b92b957fac3c5a4c6 /drivers/video | |
parent | cea555d384b85271035814c5adad23e6c7fc5d2a (diff) | |
parent | 2434bbb30e79468c49cff3cff6005236f55ed188 (diff) |
Merge branch 'merge'
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 2 | ||||
-rw-r--r-- | drivers/video/aty/radeon_accel.c | 21 | ||||
-rw-r--r-- | drivers/video/aty/radeon_base.c | 18 | ||||
-rw-r--r-- | drivers/video/backlight/da903x.c | 2 | ||||
-rw-r--r-- | drivers/video/backlight/lcd.c | 11 | ||||
-rw-r--r-- | drivers/video/cirrusfb.c | 3 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 9 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 2 | ||||
-rw-r--r-- | drivers/video/macfb.c | 74 | ||||
-rw-r--r-- | drivers/video/omap/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/omap/lcd_sx1.c | 327 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 5 | ||||
-rw-r--r-- | drivers/video/tmiofb.c | 10 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 17 | ||||
-rw-r--r-- | drivers/video/xen-fbfront.c | 6 | ||||
-rw-r--r-- | drivers/video/xilinxfb.c | 5 |
16 files changed, 106 insertions, 407 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index f8d0a57a07cb..9a577a800db5 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -132,7 +132,7 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) | |||
132 | 132 | ||
133 | bl = backlight_device_register("backlight", &sinfo->pdev->dev, | 133 | bl = backlight_device_register("backlight", &sinfo->pdev->dev, |
134 | sinfo, &atmel_lcdc_bl_ops); | 134 | sinfo, &atmel_lcdc_bl_ops); |
135 | if (IS_ERR(sinfo->backlight)) { | 135 | if (IS_ERR(bl)) { |
136 | dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", | 136 | dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", |
137 | PTR_ERR(bl)); | 137 | PTR_ERR(bl)); |
138 | return; | 138 | return; |
diff --git a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c index 8718f7349d6b..a547e5d4c8bf 100644 --- a/drivers/video/aty/radeon_accel.c +++ b/drivers/video/aty/radeon_accel.c | |||
@@ -174,12 +174,12 @@ static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo, | |||
174 | const struct fb_image *image, | 174 | const struct fb_image *image, |
175 | u32 fg, u32 bg) | 175 | u32 fg, u32 bg) |
176 | { | 176 | { |
177 | unsigned int src_bytes, dwords; | 177 | unsigned int dwords; |
178 | u32 *bits; | 178 | u32 *bits; |
179 | 179 | ||
180 | radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, | 180 | radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, |
181 | rinfo->dp_gui_mc_base | | 181 | rinfo->dp_gui_mc_base | |
182 | GMC_BRUSH_NONE | | 182 | GMC_BRUSH_NONE | GMC_DST_CLIP_LEAVE | |
183 | GMC_SRC_DATATYPE_MONO_FG_BG | | 183 | GMC_SRC_DATATYPE_MONO_FG_BG | |
184 | ROP3_S | | 184 | ROP3_S | |
185 | GMC_BYTE_ORDER_MSB_TO_LSB | | 185 | GMC_BYTE_ORDER_MSB_TO_LSB | |
@@ -189,9 +189,6 @@ static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo, | |||
189 | radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg); | 189 | radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg); |
190 | radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg); | 190 | radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg); |
191 | 191 | ||
192 | radeon_fifo_wait(rinfo, 1); | ||
193 | OUTREG(DST_Y_X, (image->dy << 16) | image->dx); | ||
194 | |||
195 | /* Ensure the dst cache is flushed and the engine idle before | 192 | /* Ensure the dst cache is flushed and the engine idle before |
196 | * issuing the operation. | 193 | * issuing the operation. |
197 | * | 194 | * |
@@ -205,13 +202,19 @@ static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo, | |||
205 | 202 | ||
206 | /* X here pads width to a multiple of 32 and uses the clipper to | 203 | /* X here pads width to a multiple of 32 and uses the clipper to |
207 | * adjust the result. Is that really necessary ? Things seem to | 204 | * adjust the result. Is that really necessary ? Things seem to |
208 | * work ok for me without that and the doco doesn't seem to imply | 205 | * work ok for me without that and the doco doesn't seem to imply] |
209 | * there is such a restriction. | 206 | * there is such a restriction. |
210 | */ | 207 | */ |
211 | OUTREG(DST_WIDTH_HEIGHT, (image->width << 16) | image->height); | 208 | radeon_fifo_wait(rinfo, 4); |
209 | OUTREG(SC_TOP_LEFT, (image->dy << 16) | image->dx); | ||
210 | OUTREG(SC_BOTTOM_RIGHT, ((image->dy + image->height) << 16) | | ||
211 | (image->dx + image->width)); | ||
212 | OUTREG(DST_Y_X, (image->dy << 16) | image->dx); | ||
213 | |||
214 | OUTREG(DST_HEIGHT_WIDTH, (image->height << 16) | ((image->width + 31) & ~31)); | ||
212 | 215 | ||
213 | src_bytes = (((image->width * image->depth) + 7) / 8) * image->height; | 216 | dwords = (image->width + 31) >> 5; |
214 | dwords = (src_bytes + 3) / 4; | 217 | dwords *= image->height; |
215 | bits = (u32*)(image->data); | 218 | bits = (u32*)(image->data); |
216 | 219 | ||
217 | while(dwords >= 8) { | 220 | while(dwords >= 8) { |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 9a5821c65ebf..b3ffe8205d2b 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -1875,6 +1875,7 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) | |||
1875 | info->fbops = &radeonfb_ops; | 1875 | info->fbops = &radeonfb_ops; |
1876 | info->screen_base = rinfo->fb_base; | 1876 | info->screen_base = rinfo->fb_base; |
1877 | info->screen_size = rinfo->mapped_vram; | 1877 | info->screen_size = rinfo->mapped_vram; |
1878 | |||
1878 | /* Fill fix common fields */ | 1879 | /* Fill fix common fields */ |
1879 | strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); | 1880 | strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); |
1880 | info->fix.smem_start = rinfo->fb_base_phys; | 1881 | info->fix.smem_start = rinfo->fb_base_phys; |
@@ -1889,8 +1890,25 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) | |||
1889 | info->fix.mmio_len = RADEON_REGSIZE; | 1890 | info->fix.mmio_len = RADEON_REGSIZE; |
1890 | info->fix.accel = FB_ACCEL_ATI_RADEON; | 1891 | info->fix.accel = FB_ACCEL_ATI_RADEON; |
1891 | 1892 | ||
1893 | /* Allocate colormap */ | ||
1892 | fb_alloc_cmap(&info->cmap, 256, 0); | 1894 | fb_alloc_cmap(&info->cmap, 256, 0); |
1893 | 1895 | ||
1896 | /* Setup pixmap used for acceleration */ | ||
1897 | #define PIXMAP_SIZE (2048 * 4) | ||
1898 | |||
1899 | info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL); | ||
1900 | if (!info->pixmap.addr) { | ||
1901 | printk(KERN_ERR "radeonfb: Failed to allocate pixmap !\n"); | ||
1902 | noaccel = 1; | ||
1903 | goto bail; | ||
1904 | } | ||
1905 | info->pixmap.size = PIXMAP_SIZE; | ||
1906 | info->pixmap.flags = FB_PIXMAP_SYSTEM; | ||
1907 | info->pixmap.scan_align = 4; | ||
1908 | info->pixmap.buf_align = 4; | ||
1909 | info->pixmap.access_align = 32; | ||
1910 | |||
1911 | bail: | ||
1894 | if (noaccel) | 1912 | if (noaccel) |
1895 | info->flags |= FBINFO_HWACCEL_DISABLED; | 1913 | info->flags |= FBINFO_HWACCEL_DISABLED; |
1896 | 1914 | ||
diff --git a/drivers/video/backlight/da903x.c b/drivers/video/backlight/da903x.c index 242c38250166..93bb4340cc64 100644 --- a/drivers/video/backlight/da903x.c +++ b/drivers/video/backlight/da903x.c | |||
@@ -119,6 +119,7 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
119 | default: | 119 | default: |
120 | dev_err(&pdev->dev, "invalid backlight device ID(%d)\n", | 120 | dev_err(&pdev->dev, "invalid backlight device ID(%d)\n", |
121 | pdev->id); | 121 | pdev->id); |
122 | kfree(data); | ||
122 | return -EINVAL; | 123 | return -EINVAL; |
123 | } | 124 | } |
124 | 125 | ||
@@ -130,6 +131,7 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
130 | data, &da903x_backlight_ops); | 131 | data, &da903x_backlight_ops); |
131 | if (IS_ERR(bl)) { | 132 | if (IS_ERR(bl)) { |
132 | dev_err(&pdev->dev, "failed to register backlight\n"); | 133 | dev_err(&pdev->dev, "failed to register backlight\n"); |
134 | kfree(data); | ||
133 | return PTR_ERR(bl); | 135 | return PTR_ERR(bl); |
134 | } | 136 | } |
135 | 137 | ||
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 8e1731d3b228..680e57b616cd 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -42,10 +42,13 @@ static int fb_notifier_callback(struct notifier_block *self, | |||
42 | 42 | ||
43 | mutex_lock(&ld->ops_lock); | 43 | mutex_lock(&ld->ops_lock); |
44 | if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { | 44 | if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { |
45 | if (event == FB_EVENT_BLANK) | 45 | if (event == FB_EVENT_BLANK) { |
46 | ld->ops->set_power(ld, *(int *)evdata->data); | 46 | if (ld->ops->set_power) |
47 | else | 47 | ld->ops->set_power(ld, *(int *)evdata->data); |
48 | ld->ops->set_mode(ld, evdata->data); | 48 | } else { |
49 | if (ld->ops->set_mode) | ||
50 | ld->ops->set_mode(ld, evdata->data); | ||
51 | } | ||
49 | } | 52 | } |
50 | mutex_unlock(&ld->ops_lock); | 53 | mutex_unlock(&ld->ops_lock); |
51 | return 0; | 54 | return 0; |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 8a8760230bc7..a2aa6ddffbe2 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -2462,8 +2462,7 @@ static int __init cirrusfb_init(void) | |||
2462 | 2462 | ||
2463 | #ifndef MODULE | 2463 | #ifndef MODULE |
2464 | static int __init cirrusfb_setup(char *options) { | 2464 | static int __init cirrusfb_setup(char *options) { |
2465 | char *this_opt, s[32]; | 2465 | char *this_opt; |
2466 | int i; | ||
2467 | 2466 | ||
2468 | DPRINTK("ENTER\n"); | 2467 | DPRINTK("ENTER\n"); |
2469 | 2468 | ||
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index b92947d62ad6..67ff370d80af 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2389,16 +2389,13 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) | |||
2389 | 2389 | ||
2390 | if (!fbcon_is_inactive(vc, info)) { | 2390 | if (!fbcon_is_inactive(vc, info)) { |
2391 | if (ops->blank_state != blank) { | 2391 | if (ops->blank_state != blank) { |
2392 | int ret = 1; | ||
2393 | |||
2394 | ops->blank_state = blank; | 2392 | ops->blank_state = blank; |
2395 | fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); | 2393 | fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); |
2396 | ops->cursor_flash = (!blank); | 2394 | ops->cursor_flash = (!blank); |
2397 | 2395 | ||
2398 | if (info->fbops->fb_blank) | 2396 | if (!(info->flags & FBINFO_MISC_USEREVENT)) |
2399 | ret = info->fbops->fb_blank(blank, info); | 2397 | if (fb_blank(info, blank)) |
2400 | if (ret) | 2398 | fbcon_generic_blank(vc, info, blank); |
2401 | fbcon_generic_blank(vc, info, blank); | ||
2402 | } | 2399 | } |
2403 | 2400 | ||
2404 | if (!blank) | 2401 | if (!blank) |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 1d5ae39cb271..3c65b0d67617 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -230,7 +230,7 @@ static void fb_set_logo_directpalette(struct fb_info *info, | |||
230 | greenshift = info->var.green.offset; | 230 | greenshift = info->var.green.offset; |
231 | blueshift = info->var.blue.offset; | 231 | blueshift = info->var.blue.offset; |
232 | 232 | ||
233 | for (i = 32; i < logo->clutsize; i++) | 233 | for (i = 32; i < 32 + logo->clutsize; i++) |
234 | palette[i] = i << redshift | i << greenshift | i << blueshift; | 234 | palette[i] = i << redshift | i << greenshift | i << blueshift; |
235 | } | 235 | } |
236 | 236 | ||
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index b790ddff76f9..ee380d5f3410 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c | |||
@@ -164,7 +164,6 @@ static struct fb_var_screeninfo macfb_defined = { | |||
164 | }; | 164 | }; |
165 | 165 | ||
166 | static struct fb_fix_screeninfo macfb_fix = { | 166 | static struct fb_fix_screeninfo macfb_fix = { |
167 | .id = "Macintosh ", | ||
168 | .type = FB_TYPE_PACKED_PIXELS, | 167 | .type = FB_TYPE_PACKED_PIXELS, |
169 | .accel = FB_ACCEL_NONE, | 168 | .accel = FB_ACCEL_NONE, |
170 | }; | 169 | }; |
@@ -760,22 +759,22 @@ static int __init macfb_init(void) | |||
760 | 759 | ||
761 | switch(ndev->dr_hw) { | 760 | switch(ndev->dr_hw) { |
762 | case NUBUS_DRHW_APPLE_MDC: | 761 | case NUBUS_DRHW_APPLE_MDC: |
763 | strcat( macfb_fix.id, "Display Card" ); | 762 | strcpy(macfb_fix.id, "Mac Disp. Card"); |
764 | macfb_setpalette = mdc_setpalette; | 763 | macfb_setpalette = mdc_setpalette; |
765 | macfb_defined.activate = FB_ACTIVATE_NOW; | 764 | macfb_defined.activate = FB_ACTIVATE_NOW; |
766 | break; | 765 | break; |
767 | case NUBUS_DRHW_APPLE_TFB: | 766 | case NUBUS_DRHW_APPLE_TFB: |
768 | strcat( macfb_fix.id, "Toby" ); | 767 | strcpy(macfb_fix.id, "Toby"); |
769 | macfb_setpalette = toby_setpalette; | 768 | macfb_setpalette = toby_setpalette; |
770 | macfb_defined.activate = FB_ACTIVATE_NOW; | 769 | macfb_defined.activate = FB_ACTIVATE_NOW; |
771 | break; | 770 | break; |
772 | case NUBUS_DRHW_APPLE_JET: | 771 | case NUBUS_DRHW_APPLE_JET: |
773 | strcat( macfb_fix.id, "Jet"); | 772 | strcpy(macfb_fix.id, "Jet"); |
774 | macfb_setpalette = jet_setpalette; | 773 | macfb_setpalette = jet_setpalette; |
775 | macfb_defined.activate = FB_ACTIVATE_NOW; | 774 | macfb_defined.activate = FB_ACTIVATE_NOW; |
776 | break; | 775 | break; |
777 | default: | 776 | default: |
778 | strcat( macfb_fix.id, "Generic NuBus" ); | 777 | strcpy(macfb_fix.id, "Generic NuBus"); |
779 | break; | 778 | break; |
780 | } | 779 | } |
781 | } | 780 | } |
@@ -786,21 +785,11 @@ static int __init macfb_init(void) | |||
786 | if (!video_is_nubus) | 785 | if (!video_is_nubus) |
787 | switch( mac_bi_data.id ) | 786 | switch( mac_bi_data.id ) |
788 | { | 787 | { |
789 | /* These don't have onboard video. Eventually, we may | ||
790 | be able to write separate framebuffer drivers for | ||
791 | them (tobyfb.c, hiresfb.c, etc, etc) */ | ||
792 | case MAC_MODEL_II: | ||
793 | case MAC_MODEL_IIX: | ||
794 | case MAC_MODEL_IICX: | ||
795 | case MAC_MODEL_IIFX: | ||
796 | strcat( macfb_fix.id, "Generic NuBus" ); | ||
797 | break; | ||
798 | |||
799 | /* Valkyrie Quadras */ | 788 | /* Valkyrie Quadras */ |
800 | case MAC_MODEL_Q630: | 789 | case MAC_MODEL_Q630: |
801 | /* I'm not sure about this one */ | 790 | /* I'm not sure about this one */ |
802 | case MAC_MODEL_P588: | 791 | case MAC_MODEL_P588: |
803 | strcat( macfb_fix.id, "Valkyrie built-in" ); | 792 | strcpy(macfb_fix.id, "Valkyrie"); |
804 | macfb_setpalette = valkyrie_setpalette; | 793 | macfb_setpalette = valkyrie_setpalette; |
805 | macfb_defined.activate = FB_ACTIVATE_NOW; | 794 | macfb_defined.activate = FB_ACTIVATE_NOW; |
806 | valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000); | 795 | valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000); |
@@ -823,7 +812,7 @@ static int __init macfb_init(void) | |||
823 | case MAC_MODEL_Q700: | 812 | case MAC_MODEL_Q700: |
824 | case MAC_MODEL_Q900: | 813 | case MAC_MODEL_Q900: |
825 | case MAC_MODEL_Q950: | 814 | case MAC_MODEL_Q950: |
826 | strcat( macfb_fix.id, "DAFB built-in" ); | 815 | strcpy(macfb_fix.id, "DAFB"); |
827 | macfb_setpalette = dafb_setpalette; | 816 | macfb_setpalette = dafb_setpalette; |
828 | macfb_defined.activate = FB_ACTIVATE_NOW; | 817 | macfb_defined.activate = FB_ACTIVATE_NOW; |
829 | dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000); | 818 | dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000); |
@@ -831,7 +820,7 @@ static int __init macfb_init(void) | |||
831 | 820 | ||
832 | /* LC II uses the V8 framebuffer */ | 821 | /* LC II uses the V8 framebuffer */ |
833 | case MAC_MODEL_LCII: | 822 | case MAC_MODEL_LCII: |
834 | strcat( macfb_fix.id, "V8 built-in" ); | 823 | strcpy(macfb_fix.id, "V8"); |
835 | macfb_setpalette = v8_brazil_setpalette; | 824 | macfb_setpalette = v8_brazil_setpalette; |
836 | macfb_defined.activate = FB_ACTIVATE_NOW; | 825 | macfb_defined.activate = FB_ACTIVATE_NOW; |
837 | v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); | 826 | v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); |
@@ -843,7 +832,7 @@ static int __init macfb_init(void) | |||
843 | case MAC_MODEL_IIVI: | 832 | case MAC_MODEL_IIVI: |
844 | case MAC_MODEL_IIVX: | 833 | case MAC_MODEL_IIVX: |
845 | case MAC_MODEL_P600: | 834 | case MAC_MODEL_P600: |
846 | strcat( macfb_fix.id, "Brazil built-in" ); | 835 | strcpy(macfb_fix.id, "Brazil"); |
847 | macfb_setpalette = v8_brazil_setpalette; | 836 | macfb_setpalette = v8_brazil_setpalette; |
848 | macfb_defined.activate = FB_ACTIVATE_NOW; | 837 | macfb_defined.activate = FB_ACTIVATE_NOW; |
849 | v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); | 838 | v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); |
@@ -860,7 +849,7 @@ static int __init macfb_init(void) | |||
860 | case MAC_MODEL_P460: | 849 | case MAC_MODEL_P460: |
861 | macfb_setpalette = v8_brazil_setpalette; | 850 | macfb_setpalette = v8_brazil_setpalette; |
862 | macfb_defined.activate = FB_ACTIVATE_NOW; | 851 | macfb_defined.activate = FB_ACTIVATE_NOW; |
863 | strcat( macfb_fix.id, "Sonora built-in" ); | 852 | strcpy(macfb_fix.id, "Sonora"); |
864 | v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); | 853 | v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); |
865 | break; | 854 | break; |
866 | 855 | ||
@@ -871,7 +860,7 @@ static int __init macfb_init(void) | |||
871 | case MAC_MODEL_IISI: | 860 | case MAC_MODEL_IISI: |
872 | macfb_setpalette = rbv_setpalette; | 861 | macfb_setpalette = rbv_setpalette; |
873 | macfb_defined.activate = FB_ACTIVATE_NOW; | 862 | macfb_defined.activate = FB_ACTIVATE_NOW; |
874 | strcat( macfb_fix.id, "RBV built-in" ); | 863 | strcpy(macfb_fix.id, "RBV"); |
875 | rbv_cmap_regs = ioremap(DAC_BASE, 0x1000); | 864 | rbv_cmap_regs = ioremap(DAC_BASE, 0x1000); |
876 | break; | 865 | break; |
877 | 866 | ||
@@ -880,7 +869,7 @@ static int __init macfb_init(void) | |||
880 | case MAC_MODEL_C660: | 869 | case MAC_MODEL_C660: |
881 | macfb_setpalette = civic_setpalette; | 870 | macfb_setpalette = civic_setpalette; |
882 | macfb_defined.activate = FB_ACTIVATE_NOW; | 871 | macfb_defined.activate = FB_ACTIVATE_NOW; |
883 | strcat( macfb_fix.id, "Civic built-in" ); | 872 | strcpy(macfb_fix.id, "Civic"); |
884 | civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000); | 873 | civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000); |
885 | break; | 874 | break; |
886 | 875 | ||
@@ -901,7 +890,7 @@ static int __init macfb_init(void) | |||
901 | v8_brazil_cmap_regs = | 890 | v8_brazil_cmap_regs = |
902 | ioremap(DAC_BASE, 0x1000); | 891 | ioremap(DAC_BASE, 0x1000); |
903 | } | 892 | } |
904 | strcat( macfb_fix.id, "LC built-in" ); | 893 | strcpy(macfb_fix.id, "LC"); |
905 | break; | 894 | break; |
906 | /* We think this may be like the LC II */ | 895 | /* We think this may be like the LC II */ |
907 | case MAC_MODEL_CCL: | 896 | case MAC_MODEL_CCL: |
@@ -911,18 +900,18 @@ static int __init macfb_init(void) | |||
911 | v8_brazil_cmap_regs = | 900 | v8_brazil_cmap_regs = |
912 | ioremap(DAC_BASE, 0x1000); | 901 | ioremap(DAC_BASE, 0x1000); |
913 | } | 902 | } |
914 | strcat( macfb_fix.id, "Color Classic built-in" ); | 903 | strcpy(macfb_fix.id, "Color Classic"); |
915 | break; | 904 | break; |
916 | 905 | ||
917 | /* And we *do* mean "weirdos" */ | 906 | /* And we *do* mean "weirdos" */ |
918 | case MAC_MODEL_TV: | 907 | case MAC_MODEL_TV: |
919 | strcat( macfb_fix.id, "Mac TV built-in" ); | 908 | strcpy(macfb_fix.id, "Mac TV"); |
920 | break; | 909 | break; |
921 | 910 | ||
922 | /* These don't have colour, so no need to worry */ | 911 | /* These don't have colour, so no need to worry */ |
923 | case MAC_MODEL_SE30: | 912 | case MAC_MODEL_SE30: |
924 | case MAC_MODEL_CLII: | 913 | case MAC_MODEL_CLII: |
925 | strcat( macfb_fix.id, "Monochrome built-in" ); | 914 | strcpy(macfb_fix.id, "Monochrome"); |
926 | break; | 915 | break; |
927 | 916 | ||
928 | /* Powerbooks are particularly difficult. Many of | 917 | /* Powerbooks are particularly difficult. Many of |
@@ -935,7 +924,7 @@ static int __init macfb_init(void) | |||
935 | case MAC_MODEL_PB140: | 924 | case MAC_MODEL_PB140: |
936 | case MAC_MODEL_PB145: | 925 | case MAC_MODEL_PB145: |
937 | case MAC_MODEL_PB170: | 926 | case MAC_MODEL_PB170: |
938 | strcat( macfb_fix.id, "DDC built-in" ); | 927 | strcpy(macfb_fix.id, "DDC"); |
939 | break; | 928 | break; |
940 | 929 | ||
941 | /* Internal is GSC, External (if present) is ViSC */ | 930 | /* Internal is GSC, External (if present) is ViSC */ |
@@ -945,13 +934,13 @@ static int __init macfb_init(void) | |||
945 | case MAC_MODEL_PB180: | 934 | case MAC_MODEL_PB180: |
946 | case MAC_MODEL_PB210: | 935 | case MAC_MODEL_PB210: |
947 | case MAC_MODEL_PB230: | 936 | case MAC_MODEL_PB230: |
948 | strcat( macfb_fix.id, "GSC built-in" ); | 937 | strcpy(macfb_fix.id, "GSC"); |
949 | break; | 938 | break; |
950 | 939 | ||
951 | /* Internal is TIM, External is ViSC */ | 940 | /* Internal is TIM, External is ViSC */ |
952 | case MAC_MODEL_PB165C: | 941 | case MAC_MODEL_PB165C: |
953 | case MAC_MODEL_PB180C: | 942 | case MAC_MODEL_PB180C: |
954 | strcat( macfb_fix.id, "TIM built-in" ); | 943 | strcpy(macfb_fix.id, "TIM"); |
955 | break; | 944 | break; |
956 | 945 | ||
957 | /* Internal is CSC, External is Keystone+Ariel. */ | 946 | /* Internal is CSC, External is Keystone+Ariel. */ |
@@ -963,12 +952,12 @@ static int __init macfb_init(void) | |||
963 | case MAC_MODEL_PB280C: | 952 | case MAC_MODEL_PB280C: |
964 | macfb_setpalette = csc_setpalette; | 953 | macfb_setpalette = csc_setpalette; |
965 | macfb_defined.activate = FB_ACTIVATE_NOW; | 954 | macfb_defined.activate = FB_ACTIVATE_NOW; |
966 | strcat( macfb_fix.id, "CSC built-in" ); | 955 | strcpy(macfb_fix.id, "CSC"); |
967 | csc_cmap_regs = ioremap(CSC_BASE, 0x1000); | 956 | csc_cmap_regs = ioremap(CSC_BASE, 0x1000); |
968 | break; | 957 | break; |
969 | 958 | ||
970 | default: | 959 | default: |
971 | strcat( macfb_fix.id, "Unknown/Unsupported built-in" ); | 960 | strcpy(macfb_fix.id, "Unknown"); |
972 | break; | 961 | break; |
973 | } | 962 | } |
974 | 963 | ||
@@ -978,16 +967,23 @@ static int __init macfb_init(void) | |||
978 | fb_info.pseudo_palette = pseudo_palette; | 967 | fb_info.pseudo_palette = pseudo_palette; |
979 | fb_info.flags = FBINFO_DEFAULT; | 968 | fb_info.flags = FBINFO_DEFAULT; |
980 | 969 | ||
981 | fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); | 970 | err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); |
971 | if (err) | ||
972 | goto fail_unmap; | ||
982 | 973 | ||
983 | err = register_framebuffer(&fb_info); | 974 | err = register_framebuffer(&fb_info); |
984 | if (!err) | 975 | if (err) |
985 | printk("fb%d: %s frame buffer device\n", | 976 | goto fail_dealloc; |
986 | fb_info.node, fb_info.fix.id); | 977 | |
987 | else { | 978 | printk("fb%d: %s frame buffer device\n", |
988 | iounmap(fb_info.screen_base); | 979 | fb_info.node, fb_info.fix.id); |
989 | iounmap_macfb(); | 980 | return 0; |
990 | } | 981 | |
982 | fail_dealloc: | ||
983 | fb_dealloc_cmap(&fb_info.cmap); | ||
984 | fail_unmap: | ||
985 | iounmap(fb_info.screen_base); | ||
986 | iounmap_macfb(); | ||
991 | return err; | 987 | return err; |
992 | } | 988 | } |
993 | 989 | ||
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 99da8b6d2c36..ed13889c1162 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
@@ -23,7 +23,6 @@ objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o | |||
23 | objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o | 23 | objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o |
24 | objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o | 24 | objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o |
25 | objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o | 25 | objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o |
26 | objs-y$(CONFIG_MACH_SX1) += lcd_sx1.o | ||
27 | 26 | ||
28 | omapfb-objs := $(objs-yy) | 27 | omapfb-objs := $(objs-yy) |
29 | 28 | ||
diff --git a/drivers/video/omap/lcd_sx1.c b/drivers/video/omap/lcd_sx1.c deleted file mode 100644 index e55de201b8ff..000000000000 --- a/drivers/video/omap/lcd_sx1.c +++ /dev/null | |||
@@ -1,327 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the Siemens SX1 mobile phone | ||
3 | * | ||
4 | * Current version : Vovan888@gmail.com, great help from FCA00000 | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/module.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/io.h> | ||
25 | |||
26 | #include <mach/gpio.h> | ||
27 | #include <mach/omapfb.h> | ||
28 | #include <mach/mcbsp.h> | ||
29 | #include <mach/mux.h> | ||
30 | |||
31 | /* | ||
32 | * OMAP310 GPIO registers | ||
33 | */ | ||
34 | #define GPIO_DATA_INPUT 0xfffce000 | ||
35 | #define GPIO_DATA_OUTPUT 0xfffce004 | ||
36 | #define GPIO_DIR_CONTROL 0xfffce008 | ||
37 | #define GPIO_INT_CONTROL 0xfffce00c | ||
38 | #define GPIO_INT_MASK 0xfffce010 | ||
39 | #define GPIO_INT_STATUS 0xfffce014 | ||
40 | #define GPIO_PIN_CONTROL 0xfffce018 | ||
41 | |||
42 | |||
43 | #define A_LCD_SSC_RD 3 | ||
44 | #define A_LCD_SSC_SD 7 | ||
45 | #define _A_LCD_RESET 9 | ||
46 | #define _A_LCD_SSC_CS 12 | ||
47 | #define _A_LCD_SSC_A0 13 | ||
48 | |||
49 | #define DSP_REG 0xE1017024 | ||
50 | |||
51 | const unsigned char INIT_1[12] = { | ||
52 | 0x1C, 0x02, 0x88, 0x00, 0x1E, 0xE0, 0x00, 0xDC, 0x00, 0x02, 0x00 | ||
53 | }; | ||
54 | |||
55 | const unsigned char INIT_2[127] = { | ||
56 | 0x15, 0x00, 0x29, 0x00, 0x3E, 0x00, 0x51, 0x00, | ||
57 | 0x65, 0x00, 0x7A, 0x00, 0x8D, 0x00, 0xA1, 0x00, | ||
58 | 0xB6, 0x00, 0xC7, 0x00, 0xD8, 0x00, 0xEB, 0x00, | ||
59 | 0xFB, 0x00, 0x0B, 0x01, 0x1B, 0x01, 0x27, 0x01, | ||
60 | 0x34, 0x01, 0x41, 0x01, 0x4C, 0x01, 0x55, 0x01, | ||
61 | 0x5F, 0x01, 0x68, 0x01, 0x70, 0x01, 0x78, 0x01, | ||
62 | 0x7E, 0x01, 0x86, 0x01, 0x8C, 0x01, 0x94, 0x01, | ||
63 | 0x9B, 0x01, 0xA1, 0x01, 0xA4, 0x01, 0xA9, 0x01, | ||
64 | 0xAD, 0x01, 0xB2, 0x01, 0xB7, 0x01, 0xBC, 0x01, | ||
65 | 0xC0, 0x01, 0xC4, 0x01, 0xC8, 0x01, 0xCB, 0x01, | ||
66 | 0xCF, 0x01, 0xD2, 0x01, 0xD5, 0x01, 0xD8, 0x01, | ||
67 | 0xDB, 0x01, 0xE0, 0x01, 0xE3, 0x01, 0xE6, 0x01, | ||
68 | 0xE8, 0x01, 0xEB, 0x01, 0xEE, 0x01, 0xF1, 0x01, | ||
69 | 0xF3, 0x01, 0xF8, 0x01, 0xF9, 0x01, 0xFC, 0x01, | ||
70 | 0x00, 0x02, 0x03, 0x02, 0x07, 0x02, 0x09, 0x02, | ||
71 | 0x0E, 0x02, 0x13, 0x02, 0x1C, 0x02, 0x00 | ||
72 | }; | ||
73 | |||
74 | const unsigned char INIT_3[15] = { | ||
75 | 0x14, 0x26, 0x33, 0x3D, 0x45, 0x4D, 0x53, 0x59, | ||
76 | 0x5E, 0x63, 0x67, 0x6D, 0x71, 0x78, 0xFF | ||
77 | }; | ||
78 | |||
79 | static void epson_sendbyte(int flag, unsigned char byte) | ||
80 | { | ||
81 | int i, shifter = 0x80; | ||
82 | |||
83 | if (!flag) | ||
84 | gpio_set_value(_A_LCD_SSC_A0, 0); | ||
85 | mdelay(2); | ||
86 | gpio_set_value(A_LCD_SSC_RD, 1); | ||
87 | |||
88 | gpio_set_value(A_LCD_SSC_SD, flag); | ||
89 | |||
90 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200); | ||
91 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202); | ||
92 | for (i = 0; i < 8; i++) { | ||
93 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200); | ||
94 | gpio_set_value(A_LCD_SSC_SD, shifter & byte); | ||
95 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202); | ||
96 | shifter >>= 1; | ||
97 | } | ||
98 | gpio_set_value(_A_LCD_SSC_A0, 1); | ||
99 | } | ||
100 | |||
101 | static void init_system(void) | ||
102 | { | ||
103 | omap_mcbsp_request(OMAP_MCBSP3); | ||
104 | omap_mcbsp_stop(OMAP_MCBSP3); | ||
105 | } | ||
106 | |||
107 | static void setup_GPIO(void) | ||
108 | { | ||
109 | /* new wave */ | ||
110 | gpio_request(A_LCD_SSC_RD, "lcd_ssc_rd"); | ||
111 | gpio_request(A_LCD_SSC_SD, "lcd_ssc_sd"); | ||
112 | gpio_request(_A_LCD_RESET, "lcd_reset"); | ||
113 | gpio_request(_A_LCD_SSC_CS, "lcd_ssc_cs"); | ||
114 | gpio_request(_A_LCD_SSC_A0, "lcd_ssc_a0"); | ||
115 | |||
116 | /* set GPIOs to output, with initial data */ | ||
117 | gpio_direction_output(A_LCD_SSC_RD, 1); | ||
118 | gpio_direction_output(A_LCD_SSC_SD, 0); | ||
119 | gpio_direction_output(_A_LCD_RESET, 0); | ||
120 | gpio_direction_output(_A_LCD_SSC_CS, 1); | ||
121 | gpio_direction_output(_A_LCD_SSC_A0, 1); | ||
122 | } | ||
123 | |||
124 | static void display_init(void) | ||
125 | { | ||
126 | int i; | ||
127 | |||
128 | omap_cfg_reg(MCBSP3_CLKX); | ||
129 | |||
130 | mdelay(2); | ||
131 | setup_GPIO(); | ||
132 | mdelay(2); | ||
133 | |||
134 | /* reset LCD */ | ||
135 | gpio_set_value(A_LCD_SSC_SD, 1); | ||
136 | epson_sendbyte(0, 0x25); | ||
137 | |||
138 | gpio_set_value(_A_LCD_RESET, 0); | ||
139 | mdelay(10); | ||
140 | gpio_set_value(_A_LCD_RESET, 1); | ||
141 | |||
142 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
143 | mdelay(2); | ||
144 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
145 | |||
146 | /* init LCD, phase 1 */ | ||
147 | epson_sendbyte(0, 0xCA); | ||
148 | for (i = 0; i < 10; i++) | ||
149 | epson_sendbyte(1, INIT_1[i]); | ||
150 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
151 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
152 | |||
153 | /* init LCD phase 2 */ | ||
154 | epson_sendbyte(0, 0xCB); | ||
155 | for (i = 0; i < 125; i++) | ||
156 | epson_sendbyte(1, INIT_2[i]); | ||
157 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
158 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
159 | |||
160 | /* init LCD phase 2a */ | ||
161 | epson_sendbyte(0, 0xCC); | ||
162 | for (i = 0; i < 14; i++) | ||
163 | epson_sendbyte(1, INIT_3[i]); | ||
164 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
165 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
166 | |||
167 | /* init LCD phase 3 */ | ||
168 | epson_sendbyte(0, 0xBC); | ||
169 | epson_sendbyte(1, 0x08); | ||
170 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
171 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
172 | |||
173 | /* init LCD phase 4 */ | ||
174 | epson_sendbyte(0, 0x07); | ||
175 | epson_sendbyte(1, 0x05); | ||
176 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
177 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
178 | |||
179 | /* init LCD phase 5 */ | ||
180 | epson_sendbyte(0, 0x94); | ||
181 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
182 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
183 | |||
184 | /* init LCD phase 6 */ | ||
185 | epson_sendbyte(0, 0xC6); | ||
186 | epson_sendbyte(1, 0x80); | ||
187 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
188 | mdelay(100); /* used to be 1000 */ | ||
189 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
190 | |||
191 | /* init LCD phase 7 */ | ||
192 | epson_sendbyte(0, 0x16); | ||
193 | epson_sendbyte(1, 0x02); | ||
194 | epson_sendbyte(1, 0x00); | ||
195 | epson_sendbyte(1, 0xB1); | ||
196 | epson_sendbyte(1, 0x00); | ||
197 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
198 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
199 | |||
200 | /* init LCD phase 8 */ | ||
201 | epson_sendbyte(0, 0x76); | ||
202 | epson_sendbyte(1, 0x00); | ||
203 | epson_sendbyte(1, 0x00); | ||
204 | epson_sendbyte(1, 0xDB); | ||
205 | epson_sendbyte(1, 0x00); | ||
206 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
207 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
208 | |||
209 | /* init LCD phase 9 */ | ||
210 | epson_sendbyte(0, 0xAF); | ||
211 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
212 | } | ||
213 | |||
214 | static int sx1_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) | ||
215 | { | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static void sx1_panel_cleanup(struct lcd_panel *panel) | ||
220 | { | ||
221 | } | ||
222 | |||
223 | static void sx1_panel_disable(struct lcd_panel *panel) | ||
224 | { | ||
225 | printk(KERN_INFO "SX1: LCD panel disable\n"); | ||
226 | sx1_setmmipower(0); | ||
227 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
228 | |||
229 | epson_sendbyte(0, 0x25); | ||
230 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
231 | |||
232 | epson_sendbyte(0, 0xAE); | ||
233 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
234 | mdelay(100); | ||
235 | gpio_set_value(_A_LCD_SSC_CS, 0); | ||
236 | |||
237 | epson_sendbyte(0, 0x95); | ||
238 | gpio_set_value(_A_LCD_SSC_CS, 1); | ||
239 | } | ||
240 | |||
241 | static int sx1_panel_enable(struct lcd_panel *panel) | ||
242 | { | ||
243 | printk(KERN_INFO "lcd_sx1: LCD panel enable\n"); | ||
244 | init_system(); | ||
245 | display_init(); | ||
246 | |||
247 | sx1_setmmipower(1); | ||
248 | sx1_setbacklight(0x18); | ||
249 | sx1_setkeylight (0x06); | ||
250 | return 0; | ||
251 | } | ||
252 | |||
253 | |||
254 | static unsigned long sx1_panel_get_caps(struct lcd_panel *panel) | ||
255 | { | ||
256 | return 0; | ||
257 | } | ||
258 | |||
259 | struct lcd_panel sx1_panel = { | ||
260 | .name = "sx1", | ||
261 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
262 | OMAP_LCDC_INV_HSYNC | OMAP_LCDC_INV_PIX_CLOCK | | ||
263 | OMAP_LCDC_INV_OUTPUT_EN, | ||
264 | |||
265 | .x_res = 176, | ||
266 | .y_res = 220, | ||
267 | .data_lines = 16, | ||
268 | .bpp = 16, | ||
269 | .hsw = 5, | ||
270 | .hfp = 5, | ||
271 | .hbp = 5, | ||
272 | .vsw = 2, | ||
273 | .vfp = 1, | ||
274 | .vbp = 1, | ||
275 | .pixel_clock = 1500, | ||
276 | |||
277 | .init = sx1_panel_init, | ||
278 | .cleanup = sx1_panel_cleanup, | ||
279 | .enable = sx1_panel_enable, | ||
280 | .disable = sx1_panel_disable, | ||
281 | .get_caps = sx1_panel_get_caps, | ||
282 | }; | ||
283 | |||
284 | static int sx1_panel_probe(struct platform_device *pdev) | ||
285 | { | ||
286 | omapfb_register_panel(&sx1_panel); | ||
287 | return 0; | ||
288 | } | ||
289 | |||
290 | static int sx1_panel_remove(struct platform_device *pdev) | ||
291 | { | ||
292 | return 0; | ||
293 | } | ||
294 | |||
295 | static int sx1_panel_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
296 | { | ||
297 | return 0; | ||
298 | } | ||
299 | |||
300 | static int sx1_panel_resume(struct platform_device *pdev) | ||
301 | { | ||
302 | return 0; | ||
303 | } | ||
304 | |||
305 | struct platform_driver sx1_panel_driver = { | ||
306 | .probe = sx1_panel_probe, | ||
307 | .remove = sx1_panel_remove, | ||
308 | .suspend = sx1_panel_suspend, | ||
309 | .resume = sx1_panel_resume, | ||
310 | .driver = { | ||
311 | .name = "lcd_sx1", | ||
312 | .owner = THIS_MODULE, | ||
313 | }, | ||
314 | }; | ||
315 | |||
316 | static int sx1_panel_drv_init(void) | ||
317 | { | ||
318 | return platform_driver_register(&sx1_panel_driver); | ||
319 | } | ||
320 | |||
321 | static void sx1_panel_drv_cleanup(void) | ||
322 | { | ||
323 | platform_driver_unregister(&sx1_panel_driver); | ||
324 | } | ||
325 | |||
326 | module_init(sx1_panel_drv_init); | ||
327 | module_exit(sx1_panel_drv_cleanup); | ||
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 97204497d9f7..cc59c52e1103 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -804,6 +804,9 @@ static int pxafb_smart_thread(void *arg) | |||
804 | 804 | ||
805 | static int pxafb_smart_init(struct pxafb_info *fbi) | 805 | static int pxafb_smart_init(struct pxafb_info *fbi) |
806 | { | 806 | { |
807 | if (!(fbi->lccr0 | LCCR0_LCDT)) | ||
808 | return 0; | ||
809 | |||
807 | fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, | 810 | fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, |
808 | "lcd_refresh"); | 811 | "lcd_refresh"); |
809 | if (IS_ERR(fbi->smart_thread)) { | 812 | if (IS_ERR(fbi->smart_thread)) { |
@@ -1372,7 +1375,7 @@ static void pxafb_decode_mach_info(struct pxafb_info *fbi, | |||
1372 | fbi->cmap_inverse = inf->cmap_inverse; | 1375 | fbi->cmap_inverse = inf->cmap_inverse; |
1373 | fbi->cmap_static = inf->cmap_static; | 1376 | fbi->cmap_static = inf->cmap_static; |
1374 | 1377 | ||
1375 | switch (lcd_conn & 0xf) { | 1378 | switch (lcd_conn & LCD_TYPE_MASK) { |
1376 | case LCD_TYPE_MONO_STN: | 1379 | case LCD_TYPE_MONO_STN: |
1377 | fbi->lccr0 = LCCR0_CMS; | 1380 | fbi->lccr0 = LCCR0_CMS; |
1378 | break; | 1381 | break; |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index 2a380011e9ba..7baf2dd12d50 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c | |||
@@ -222,6 +222,9 @@ static irqreturn_t tmiofb_irq(int irq, void *__info) | |||
222 | unsigned int bbisc = tmio_ioread16(par->lcr + LCR_BBISC); | 222 | unsigned int bbisc = tmio_ioread16(par->lcr + LCR_BBISC); |
223 | 223 | ||
224 | 224 | ||
225 | tmio_iowrite16(bbisc, par->lcr + LCR_BBISC); | ||
226 | |||
227 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
225 | /* | 228 | /* |
226 | * We were in polling mode and now we got correct irq. | 229 | * We were in polling mode and now we got correct irq. |
227 | * Switch back to IRQ-based sync of command FIFO | 230 | * Switch back to IRQ-based sync of command FIFO |
@@ -231,9 +234,6 @@ static irqreturn_t tmiofb_irq(int irq, void *__info) | |||
231 | par->use_polling = false; | 234 | par->use_polling = false; |
232 | } | 235 | } |
233 | 236 | ||
234 | tmio_iowrite16(bbisc, par->lcr + LCR_BBISC); | ||
235 | |||
236 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
237 | if (bbisc & 1) | 237 | if (bbisc & 1) |
238 | wake_up(&par->wait_acc); | 238 | wake_up(&par->wait_acc); |
239 | #endif | 239 | #endif |
@@ -938,7 +938,9 @@ static void tmiofb_dump_regs(struct platform_device *dev) | |||
938 | static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) | 938 | static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) |
939 | { | 939 | { |
940 | struct fb_info *info = platform_get_drvdata(dev); | 940 | struct fb_info *info = platform_get_drvdata(dev); |
941 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
941 | struct tmiofb_par *par = info->par; | 942 | struct tmiofb_par *par = info->par; |
943 | #endif | ||
942 | struct mfd_cell *cell = dev->dev.platform_data; | 944 | struct mfd_cell *cell = dev->dev.platform_data; |
943 | int retval = 0; | 945 | int retval = 0; |
944 | 946 | ||
@@ -950,12 +952,14 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) | |||
950 | info->fbops->fb_sync(info); | 952 | info->fbops->fb_sync(info); |
951 | 953 | ||
952 | 954 | ||
955 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
953 | /* | 956 | /* |
954 | * The fb should be usable even if interrupts are disabled (and they are | 957 | * The fb should be usable even if interrupts are disabled (and they are |
955 | * during suspend/resume). Switch temporary to forced polling. | 958 | * during suspend/resume). Switch temporary to forced polling. |
956 | */ | 959 | */ |
957 | printk(KERN_INFO "tmiofb: switching to polling\n"); | 960 | printk(KERN_INFO "tmiofb: switching to polling\n"); |
958 | par->use_polling = true; | 961 | par->use_polling = true; |
962 | #endif | ||
959 | tmiofb_hw_stop(dev); | 963 | tmiofb_hw_stop(dev); |
960 | 964 | ||
961 | if (cell->suspend) | 965 | if (cell->suspend) |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 0132eae06f55..73ac754ad801 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -2036,30 +2036,30 @@ static int viafb_vt1636_proc_write(struct file *file, | |||
2036 | return count; | 2036 | return count; |
2037 | } | 2037 | } |
2038 | 2038 | ||
2039 | static void viafb_init_proc(struct proc_dir_entry *viafb_entry) | 2039 | static void viafb_init_proc(struct proc_dir_entry **viafb_entry) |
2040 | { | 2040 | { |
2041 | struct proc_dir_entry *entry; | 2041 | struct proc_dir_entry *entry; |
2042 | viafb_entry = proc_mkdir("viafb", NULL); | 2042 | *viafb_entry = proc_mkdir("viafb", NULL); |
2043 | if (viafb_entry) { | 2043 | if (viafb_entry) { |
2044 | entry = create_proc_entry("dvp0", 0, viafb_entry); | 2044 | entry = create_proc_entry("dvp0", 0, *viafb_entry); |
2045 | if (entry) { | 2045 | if (entry) { |
2046 | entry->owner = THIS_MODULE; | 2046 | entry->owner = THIS_MODULE; |
2047 | entry->read_proc = viafb_dvp0_proc_read; | 2047 | entry->read_proc = viafb_dvp0_proc_read; |
2048 | entry->write_proc = viafb_dvp0_proc_write; | 2048 | entry->write_proc = viafb_dvp0_proc_write; |
2049 | } | 2049 | } |
2050 | entry = create_proc_entry("dvp1", 0, viafb_entry); | 2050 | entry = create_proc_entry("dvp1", 0, *viafb_entry); |
2051 | if (entry) { | 2051 | if (entry) { |
2052 | entry->owner = THIS_MODULE; | 2052 | entry->owner = THIS_MODULE; |
2053 | entry->read_proc = viafb_dvp1_proc_read; | 2053 | entry->read_proc = viafb_dvp1_proc_read; |
2054 | entry->write_proc = viafb_dvp1_proc_write; | 2054 | entry->write_proc = viafb_dvp1_proc_write; |
2055 | } | 2055 | } |
2056 | entry = create_proc_entry("dfph", 0, viafb_entry); | 2056 | entry = create_proc_entry("dfph", 0, *viafb_entry); |
2057 | if (entry) { | 2057 | if (entry) { |
2058 | entry->owner = THIS_MODULE; | 2058 | entry->owner = THIS_MODULE; |
2059 | entry->read_proc = viafb_dfph_proc_read; | 2059 | entry->read_proc = viafb_dfph_proc_read; |
2060 | entry->write_proc = viafb_dfph_proc_write; | 2060 | entry->write_proc = viafb_dfph_proc_write; |
2061 | } | 2061 | } |
2062 | entry = create_proc_entry("dfpl", 0, viafb_entry); | 2062 | entry = create_proc_entry("dfpl", 0, *viafb_entry); |
2063 | if (entry) { | 2063 | if (entry) { |
2064 | entry->owner = THIS_MODULE; | 2064 | entry->owner = THIS_MODULE; |
2065 | entry->read_proc = viafb_dfpl_proc_read; | 2065 | entry->read_proc = viafb_dfpl_proc_read; |
@@ -2068,7 +2068,7 @@ static void viafb_init_proc(struct proc_dir_entry *viafb_entry) | |||
2068 | if (VT1636_LVDS == viaparinfo->chip_info->lvds_chip_info. | 2068 | if (VT1636_LVDS == viaparinfo->chip_info->lvds_chip_info. |
2069 | lvds_chip_name || VT1636_LVDS == | 2069 | lvds_chip_name || VT1636_LVDS == |
2070 | viaparinfo->chip_info->lvds_chip_info2.lvds_chip_name) { | 2070 | viaparinfo->chip_info->lvds_chip_info2.lvds_chip_name) { |
2071 | entry = create_proc_entry("vt1636", 0, viafb_entry); | 2071 | entry = create_proc_entry("vt1636", 0, *viafb_entry); |
2072 | if (entry) { | 2072 | if (entry) { |
2073 | entry->owner = THIS_MODULE; | 2073 | entry->owner = THIS_MODULE; |
2074 | entry->read_proc = viafb_vt1636_proc_read; | 2074 | entry->read_proc = viafb_vt1636_proc_read; |
@@ -2087,6 +2087,7 @@ static void viafb_remove_proc(struct proc_dir_entry *viafb_entry) | |||
2087 | remove_proc_entry("dfpl", viafb_entry); | 2087 | remove_proc_entry("dfpl", viafb_entry); |
2088 | remove_proc_entry("vt1636", viafb_entry); | 2088 | remove_proc_entry("vt1636", viafb_entry); |
2089 | remove_proc_entry("vt1625", viafb_entry); | 2089 | remove_proc_entry("vt1625", viafb_entry); |
2090 | remove_proc_entry("viafb", NULL); | ||
2090 | } | 2091 | } |
2091 | 2092 | ||
2092 | static int __devinit via_pci_probe(void) | 2093 | static int __devinit via_pci_probe(void) |
@@ -2348,7 +2349,7 @@ static int __devinit via_pci_probe(void) | |||
2348 | viafbinfo->node, viafbinfo->fix.id, default_var.xres, | 2349 | viafbinfo->node, viafbinfo->fix.id, default_var.xres, |
2349 | default_var.yres, default_var.bits_per_pixel); | 2350 | default_var.yres, default_var.bits_per_pixel); |
2350 | 2351 | ||
2351 | viafb_init_proc(viaparinfo->proc_entry); | 2352 | viafb_init_proc(&viaparinfo->proc_entry); |
2352 | viafb_init_dac(IGA2); | 2353 | viafb_init_dac(IGA2); |
2353 | return 0; | 2354 | return 0; |
2354 | } | 2355 | } |
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index a463b3dd837b..2493f05e9f61 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
@@ -668,7 +668,7 @@ static struct xenbus_device_id xenfb_ids[] = { | |||
668 | { "" } | 668 | { "" } |
669 | }; | 669 | }; |
670 | 670 | ||
671 | static struct xenbus_driver xenfb = { | 671 | static struct xenbus_driver xenfb_driver = { |
672 | .name = "vfb", | 672 | .name = "vfb", |
673 | .owner = THIS_MODULE, | 673 | .owner = THIS_MODULE, |
674 | .ids = xenfb_ids, | 674 | .ids = xenfb_ids, |
@@ -687,12 +687,12 @@ static int __init xenfb_init(void) | |||
687 | if (xen_initial_domain()) | 687 | if (xen_initial_domain()) |
688 | return -ENODEV; | 688 | return -ENODEV; |
689 | 689 | ||
690 | return xenbus_register_frontend(&xenfb); | 690 | return xenbus_register_frontend(&xenfb_driver); |
691 | } | 691 | } |
692 | 692 | ||
693 | static void __exit xenfb_cleanup(void) | 693 | static void __exit xenfb_cleanup(void) |
694 | { | 694 | { |
695 | xenbus_unregister_driver(&xenfb); | 695 | xenbus_unregister_driver(&xenfb_driver); |
696 | } | 696 | } |
697 | 697 | ||
698 | module_init(xenfb_init); | 698 | module_init(xenfb_init); |
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index 5da3d2423cc0..40a3a2afbfe7 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
@@ -298,8 +298,9 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr, | |||
298 | 298 | ||
299 | /* Put a banner in the log (for DEBUG) */ | 299 | /* Put a banner in the log (for DEBUG) */ |
300 | dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr, drvdata->regs); | 300 | dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr, drvdata->regs); |
301 | dev_dbg(dev, "fb: phys=%p, virt=%p, size=%x\n", | 301 | dev_dbg(dev, "fb: phys=%llx, virt=%p, size=%x\n", |
302 | (void*)drvdata->fb_phys, drvdata->fb_virt, fbsize); | 302 | (unsigned long long) drvdata->fb_phys, drvdata->fb_virt, |
303 | fbsize); | ||
303 | 304 | ||
304 | return 0; /* success */ | 305 | return 0; /* success */ |
305 | 306 | ||