From: "Vignaud Jean-Baptiste" <jbv@club-internet.fr>
To: "axp-list" <axp-list@redhat.com>,
"FrameBuffer" <linux-fbdev@vuser.vu.union.edu>
Cc: "Linux kernel" <linux-kernel@vger.rutgers.edu>,
"Bibek Sahu" <scorpio@dodds.net>,
"Adam C. Powell IV" <adam.powell@nist.gov>
Subject: bug in fbmem.c,
Date: Tue, 22 Jun 1999 10:57:12 +0200 [thread overview]
Message-ID: <000d01bebc8d$37b25fc0$cc000001@PC_VIGNAUD.xandmail.com> (raw)
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 <asm/setup.h>
#endif
-#ifdef __powerpc__
+#if defined(__powerpc__) || defined(__alpha__)
#include <asm/io.h>
#endif
#include <asm/uaccess.h>
@@ -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;
}
next reply other threads:[~1999-06-22 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-22 8:57 Vignaud Jean-Baptiste [this message]
[not found] ` <3770E2AF.4BC00019@pobox.com>
1999-06-28 19:55 ` bug in fbmem.c, Richard Henderson
[not found] ` <376F7E90.B2646D23@pobox.com>
1999-07-08 17:46 ` [linux-fbdev] " Jes Sorensen
1999-07-08 17:46 ` Jes Sorensen
[not found] <19990622130211.05844@atrey.karlin.mff.cuni.cz>
1999-06-22 11:03 ` Vignaud Jean-Baptiste
[not found] <Pine.LNX.3.95.990628173155.278A-100000@chaos.analogic.com>
1999-06-28 21:46 ` Jeff Garzik
1999-06-28 22:49 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox