aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/vesafb.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-01-09 23:52:54 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:42 -0500
commit2b4f2f4b0132afa9f441171285cca354377bf5d0 (patch)
tree5f940818050fc272beb2d98294ee5f6eec287113 /drivers/video/vesafb.c
parent532347e2bbae9e849816dc7b12a3d0f2c42d4944 (diff)
[PATCH] vesafb: Drop blank hook
From: Bugzilla Bug 5351 "After resuming from S3 (suspended while in X), the LCD panel stays black . However, the laptop is up again, and I can SSH into it from another machine. I can get the panel working again, when I first direct video output to the CRT output of the laptop, and then back to LCD (done by repeatedly hitting Fn+F5 buttons on the Toshiba, which directs output to either LCD, CRT or TV) None of this ever happened with older kernels." This bug is due to the recently added vesafb_blank() method in vesafb. It works with CRT displays, but has a high incidence of problems in laptop users. Since CRT users don't really get that much benefit from hardware blanking, drop support for this. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r--drivers/video/vesafb.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
index 3e58ddc2bc38..55e28ba57b43 100644
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -57,7 +57,6 @@ static unsigned short *pmi_base = NULL;
57static void (*pmi_start)(void); 57static void (*pmi_start)(void);
58static void (*pmi_pal)(void); 58static void (*pmi_pal)(void);
59static int depth; 59static int depth;
60static int vga_compat;
61 60
62/* --------------------------------------------------------------------- */ 61/* --------------------------------------------------------------------- */
63 62
@@ -90,37 +89,6 @@ static int vesafb_pan_display(struct fb_var_screeninfo *var,
90 return 0; 89 return 0;
91} 90}
92 91
93static int vesafb_blank(int blank, struct fb_info *info)
94{
95 int err = 1;
96
97 if (vga_compat) {
98 int loop = 10000;
99 u8 seq = 0, crtc17 = 0;
100
101 if (blank == FB_BLANK_POWERDOWN) {
102 seq = 0x20;
103 crtc17 = 0x00;
104 err = 0;
105 } else {
106 seq = 0x00;
107 crtc17 = 0x80;
108 err = (blank == FB_BLANK_UNBLANK) ? 0 : -EINVAL;
109 }
110
111 vga_wseq(NULL, 0x00, 0x01);
112 seq |= vga_rseq(NULL, 0x01) & ~0x20;
113 vga_wseq(NULL, 0x00, seq);
114
115 crtc17 |= vga_rcrt(NULL, 0x17) & ~0x80;
116 while (loop--);
117 vga_wcrt(NULL, 0x17, crtc17);
118 vga_wseq(NULL, 0x00, 0x03);
119 }
120
121 return err;
122}
123
124static void vesa_setpalette(int regno, unsigned red, unsigned green, 92static void vesa_setpalette(int regno, unsigned red, unsigned green,
125 unsigned blue) 93 unsigned blue)
126{ 94{
@@ -205,7 +173,6 @@ static struct fb_ops vesafb_ops = {
205 .owner = THIS_MODULE, 173 .owner = THIS_MODULE,
206 .fb_setcolreg = vesafb_setcolreg, 174 .fb_setcolreg = vesafb_setcolreg,
207 .fb_pan_display = vesafb_pan_display, 175 .fb_pan_display = vesafb_pan_display,
208 .fb_blank = vesafb_blank,
209 .fb_fillrect = cfb_fillrect, 176 .fb_fillrect = cfb_fillrect,
210 .fb_copyarea = cfb_copyarea, 177 .fb_copyarea = cfb_copyarea,
211 .fb_imageblit = cfb_imageblit, 178 .fb_imageblit = cfb_imageblit,
@@ -459,10 +426,6 @@ static int __init vesafb_probe(struct platform_device *dev)
459 info->flags = FBINFO_FLAG_DEFAULT | 426 info->flags = FBINFO_FLAG_DEFAULT |
460 (ypan) ? FBINFO_HWACCEL_YPAN : 0; 427 (ypan) ? FBINFO_HWACCEL_YPAN : 0;
461 428
462 vga_compat = (screen_info.capabilities & 2) ? 0 : 1;
463 printk("vesafb: Mode is %sVGA compatible\n",
464 (vga_compat) ? "" : "not ");
465
466 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { 429 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
467 err = -ENOMEM; 430 err = -ENOMEM;
468 goto err; 431 goto err;