Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114843
b: refs/heads/master
c: 0716a8e
h: refs/heads/master
i:
  114841: 20a8d7c
  114839: d61f757
v: v3
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Oct 16, 2008
1 parent b066033 commit 21452f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4edad7f07048b681b0c633e471ad2532d592e876
refs/heads/master: 0716a8eab3c8d21b4e36839fa0ee26abbf8e01ef
15 changes: 3 additions & 12 deletions trunk/drivers/video/neofb.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ static void vgaHWProtect(int on)
{
unsigned char tmp;

tmp = vga_rseq(NULL, 0x01);
if (on) {
/*
* Turn off screen and disable sequencer.
*/
tmp = vga_rseq(NULL, 0x01);
vga_wseq(NULL, 0x00, 0x01); /* Synchronous Reset */
vga_wseq(NULL, 0x01, tmp | 0x20); /* disable the display */

Expand All @@ -439,7 +439,6 @@ static void vgaHWProtect(int on)
/*
* Reenable sequencer, then turn on screen.
*/
tmp = vga_rseq(NULL, 0x01);
vga_wseq(NULL, 0x01, tmp & ~0x20); /* reenable display */
vga_wseq(NULL, 0x00, 0x03); /* clear synchronousreset */

Expand Down Expand Up @@ -648,10 +647,10 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->blue.msb_right = 0;
var->transp.msb_right = 0;

var->transp.offset = 0;
var->transp.length = 0;
switch (var->bits_per_pixel) {
case 8: /* PSEUDOCOLOUR, 256 */
var->transp.offset = 0;
var->transp.length = 0;
var->red.offset = 0;
var->red.length = 8;
var->green.offset = 0;
Expand All @@ -661,8 +660,6 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
break;

case 16: /* DIRECTCOLOUR, 64k */
var->transp.offset = 0;
var->transp.length = 0;
var->red.offset = 11;
var->red.length = 5;
var->green.offset = 5;
Expand All @@ -672,8 +669,6 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
break;

case 24: /* TRUECOLOUR, 16m */
var->transp.offset = 0;
var->transp.length = 0;
var->red.offset = 16;
var->red.length = 8;
var->green.offset = 8;
Expand Down Expand Up @@ -704,8 +699,6 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (vramlen > 4 * 1024 * 1024)
vramlen = 4 * 1024 * 1024;

if (var->yres_virtual < var->yres)
var->yres_virtual = var->yres;
if (var->xres_virtual < var->xres)
var->xres_virtual = var->xres;

Expand All @@ -722,8 +715,6 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if it was possible. We should return -EINVAL, but I disagree */
if (var->yres_virtual < var->yres)
var->yres = var->yres_virtual;
if (var->xres_virtual < var->xres)
var->xres = var->xres_virtual;
if (var->xoffset + var->xres > var->xres_virtual)
var->xoffset = var->xres_virtual - var->xres;
if (var->yoffset + var->yres > var->yres_virtual)
Expand Down

0 comments on commit 21452f0

Please sign in to comment.