diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/au1100fb.c | 92 | ||||
-rw-r--r-- | drivers/video/bw2.c | 22 | ||||
-rw-r--r-- | drivers/video/cg3.c | 17 | ||||
-rw-r--r-- | drivers/video/console/Kconfig | 2 | ||||
-rw-r--r-- | drivers/video/console/newport_con.c | 3 | ||||
-rw-r--r-- | drivers/video/console/sticore.c | 14 | ||||
-rw-r--r-- | drivers/video/imsttfb.c | 2 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 2 |
8 files changed, 78 insertions, 76 deletions
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index 80a81eccad36..832e4613673a 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -115,6 +115,52 @@ static int nocursor = 0; | |||
115 | module_param(nocursor, int, 0644); | 115 | module_param(nocursor, int, 0644); |
116 | MODULE_PARM_DESC(nocursor, "cursor enable/disable"); | 116 | MODULE_PARM_DESC(nocursor, "cursor enable/disable"); |
117 | 117 | ||
118 | /* fb_blank | ||
119 | * Blank the screen. Depending on the mode, the screen will be | ||
120 | * activated with the backlight color, or desactivated | ||
121 | */ | ||
122 | static int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi) | ||
123 | { | ||
124 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | ||
125 | |||
126 | print_dbg("fb_blank %d %p", blank_mode, fbi); | ||
127 | |||
128 | switch (blank_mode) { | ||
129 | |||
130 | case VESA_NO_BLANKING: | ||
131 | /* Turn on panel */ | ||
132 | fbdev->regs->lcd_control |= LCD_CONTROL_GO; | ||
133 | #ifdef CONFIG_MIPS_PB1100 | ||
134 | if (drv_info.panel_idx == 1) { | ||
135 | au_writew(au_readw(PB1100_G_CONTROL) | ||
136 | | (PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD), | ||
137 | PB1100_G_CONTROL); | ||
138 | } | ||
139 | #endif | ||
140 | au_sync(); | ||
141 | break; | ||
142 | |||
143 | case VESA_VSYNC_SUSPEND: | ||
144 | case VESA_HSYNC_SUSPEND: | ||
145 | case VESA_POWERDOWN: | ||
146 | /* Turn off panel */ | ||
147 | fbdev->regs->lcd_control &= ~LCD_CONTROL_GO; | ||
148 | #ifdef CONFIG_MIPS_PB1100 | ||
149 | if (drv_info.panel_idx == 1) { | ||
150 | au_writew(au_readw(PB1100_G_CONTROL) | ||
151 | & ~(PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD), | ||
152 | PB1100_G_CONTROL); | ||
153 | } | ||
154 | #endif | ||
155 | au_sync(); | ||
156 | break; | ||
157 | default: | ||
158 | break; | ||
159 | |||
160 | } | ||
161 | return 0; | ||
162 | } | ||
163 | |||
118 | /* | 164 | /* |
119 | * Set hardware with var settings. This will enable the controller with a specific | 165 | * Set hardware with var settings. This will enable the controller with a specific |
120 | * mode, normally validated with the fb_check_var method | 166 | * mode, normally validated with the fb_check_var method |
@@ -272,52 +318,6 @@ int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned | |||
272 | return 0; | 318 | return 0; |
273 | } | 319 | } |
274 | 320 | ||
275 | /* fb_blank | ||
276 | * Blank the screen. Depending on the mode, the screen will be | ||
277 | * activated with the backlight color, or desactivated | ||
278 | */ | ||
279 | int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi) | ||
280 | { | ||
281 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | ||
282 | |||
283 | print_dbg("fb_blank %d %p", blank_mode, fbi); | ||
284 | |||
285 | switch (blank_mode) { | ||
286 | |||
287 | case VESA_NO_BLANKING: | ||
288 | /* Turn on panel */ | ||
289 | fbdev->regs->lcd_control |= LCD_CONTROL_GO; | ||
290 | #ifdef CONFIG_MIPS_PB1100 | ||
291 | if (drv_info.panel_idx == 1) { | ||
292 | au_writew(au_readw(PB1100_G_CONTROL) | ||
293 | | (PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD), | ||
294 | PB1100_G_CONTROL); | ||
295 | } | ||
296 | #endif | ||
297 | au_sync(); | ||
298 | break; | ||
299 | |||
300 | case VESA_VSYNC_SUSPEND: | ||
301 | case VESA_HSYNC_SUSPEND: | ||
302 | case VESA_POWERDOWN: | ||
303 | /* Turn off panel */ | ||
304 | fbdev->regs->lcd_control &= ~LCD_CONTROL_GO; | ||
305 | #ifdef CONFIG_MIPS_PB1100 | ||
306 | if (drv_info.panel_idx == 1) { | ||
307 | au_writew(au_readw(PB1100_G_CONTROL) | ||
308 | & ~(PB1100_G_CONTROL_BL | PB1100_G_CONTROL_VDD), | ||
309 | PB1100_G_CONTROL); | ||
310 | } | ||
311 | #endif | ||
312 | au_sync(); | ||
313 | break; | ||
314 | default: | ||
315 | break; | ||
316 | |||
317 | } | ||
318 | return 0; | ||
319 | } | ||
320 | |||
321 | /* fb_pan_display | 321 | /* fb_pan_display |
322 | * Pan display in x and/or y as specified | 322 | * Pan display in x and/or y as specified |
323 | */ | 323 | */ |
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 718b9f83736e..833b10c84064 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
@@ -233,9 +233,9 @@ static u8 bw2regs_66hz[] __devinitdata = { | |||
233 | 0x10, 0x20, 0 | 233 | 0x10, 0x20, 0 |
234 | }; | 234 | }; |
235 | 235 | ||
236 | static void __devinit bw2_do_default_mode(struct bw2_par *par, | 236 | static int __devinit bw2_do_default_mode(struct bw2_par *par, |
237 | struct fb_info *info, | 237 | struct fb_info *info, |
238 | int *linebytes) | 238 | int *linebytes) |
239 | { | 239 | { |
240 | u8 status, mon; | 240 | u8 status, mon; |
241 | u8 *p; | 241 | u8 *p; |
@@ -266,17 +266,18 @@ static void __devinit bw2_do_default_mode(struct bw2_par *par, | |||
266 | break; | 266 | break; |
267 | 267 | ||
268 | case BWTWO_SR_ID_NOCONN: | 268 | case BWTWO_SR_ID_NOCONN: |
269 | return; | 269 | return 0; |
270 | 270 | ||
271 | default: | 271 | default: |
272 | prom_printf("bw2: can't handle SR %02x\n", | 272 | printk(KERN_ERR "bw2: can't handle SR %02x\n", |
273 | status); | 273 | status); |
274 | prom_halt(); | 274 | return -EINVAL; |
275 | } | 275 | } |
276 | for ( ; *p; p += 2) { | 276 | for ( ; *p; p += 2) { |
277 | u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; | 277 | u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]]; |
278 | sbus_writeb(p[1], regp); | 278 | sbus_writeb(p[1], regp); |
279 | } | 279 | } |
280 | return 0; | ||
280 | } | 281 | } |
281 | 282 | ||
282 | static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) | 283 | static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) |
@@ -312,8 +313,11 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id * | |||
312 | if (!par->regs) | 313 | if (!par->regs) |
313 | goto out_release_fb; | 314 | goto out_release_fb; |
314 | 315 | ||
315 | if (!of_find_property(dp, "width", NULL)) | 316 | if (!of_find_property(dp, "width", NULL)) { |
316 | bw2_do_default_mode(par, info, &linebytes); | 317 | err = bw2_do_default_mode(par, info, &linebytes); |
318 | if (err) | ||
319 | goto out_unmap_regs; | ||
320 | } | ||
317 | 321 | ||
318 | par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); | 322 | par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); |
319 | 323 | ||
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 5741b46ade1b..a5c7fb331527 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
@@ -315,7 +315,7 @@ static u_char cg3_dacvals[] __devinitdata = { | |||
315 | 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 | 315 | 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 |
316 | }; | 316 | }; |
317 | 317 | ||
318 | static void __devinit cg3_do_default_mode(struct cg3_par *par) | 318 | static int __devinit cg3_do_default_mode(struct cg3_par *par) |
319 | { | 319 | { |
320 | enum cg3_type type; | 320 | enum cg3_type type; |
321 | u8 *p; | 321 | u8 *p; |
@@ -332,10 +332,9 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par) | |||
332 | else | 332 | else |
333 | type = CG3_AT_66HZ; | 333 | type = CG3_AT_66HZ; |
334 | } else { | 334 | } else { |
335 | prom_printf("cgthree: can't handle SR %02x\n", | 335 | printk(KERN_ERR "cgthree: can't handle SR %02x\n", |
336 | status); | 336 | status); |
337 | prom_halt(); | 337 | return -EINVAL; |
338 | return; | ||
339 | } | 338 | } |
340 | } | 339 | } |
341 | 340 | ||
@@ -351,6 +350,7 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par) | |||
351 | regp = (u8 __iomem *)&par->regs->cmap.control; | 350 | regp = (u8 __iomem *)&par->regs->cmap.control; |
352 | sbus_writeb(p[1], regp); | 351 | sbus_writeb(p[1], regp); |
353 | } | 352 | } |
353 | return 0; | ||
354 | } | 354 | } |
355 | 355 | ||
356 | static int __devinit cg3_probe(struct of_device *op, | 356 | static int __devinit cg3_probe(struct of_device *op, |
@@ -400,8 +400,11 @@ static int __devinit cg3_probe(struct of_device *op, | |||
400 | 400 | ||
401 | cg3_blank(0, info); | 401 | cg3_blank(0, info); |
402 | 402 | ||
403 | if (!of_find_property(dp, "width", NULL)) | 403 | if (!of_find_property(dp, "width", NULL)) { |
404 | cg3_do_default_mode(par); | 404 | err = cg3_do_default_mode(par); |
405 | if (err) | ||
406 | goto out_unmap_screen; | ||
407 | } | ||
405 | 408 | ||
406 | if (fb_alloc_cmap(&info->cmap, 256, 0)) | 409 | if (fb_alloc_cmap(&info->cmap, 256, 0)) |
407 | goto out_unmap_screen; | 410 | goto out_unmap_screen; |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 49643969f9f8..5db6b1e489b0 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -145,7 +145,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION | |||
145 | oriented. | 145 | oriented. |
146 | 146 | ||
147 | config STI_CONSOLE | 147 | config STI_CONSOLE |
148 | tristate "STI text console" | 148 | bool "STI text console" |
149 | depends on PARISC | 149 | depends on PARISC |
150 | default y | 150 | default y |
151 | help | 151 | help |
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 7fa1afeae8dc..dda0586ab3f3 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c | |||
@@ -738,9 +738,8 @@ const struct consw newport_con = { | |||
738 | #ifdef MODULE | 738 | #ifdef MODULE |
739 | static int __init newport_console_init(void) | 739 | static int __init newport_console_init(void) |
740 | { | 740 | { |
741 | |||
742 | if (!sgi_gfxaddr) | 741 | if (!sgi_gfxaddr) |
743 | return NULL; | 742 | return 0; |
744 | 743 | ||
745 | if (!npregs) | 744 | if (!npregs) |
746 | npregs = (struct newport_regs *)/* ioremap cannot fail */ | 745 | npregs = (struct newport_regs *)/* ioremap cannot fail */ |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 870017d44970..e9ab657f0bb7 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -232,18 +232,14 @@ sti_bmove(struct sti_struct *sti, int src_y, int src_x, | |||
232 | } | 232 | } |
233 | 233 | ||
234 | 234 | ||
235 | /* FIXME: Do we have another solution for this ? */ | 235 | static void sti_flush(unsigned long start, unsigned long end) |
236 | static void sti_flush(unsigned long from, unsigned long len) | ||
237 | { | 236 | { |
238 | flush_data_cache(); | 237 | flush_icache_range(start, end); |
239 | flush_kernel_dcache_range(from, len); | ||
240 | flush_icache_range(from, from+len); | ||
241 | } | 238 | } |
242 | 239 | ||
243 | void __devinit | 240 | void __devinit |
244 | sti_rom_copy(unsigned long base, unsigned long count, void *dest) | 241 | sti_rom_copy(unsigned long base, unsigned long count, void *dest) |
245 | { | 242 | { |
246 | unsigned long dest_len = count; | ||
247 | unsigned long dest_start = (unsigned long) dest; | 243 | unsigned long dest_start = (unsigned long) dest; |
248 | 244 | ||
249 | /* this still needs to be revisited (see arch/parisc/mm/init.c:246) ! */ | 245 | /* this still needs to be revisited (see arch/parisc/mm/init.c:246) ! */ |
@@ -260,7 +256,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
260 | dest++; | 256 | dest++; |
261 | } | 257 | } |
262 | 258 | ||
263 | sti_flush(dest_start, dest_len); | 259 | sti_flush(dest_start, (unsigned long)dest); |
264 | } | 260 | } |
265 | 261 | ||
266 | 262 | ||
@@ -663,7 +659,6 @@ sti_bmode_font_raw(struct sti_cooked_font *f) | |||
663 | static void __devinit | 659 | static void __devinit |
664 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | 660 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) |
665 | { | 661 | { |
666 | unsigned long dest_len = count; | ||
667 | unsigned long dest_start = (unsigned long) dest; | 662 | unsigned long dest_start = (unsigned long) dest; |
668 | 663 | ||
669 | while (count) { | 664 | while (count) { |
@@ -672,7 +667,8 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
672 | base += 4; | 667 | base += 4; |
673 | dest++; | 668 | dest++; |
674 | } | 669 | } |
675 | sti_flush(dest_start, dest_len); | 670 | |
671 | sti_flush(dest_start, (unsigned long)dest); | ||
676 | } | 672 | } |
677 | 673 | ||
678 | static struct sti_rom * __devinit | 674 | static struct sti_rom * __devinit |
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index 5715b8ad0ddc..94f4511023d8 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c | |||
@@ -1391,7 +1391,7 @@ init_imstt(struct fb_info *info) | |||
1391 | } | 1391 | } |
1392 | } | 1392 | } |
1393 | 1393 | ||
1394 | #if USE_NV_MODES && defined(CONFIG_PPC) | 1394 | #if USE_NV_MODES && defined(CONFIG_PPC32) |
1395 | { | 1395 | { |
1396 | int vmode = init_vmode, cmode = init_cmode; | 1396 | int vmode = init_vmode, cmode = init_cmode; |
1397 | 1397 | ||
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 81e571d59b50..a280a52f8efe 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -66,7 +66,7 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); | |||
66 | 66 | ||
67 | #ifdef CONFIG_FB_PXA_PARAMETERS | 67 | #ifdef CONFIG_FB_PXA_PARAMETERS |
68 | #define PXAFB_OPTIONS_SIZE 256 | 68 | #define PXAFB_OPTIONS_SIZE 256 |
69 | static char g_options[PXAFB_OPTIONS_SIZE] __initdata = ""; | 69 | static char g_options[PXAFB_OPTIONS_SIZE] __devinitdata = ""; |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | static inline void pxafb_schedule_work(struct pxafb_info *fbi, u_int state) | 72 | static inline void pxafb_schedule_work(struct pxafb_info *fbi, u_int state) |