Commit 786c2d96 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k update (part 5)

Fix Apollo frame buffer device breakage after the recent fbdev changes
parent 5fbcee12
...@@ -115,7 +115,7 @@ static struct display disp; ...@@ -115,7 +115,7 @@ static struct display disp;
/* frame buffer operations */ /* frame buffer operations */
static int dn_fb_blank(int blank, struct fb_info *info); static int dnfb_blank(int blank, struct fb_info *info);
static void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area); static void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
static struct fb_ops dn_fb_ops = { static struct fb_ops dn_fb_ops = {
...@@ -165,7 +165,6 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area) ...@@ -165,7 +165,6 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
{ {
int incr, y_delta, pre_read = 0, x_end, x_word_count; int incr, y_delta, pre_read = 0, x_end, x_word_count;
int x_count, y_count;
ushort *src, dummy; ushort *src, dummy;
uint start_mask, end_mask, dest; uint start_mask, end_mask, dest;
short i, j; short i, j;
...@@ -173,13 +172,13 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area) ...@@ -173,13 +172,13 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
incr = (area->dy <= area->sy) ? 1 : -1; incr = (area->dy <= area->sy) ? 1 : -1;
src = src =
(ushort *) (info->screen_base + area->sy * info->fix.next_line + (ushort *) (info->screen_base + area->sy * info->fix.line_length +
(area->sx >> 4)); (area->sx >> 4));
dest = area->dy * (info->fix.next_line >> 1) + (area->dx >> 4); dest = area->dy * (info->fix.line_length >> 1) + (area->dx >> 4);
if (incr > 0) { if (incr > 0) {
y_delta = (info->fix.next_line * 8) - area->sx - x_count; y_delta = (info->fix.line_length * 8) - area->sx - area->width;
x_end = area->dx + x_count - 1; x_end = area->dx + area->width - 1;
x_word_count = (x_end >> 4) - (area->dx >> 4) + 1; x_word_count = (x_end >> 4) - (area->dx >> 4) + 1;
start_mask = 0xffff0000 >> (area->dx & 0xf); start_mask = 0xffff0000 >> (area->dx & 0xf);
end_mask = 0x7ffff >> (x_end & 0xf); end_mask = 0x7ffff >> (x_end & 0xf);
...@@ -188,8 +187,8 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area) ...@@ -188,8 +187,8 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
if ((area->dx & 0xf) < (area->sx & 0xf)) if ((area->dx & 0xf) < (area->sx & 0xf))
pre_read = 1; pre_read = 1;
} else { } else {
y_delta = -((info->fix.next_line * 8) - area->sx - x_count); y_delta = -((info->fix.line_length * 8) - area->sx - area->width);
x_end = area->dx - x_count + 1; x_end = area->dx - area->width + 1;
x_word_count = (area->dx >> 4) - (x_end >> 4) + 1; x_word_count = (area->dx >> 4) - (x_end >> 4) + 1;
start_mask = 0x7ffff >> (area->dx & 0xf); start_mask = 0x7ffff >> (area->dx & 0xf);
end_mask = 0xffff0000 >> (x_end & 0xf); end_mask = 0xffff0000 >> (x_end & 0xf);
...@@ -199,7 +198,7 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area) ...@@ -199,7 +198,7 @@ void dnfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
pre_read = 1; pre_read = 1;
} }
for (i = 0; i < y_count; i++) { for (i = 0; i < area->height; i++) {
outb(0xc | (dest >> 16), AP_CONTROL_3A); outb(0xc | (dest >> 16), AP_CONTROL_3A);
...@@ -242,7 +241,7 @@ unsigned long __init dnfb_init(unsigned long mem_start) ...@@ -242,7 +241,7 @@ unsigned long __init dnfb_init(unsigned long mem_start)
{ {
int err; int err;
strcpy(&fb_info.modename, dnfb_fix); strcpy(fb_info.modename, dnfb_fix.id);
fb_info.changevar = NULL; fb_info.changevar = NULL;
fb_info.fontname[0] = 0; fb_info.fontname[0] = 0;
fb_info.disp = &disp; fb_info.disp = &disp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment