aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/au1100fb.c92
-rw-r--r--drivers/video/cg6.c5
-rw-r--r--drivers/video/console/fbcon.c14
-rw-r--r--drivers/video/console/newport_con.c3
-rw-r--r--drivers/video/imsttfb.c2
-rw-r--r--drivers/video/matrox/g450_pll.c23
-rw-r--r--drivers/video/matrox/matroxfb_DAC1064.h15
-rw-r--r--drivers/video/matrox/matroxfb_base.h1
-rw-r--r--drivers/video/matrox/matroxfb_misc.c1
-rw-r--r--drivers/video/pvr2fb.c16
-rw-r--r--drivers/video/pxafb.c2
-rw-r--r--drivers/video/stifb.c19
12 files changed, 119 insertions, 74 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;
115module_param(nocursor, int, 0644); 115module_param(nocursor, int, 0644);
116MODULE_PARM_DESC(nocursor, "cursor enable/disable"); 116MODULE_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 */
122static 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 */
279int 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/cg6.c b/drivers/video/cg6.c
index 87c747123538..ee9046db9c7d 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
677 struct fb_info *info; 677 struct fb_info *info;
678 struct cg6_par *par; 678 struct cg6_par *par;
679 int linebytes, err; 679 int linebytes, err;
680 int dblbuf;
680 681
681 info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev); 682 info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev);
682 683
@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
698 linebytes = of_getintprop_default(dp, "linebytes", 699 linebytes = of_getintprop_default(dp, "linebytes",
699 info->var.xres); 700 info->var.xres);
700 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 701 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
701 if (of_find_property(dp, "dblbuf", NULL)) 702
703 dblbuf = of_getintprop_default(dp, "dblbuf", 0);
704 if (dblbuf)
702 par->fbsize *= 4; 705 par->fbsize *= 4;
703 706
704 par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, 707 par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index decfdc8eb9cc..e58c87b3e3a0 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -127,8 +127,20 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1;
127static int fbcon_is_default = 1; 127static int fbcon_is_default = 1;
128static int fbcon_has_exited; 128static int fbcon_has_exited;
129static int primary_device = -1; 129static int primary_device = -1;
130
131#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY
130static int map_override; 132static int map_override;
131 133
134static inline void fbcon_map_override(void)
135{
136 map_override = 1;
137}
138#else
139static inline void fbcon_map_override(void)
140{
141}
142#endif /* CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY */
143
132/* font data */ 144/* font data */
133static char fontname[40]; 145static char fontname[40];
134 146
@@ -506,7 +518,7 @@ static int __init fb_console_setup(char *this_opt)
506 (options[j++]-'0') % FB_MAX; 518 (options[j++]-'0') % FB_MAX;
507 } 519 }
508 520
509 map_override = 1; 521 fbcon_map_override();
510 } 522 }
511 523
512 return 1; 524 return 1;
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
739static int __init newport_console_init(void) 739static 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/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/matrox/g450_pll.c b/drivers/video/matrox/g450_pll.c
index 7c76e079ca7d..d42346e7fdda 100644
--- a/drivers/video/matrox/g450_pll.c
+++ b/drivers/video/matrox/g450_pll.c
@@ -331,16 +331,19 @@ static int __g450_setclk(WPMINFO unsigned int fout, unsigned int pll,
331 tmp |= M1064_XPIXCLKCTRL_PLL_UP; 331 tmp |= M1064_XPIXCLKCTRL_PLL_UP;
332 } 332 }
333 matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp); 333 matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp);
334#ifdef __powerpc__ 334 /* DVI PLL preferred for frequencies up to
335 /* This is necessary to avoid jitter on PowerPC 335 panel link max, standard PLL otherwise */
336 * (OpenFirmware) systems, but apparently 336 if (fout >= MINFO->max_pixel_clock_panellink)
337 * introduces jitter, at least on a x86-64 337 tmp = 0;
338 * using DVI. 338 else tmp =
339 * A simple workaround is disable for non-PPC. 339 M1064_XDVICLKCTRL_DVIDATAPATHSEL |
340 */ 340 M1064_XDVICLKCTRL_C1DVICLKSEL |
341 matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL, 0); 341 M1064_XDVICLKCTRL_C1DVICLKEN |
342#endif /* __powerpc__ */ 342 M1064_XDVICLKCTRL_DVILOOPCTL |
343 matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, xpwrctrl); 343 M1064_XDVICLKCTRL_P1LOOPBWDTCTL;
344 matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL,tmp);
345 matroxfb_DAC_out(PMINFO M1064_XPWRCTRL,
346 xpwrctrl);
344 347
345 matroxfb_DAC_unlock_irqrestore(flags); 348 matroxfb_DAC_unlock_irqrestore(flags);
346 } 349 }
diff --git a/drivers/video/matrox/matroxfb_DAC1064.h b/drivers/video/matrox/matroxfb_DAC1064.h
index df39c3193735..7a98ce8043d7 100644
--- a/drivers/video/matrox/matroxfb_DAC1064.h
+++ b/drivers/video/matrox/matroxfb_DAC1064.h
@@ -33,6 +33,21 @@ void DAC1064_global_restore(WPMINFO2);
33#define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */ 33#define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */
34#define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */ 34#define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */
35#define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */ 35#define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */
36 /* drive DVI by standard(0)/DVI(1) PLL */
37 /* if set(1), C?DVICLKEN and C?DVICLKSEL must be set(1) */
38#define M1064_XDVICLKCTRL_DVIDATAPATHSEL 0x01
39 /* drive CRTC1 by standard(0)/DVI(1) PLL */
40#define M1064_XDVICLKCTRL_C1DVICLKSEL 0x02
41 /* drive CRTC2 by standard(0)/DVI(1) PLL */
42#define M1064_XDVICLKCTRL_C2DVICLKSEL 0x04
43 /* pixel clock allowed to(0)/blocked from(1) driving CRTC1 */
44#define M1064_XDVICLKCTRL_C1DVICLKEN 0x08
45 /* DVI PLL loop filter bandwidth selection bits */
46#define M1064_XDVICLKCTRL_DVILOOPCTL 0x30
47 /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */
48#define M1064_XDVICLKCTRL_C2DVICLKEN 0x40
49 /* P1PLL loop filter bandwith selection */
50#define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80
36#define M1064_XCURCOL0RED 0x08 51#define M1064_XCURCOL0RED 0x08
37#define M1064_XCURCOL0GREEN 0x09 52#define M1064_XCURCOL0GREEN 0x09
38#define M1064_XCURCOL0BLUE 0x0A 53#define M1064_XCURCOL0BLUE 0x0A
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index d59577c8de86..f3107ad7e545 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -424,6 +424,7 @@ struct matrox_fb_info {
424 } mmio; 424 } mmio;
425 425
426 unsigned int max_pixel_clock; 426 unsigned int max_pixel_clock;
427 unsigned int max_pixel_clock_panellink;
427 428
428 struct matrox_switch* hw_switch; 429 struct matrox_switch* hw_switch;
429 430
diff --git a/drivers/video/matrox/matroxfb_misc.c b/drivers/video/matrox/matroxfb_misc.c
index 5948e54b9ef9..ab7fb50bc1de 100644
--- a/drivers/video/matrox/matroxfb_misc.c
+++ b/drivers/video/matrox/matroxfb_misc.c
@@ -658,6 +658,7 @@ static int parse_pins5(WPMINFO const struct matrox_bios* bd) {
658 MINFO->values.reg.mctlwtst_core = (MINFO->values.reg.mctlwtst & ~7) | 658 MINFO->values.reg.mctlwtst_core = (MINFO->values.reg.mctlwtst & ~7) |
659 wtst_xlat[MINFO->values.reg.mctlwtst & 7]; 659 wtst_xlat[MINFO->values.reg.mctlwtst & 7];
660 } 660 }
661 MINFO->max_pixel_clock_panellink = bd->pins[47] * 4000;
661 return 0; 662 return 0;
662} 663}
663 664
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index f9300266044d..7d6c29800d14 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -94,6 +94,7 @@
94#define DISP_DIWCONF (DISP_BASE + 0xe8) 94#define DISP_DIWCONF (DISP_BASE + 0xe8)
95#define DISP_DIWHSTRT (DISP_BASE + 0xec) 95#define DISP_DIWHSTRT (DISP_BASE + 0xec)
96#define DISP_DIWVSTRT (DISP_BASE + 0xf0) 96#define DISP_DIWVSTRT (DISP_BASE + 0xf0)
97#define DISP_PIXDEPTH (DISP_BASE + 0x108)
97 98
98/* Pixel clocks, one for TV output, doubled for VGA output */ 99/* Pixel clocks, one for TV output, doubled for VGA output */
99#define TV_CLK 74239 100#define TV_CLK 74239
@@ -143,6 +144,7 @@ static struct pvr2fb_par {
143 unsigned char is_lowres; /* Is horizontal pixel-doubling enabled? */ 144 unsigned char is_lowres; /* Is horizontal pixel-doubling enabled? */
144 145
145 unsigned long mmio_base; /* MMIO base */ 146 unsigned long mmio_base; /* MMIO base */
147 u32 palette[16];
146} *currentpar; 148} *currentpar;
147 149
148static struct fb_info *fb_info; 150static struct fb_info *fb_info;
@@ -599,6 +601,7 @@ static void pvr2_init_display(struct fb_info *info)
599 601
600 /* bits per pixel */ 602 /* bits per pixel */
601 fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE); 603 fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE);
604 fb_writel(bytesperpixel << 2, DISP_PIXDEPTH);
602 605
603 /* video enable, color sync, interlace, 606 /* video enable, color sync, interlace,
604 * hsync and vsync polarity (currently unused) */ 607 * hsync and vsync polarity (currently unused) */
@@ -790,7 +793,7 @@ static int __devinit pvr2fb_common_init(void)
790 fb_info->fbops = &pvr2fb_ops; 793 fb_info->fbops = &pvr2fb_ops;
791 fb_info->fix = pvr2_fix; 794 fb_info->fix = pvr2_fix;
792 fb_info->par = currentpar; 795 fb_info->par = currentpar;
793 fb_info->pseudo_palette = (void *)(fb_info->par + 1); 796 fb_info->pseudo_palette = currentpar->palette;
794 fb_info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; 797 fb_info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
795 798
796 if (video_output == VO_VGA) 799 if (video_output == VO_VGA)
@@ -807,6 +810,8 @@ static int __devinit pvr2fb_common_init(void)
807 810
808 if (register_framebuffer(fb_info) < 0) 811 if (register_framebuffer(fb_info) < 0)
809 goto out_err; 812 goto out_err;
813 /*Must write PIXDEPTH to register before anything is displayed - so force init */
814 pvr2_init_display(fb_info);
810 815
811 modememused = get_line_length(fb_info->var.xres_virtual, 816 modememused = get_line_length(fb_info->var.xres_virtual,
812 fb_info->var.bits_per_pixel); 817 fb_info->var.bits_per_pixel);
@@ -1082,14 +1087,15 @@ static int __init pvr2fb_init(void)
1082#endif 1087#endif
1083 size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32); 1088 size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32);
1084 1089
1085 fb_info = kzalloc(size, GFP_KERNEL); 1090 fb_info = framebuffer_alloc(sizeof(struct pvr2fb_par), NULL);
1091
1086 if (!fb_info) { 1092 if (!fb_info) {
1087 printk(KERN_ERR "Failed to allocate memory for fb_info\n"); 1093 printk(KERN_ERR "Failed to allocate memory for fb_info\n");
1088 return -ENOMEM; 1094 return -ENOMEM;
1089 } 1095 }
1090 1096
1091 1097
1092 currentpar = (struct pvr2fb_par *)(fb_info + 1); 1098 currentpar = fb_info->par;
1093 1099
1094 for (i = 0; i < ARRAY_SIZE(board_driver); i++) { 1100 for (i = 0; i < ARRAY_SIZE(board_driver); i++) {
1095 struct pvr2_board *pvr_board = board_driver + i; 1101 struct pvr2_board *pvr_board = board_driver + i;
@@ -1102,7 +1108,7 @@ static int __init pvr2fb_init(void)
1102 if (ret != 0) { 1108 if (ret != 0) {
1103 printk(KERN_ERR "pvr2fb: Failed init of %s device\n", 1109 printk(KERN_ERR "pvr2fb: Failed init of %s device\n",
1104 pvr_board->name); 1110 pvr_board->name);
1105 kfree(fb_info); 1111 framebuffer_release(fb_info);
1106 break; 1112 break;
1107 } 1113 }
1108 } 1114 }
@@ -1126,7 +1132,7 @@ static void __exit pvr2fb_exit(void)
1126#endif 1132#endif
1127 1133
1128 unregister_framebuffer(fb_info); 1134 unregister_framebuffer(fb_info);
1129 kfree(fb_info); 1135 framebuffer_release(fb_info);
1130} 1136}
1131 1137
1132module_init(pvr2fb_init); 1138module_init(pvr2fb_init);
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
69static char g_options[PXAFB_OPTIONS_SIZE] __initdata = ""; 69static char g_options[PXAFB_OPTIONS_SIZE] __devinitdata = "";
70#endif 70#endif
71 71
72static inline void pxafb_schedule_work(struct pxafb_info *fbi, u_int state) 72static inline void pxafb_schedule_work(struct pxafb_info *fbi, u_int state)
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
index c97709ecbad0..e7c8db2eb49b 100644
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -1100,13 +1100,18 @@ stifb_init_fb(struct sti_struct *sti, int bpp_pref)
1100 /* only supported cards are allowed */ 1100 /* only supported cards are allowed */
1101 switch (fb->id) { 1101 switch (fb->id) {
1102 case CRT_ID_VISUALIZE_EG: 1102 case CRT_ID_VISUALIZE_EG:
1103 /* look for a double buffering device like e.g. the 1103 /* Visualize cards can run either in "double buffer" or
1104 "INTERNAL_EG_DX1024" in the RDI precisionbook laptop 1104 "standard" mode. Depending on the mode, the card reports
1105 which won't work. The same device in non-double 1105 a different device name, e.g. "INTERNAL_EG_DX1024" in double
1106 buffering mode returns "INTERNAL_EG_X1024". */ 1106 buffer mode and "INTERNAL_EG_X1024" in standard mode.
1107 if (strstr(sti->outptr.dev_name, "EG_DX")) { 1107 Since this driver only supports standard mode, we check
1108 printk(KERN_WARNING 1108 if the device name contains the string "DX" and tell the
1109 "stifb: ignoring '%s'. Disable double buffering in IPL menu.\n", 1109 user how to reconfigure the card. */
1110 if (strstr(sti->outptr.dev_name, "DX")) {
1111 printk(KERN_WARNING "WARNING: stifb framebuffer driver does not "
1112 "support '%s' in double-buffer mode.\n"
1113 KERN_WARNING "WARNING: Please disable the double-buffer mode "
1114 "in IPL menu (the PARISC-BIOS).\n",
1110 sti->outptr.dev_name); 1115 sti->outptr.dev_name);
1111 goto out_err0; 1116 goto out_err0;
1112 } 1117 }