aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/i386/boot/video.S5
-rw-r--r--drivers/video/vesafb.c37
-rw-r--r--include/linux/screen_info.h3
3 files changed, 1 insertions, 44 deletions
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
index 92f669470142..2ac40c8244c4 100644
--- a/arch/i386/boot/video.S
+++ b/arch/i386/boot/video.S
@@ -97,7 +97,6 @@
97#define PARAM_VESAPM_OFF 0x30 97#define PARAM_VESAPM_OFF 0x30
98#define PARAM_LFB_PAGES 0x32 98#define PARAM_LFB_PAGES 0x32
99#define PARAM_VESA_ATTRIB 0x34 99#define PARAM_VESA_ATTRIB 0x34
100#define PARAM_CAPABILITIES 0x36
101 100
102/* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ 101/* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
103#ifdef CONFIG_VIDEO_RETAIN 102#ifdef CONFIG_VIDEO_RETAIN
@@ -234,10 +233,6 @@ mopar_gr:
234 movw 18(%di), %ax 233 movw 18(%di), %ax
235 movl %eax, %fs:(PARAM_LFB_SIZE) 234 movl %eax, %fs:(PARAM_LFB_SIZE)
236 235
237# store mode capabilities
238 movl 10(%di), %eax
239 movl %eax, %fs:(PARAM_CAPABILITIES)
240
241# switching the DAC to 8-bit is for <= 8 bpp only 236# switching the DAC to 8-bit is for <= 8 bpp only
242 movw %fs:(PARAM_LFB_DEPTH), %ax 237 movw %fs:(PARAM_LFB_DEPTH), %ax
243 cmpw $8, %ax 238 cmpw $8, %ax
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;
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index 76850b75b3f6..6336987dae62 100644
--- a/include/linux/screen_info.h
+++ b/include/linux/screen_info.h
@@ -41,8 +41,7 @@ struct screen_info {
41 u16 vesapm_off; /* 0x30 */ 41 u16 vesapm_off; /* 0x30 */
42 u16 pages; /* 0x32 */ 42 u16 pages; /* 0x32 */
43 u16 vesa_attributes; /* 0x34 */ 43 u16 vesa_attributes; /* 0x34 */
44 u32 capabilities; /* 0x36 */ 44 /* 0x36 -- 0x3f reserved for future expansion */
45 /* 0x3a -- 0x3f reserved for future expansion */
46}; 45};
47 46
48extern struct screen_info screen_info; 47extern struct screen_info screen_info;