From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 1270 invoked from network); 22 Jun 1999 10:09:06 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 22 Jun 1999 10:09:06 -0000 Received: from mailhost.xandmail.com (firewall-user@mailhost.xandmail.com [195.25.228.65]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id FAA16794 for ; Tue, 22 Jun 1999 05:14:42 -0400 Received: by mailhost.xandmail.com; id LAA16469; Tue, 22 Jun 1999 11:34:09 +0200 (MET DST) Received: from unknown(1.0.0.204) by mailhost.xandmail.com via smap (3.0) id xma016451; Tue, 22 Jun 99 11:33:56 +0200 From: "Vignaud Jean-Baptiste" To: "axp-list" , "FrameBuffer" Cc: "Linux kernel" , "Bibek Sahu" , "Adam C. Powell IV" Subject: bug in fbmem.c, Date: Tue, 22 Jun 1999 10:57:12 +0200 Message-ID: <000d01bebc8d$37b25fc0$cc000001@PC_VIGNAUD.xandmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Importance: Normal Hi, I'v traced a little bug in the fbmem code. i don't know if it's the right way to correct it, but on my SX164 alpha this seems to work. before the patch: cat /dev/fb0 > foo end with an execption. after the patch: cat /dev/fb0 > foo ; cat foo > /dev/fb0 work. There are others problems with the fbdriver on alpha: mmapping the /dev/fb0 and writing to it give me a *RANDOM* 'PYXIS machine check NOT expected' with no effect on the screen. Maybe someone have an idea? Jean-Baptiste Vignaud. --- fbmem.c Wed Mar 17 18:17:22 1999 +++ fbmem.c.new Tue Jun 22 11:04:03 1999 @@ -30,7 +30,7 @@ #if defined(__mc68000__) || defined(CONFIG_APUS) #include #endif -#ifdef __powerpc__ +#if defined(__powerpc__) || defined(__alpha__) #include #endif #include @@ -251,8 +251,7 @@ fb->fb_get_fix(&fix,PROC_CONSOLE(), info); base_addr=info->disp->screen_base; copy_size=(count + p <= fix.smem_len ? count : fix.smem_len - p); - if (copy_to_user(buf, base_addr+p, copy_size)) - return -EFAULT; + memcpy_fromio(buf, base_addr+p, copy_size); *ppos += copy_size; return copy_size; } @@ -275,8 +274,7 @@ fb->fb_get_fix(&fix, PROC_CONSOLE(), info); base_addr=info->disp->screen_base; copy_size=(count + p <= fix.smem_len ? count : fix.smem_len - p); - if (copy_from_user(base_addr+p, buf, copy_size)) - return -EFAULT; + memcpy_toio(base_addr+p, buf, copy_size); file->f_pos += copy_size; return copy_size; }