Skip to contentSkip to conversation

fbdev: Fix screen corruption in neofb

PATCH New Antonino A. Daplas 1 participant 1 message Nov 21, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 fbdev: Fix screen corruption in neofb

This patch fixes the screen corruption resulting from neofb cleanup.

---

 neofb.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/video/neofb.c +2 -3
diff -Nru a/drivers/video/neofb.c b/drivers/video/neofb.c
@@ -1481,7 +1481,7 @@
 	int s_pitch = (image->width * image->depth + 7) >> 3;
 	int scan_align = info->pixmap.scan_align - 1;
 	int buf_align = info->pixmap.buf_align - 1;
-	int bltCntl_flags, d_pitch, data_len, i;
+	int bltCntl_flags, d_pitch, data_len;
 
 	// The data is padded for the hardware
 	d_pitch = (s_pitch + scan_align) & ~scan_align;
@@ -1533,8 +1533,7 @@
 	writel((image->height << 16) | (image->width & 0xffff),
 	       &par->neo2200->xyExt);
 
-	for (i = 0; i < data_len; i++)
-		writeb(image->data[i], par->mmio_vbase + 0x100000 + i);
+	memcpy_toio(par->mmio_vbase + 0x100000, image->data, data_len);
 }
 
 static void

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/