Re: [PATCH] fix for using >16 pixel wide font in fb console
From: Antonino A. Daplas <hidden>
Date: 2004-11-08 10:34:40
On Monday 08 November 2004 18:16, Antonino A. Daplas wrote:
On Monday 08 November 2004 08:17, Jani Jaakkola wrote:
PS: Diff is against 2.6.10-rc1-mm3
And I forgot to attach the patch :-) Tony diff -Nru a/drivers/video/softcursor.c b/drivers/video/softcursor.c
--- a/drivers/video/softcursor.c 2004-10-27 16:28:36 +08:00
+++ b/drivers/video/softcursor.c 2004-11-08 18:10:58 +08:00@@ -28,16 +28,17 @@ if (info->state != FBINFO_STATE_RUNNING) return 0; - src = kmalloc(64 + sizeof(struct fb_image), GFP_ATOMIC); + s_pitch = (cursor->image.width + 7) >> 3; + dsize = s_pitch * cursor->image.height; + src = kmalloc(dsize + sizeof(struct fb_image), GFP_ATOMIC); if (!src) return -ENOMEM; - image = (struct fb_image *) (src + 64); + image = (struct fb_image *) (src + dsize); *image = cursor->image; - s_pitch = (image->width + 7) >> 3; - dsize = s_pitch * image->height; d_pitch = (s_pitch + scan_align) & ~scan_align; + size = d_pitch * image->height + buf_align; size &= ~buf_align; dst = fb_get_buffer_offset(info, &info->pixmap, size); -------------------------------------------------------
This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click