diff options
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/console/fbcon.c | 14 | ||||
| -rw-r--r-- | drivers/video/matrox/g450_pll.c | 23 | ||||
| -rw-r--r-- | drivers/video/matrox/matroxfb_DAC1064.h | 15 | ||||
| -rw-r--r-- | drivers/video/matrox/matroxfb_base.h | 1 | ||||
| -rw-r--r-- | drivers/video/matrox/matroxfb_misc.c | 1 | ||||
| -rw-r--r-- | drivers/video/pvr2fb.c | 16 | ||||
| -rw-r--r-- | drivers/video/stifb.c | 19 |
7 files changed, 66 insertions, 23 deletions
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; | |||
| 127 | static int fbcon_is_default = 1; | 127 | static int fbcon_is_default = 1; |
| 128 | static int fbcon_has_exited; | 128 | static int fbcon_has_exited; |
| 129 | static int primary_device = -1; | 129 | static int primary_device = -1; |
| 130 | |||
| 131 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY | ||
| 130 | static int map_override; | 132 | static int map_override; |
| 131 | 133 | ||
| 134 | static inline void fbcon_map_override(void) | ||
| 135 | { | ||
| 136 | map_override = 1; | ||
| 137 | } | ||
| 138 | #else | ||
| 139 | static inline void fbcon_map_override(void) | ||
| 140 | { | ||
| 141 | } | ||
| 142 | #endif /* CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY */ | ||
| 143 | |||
| 132 | /* font data */ | 144 | /* font data */ |
| 133 | static char fontname[40]; | 145 | static 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/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 | ||
| 148 | static struct fb_info *fb_info; | 150 | static 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 | ||
| 1132 | module_init(pvr2fb_init); | 1138 | module_init(pvr2fb_init); |
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 | } |
