aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/vesafb.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-01-27 17:18:29 -0500
committerLen Brown <len.brown@intel.com>2006-01-27 17:18:29 -0500
commit292dd876ee765c478b27c93cc51e93a558ed58bf (patch)
tree5b740e93253295baee2a9c414a6c66d03d44a9ef /drivers/video/vesafb.c
parentd4ec6c7cc9a15a7a529719bc3b84f46812f9842e (diff)
parent9fdb62af92c741addbea15545f214a6e89460865 (diff)
Pull release into acpica branch
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r--drivers/video/vesafb.c47
1 files changed, 2 insertions, 45 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
index 3e58ddc2bc38..8982e540214c 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
@@ -67,15 +66,6 @@ static int vesafb_pan_display(struct fb_var_screeninfo *var,
67#ifdef __i386__ 66#ifdef __i386__
68 int offset; 67 int offset;
69 68
70 if (!ypan)
71 return -EINVAL;
72 if (var->xoffset)
73 return -EINVAL;
74 if (var->yoffset > var->yres_virtual)
75 return -EINVAL;
76 if ((ypan==1) && var->yoffset+var->yres > var->yres_virtual)
77 return -EINVAL;
78
79 offset = (var->yoffset * info->fix.line_length + var->xoffset) / 4; 69 offset = (var->yoffset * info->fix.line_length + var->xoffset) / 4;
80 70
81 __asm__ __volatile__( 71 __asm__ __volatile__(
@@ -90,37 +80,6 @@ static int vesafb_pan_display(struct fb_var_screeninfo *var,
90 return 0; 80 return 0;
91} 81}
92 82
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, 83static void vesa_setpalette(int regno, unsigned red, unsigned green,
125 unsigned blue) 84 unsigned blue)
126{ 85{
@@ -205,7 +164,6 @@ static struct fb_ops vesafb_ops = {
205 .owner = THIS_MODULE, 164 .owner = THIS_MODULE,
206 .fb_setcolreg = vesafb_setcolreg, 165 .fb_setcolreg = vesafb_setcolreg,
207 .fb_pan_display = vesafb_pan_display, 166 .fb_pan_display = vesafb_pan_display,
208 .fb_blank = vesafb_blank,
209 .fb_fillrect = cfb_fillrect, 167 .fb_fillrect = cfb_fillrect,
210 .fb_copyarea = cfb_copyarea, 168 .fb_copyarea = cfb_copyarea,
211 .fb_imageblit = cfb_imageblit, 169 .fb_imageblit = cfb_imageblit,
@@ -459,9 +417,8 @@ static int __init vesafb_probe(struct platform_device *dev)
459 info->flags = FBINFO_FLAG_DEFAULT | 417 info->flags = FBINFO_FLAG_DEFAULT |
460 (ypan) ? FBINFO_HWACCEL_YPAN : 0; 418 (ypan) ? FBINFO_HWACCEL_YPAN : 0;
461 419
462 vga_compat = (screen_info.capabilities & 2) ? 0 : 1; 420 if (!ypan)
463 printk("vesafb: Mode is %sVGA compatible\n", 421 info->fbops->fb_pan_display = NULL;
464 (vga_compat) ? "" : "not ");
465 422
466 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { 423 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
467 err = -ENOMEM; 424 err = -ENOMEM;