Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
[parent not found: <19990622130211.05844@atrey.karlin.mff.cuni.cz>]
* bug in fbmem.c,
@ 1999-06-22  8:57 Vignaud Jean-Baptiste
       [not found] ` <3770E2AF.4BC00019@pobox.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Vignaud Jean-Baptiste @ 1999-06-22  8:57 UTC (permalink / raw)
  To: axp-list, FrameBuffer; +Cc: Linux kernel, Bibek Sahu, Adam C. Powell IV

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;
 }



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-07-08  2:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.3.95.990628173155.278A-100000@chaos.analogic.com>
1999-06-28 21:46 ` bug in fbmem.c, Jeff Garzik
1999-06-28 22:49   ` Richard Henderson
     [not found] <19990622130211.05844@atrey.karlin.mff.cuni.cz>
1999-06-22 11:03 ` Vignaud Jean-Baptiste
1999-06-22  8:57 Vignaud Jean-Baptiste
     [not found] ` <3770E2AF.4BC00019@pobox.com>
1999-06-28 19:55   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox