From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 18397 invoked from network); 8 Jul 1999 17:51:08 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 8 Jul 1999 17:51:08 -0000 Received: from smtp1.cern.ch (smtp1.cern.ch [137.138.128.38]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id NAA01980 for ; Thu, 8 Jul 1999 13:47:09 -0400 Received: from dxplus05.cern.ch (dxplus05.cern.ch [137.138.127.250]) by smtp1.cern.ch (8.9.3/8.9.3) with ESMTP id TAA24975; Thu, 8 Jul 1999 19:46:35 +0200 (MET DST) Received: (from jes@localhost) by dxplus05.cern.ch (8.9.3/8.9.3) id TAA14165; Thu, 8 Jul 1999 19:46:34 +0200 (MET DST) Sender: Jes.Sorensen@cern.ch To: Jeff Garzik Cc: Vignaud Jean-Baptiste , axp-list , FrameBuffer , Linux kernel , Bibek Sahu , "Adam C. Powell IV" Subject: Re: [linux-fbdev] Re: bug in fbmem.c, References: <000d01bebc8d$37b25fc0$cc000001@PC_VIGNAUD.xandmail.com> <376F7E90.B2646D23@pobox.com> From: Jes Sorensen Date: 08 Jul 1999 19:46:34 +0200 In-Reply-To: Jeff Garzik's message of "Tue, 22 Jun 1999 08:16:16 -0400" Message-ID: X-Mailer: Gnus v5.6.45/Emacs 20.2 >>>>> "Jeff" == Jeff Garzik writes: Jeff> Vignaud Jean-Baptiste wrote: >> 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. Jeff> Good catch! I guess I shouldn't only use the sight of a penguin Jeff> and running XF86_FBDev as tests. ;-) Jeff> You cannot eliminate the copy_to_user() and copy_from_user() Jeff> calls. I don't recall what type of addresses copy_xxx_user() Jeff> wants, but I suspect you either need a copy buffer Jeff> memcpy_fromio (bufruf, base_addr+p, copy_size); if Jeff> (copy_to_user(buf, bufruf, copy_size)) ... Jeff> or maybe you can get away with some variant of Jeff> if (copy_to_user(buf, __phys_to_virt (base_addr+p), copy_size) Jeff> ... You generally cannot apply phys_to_virt to frame buffer memory addresses, you are not guaranteed a 1->1 mapping of it. Jes From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31825 invoked from network); 23 Jul 1999 12:28:42 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 23 Jul 1999 12:28:42 -0000 Received: from claire.a2000.nl (claire.a2000.nl [62.108.1.21]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id IAA28949 for ; Fri, 23 Jul 1999 08:28:41 -0400 Received: from hardy-1-p ([192.168.17.113] helo=hardy-1.a2000.nl) by claire.a2000.nl with esmtp (Exim 2.02 #4) id 117eRM-0003xA-00 for axp-list@redhat.com; Fri, 23 Jul 1999 14:28:40 +0200 Received: from hardy-1.a2000.nl ([127.0.0.1]) by hardy-1.a2000.nl (Netscape Messaging Server 3.6) with SMTP id AAA6871; Fri, 23 Jul 1999 14:27:44 +0200 Received: from smtp2.a2000.nl ([192.168.18.20]) by hardy-1.a2000.nl (Netscape Messaging Server 3.6) with ESMTP id AAA22A9 for ; Thu, 8 Jul 1999 22:23:09 +0200 Received: from nic.funet.fi ([128.214.248.6]) by smtp2.a2000.nl with esmtp (Exim 2.02 #4) id 112IKu-0002pk-00 for G.R.van.Wingerde@cable.a2000.nl; Thu, 8 Jul 1999 19:51:59 +0200 Received: from vger.rutgers.edu ([128.6.190.2]:54059 "EHLO vger.rutgers.edu") by nic.funet.fi with ESMTP id ; Thu, 8 Jul 1999 20:51:45 +0300 Received: by vger.rutgers.edu via listexpand id ; Thu, 8 Jul 1999 13:49:06 -0400 Received: by vger.rutgers.edu id ; Thu, 8 Jul 1999 13:48:53 -0400 Received: from smtp1.cern.ch ([137.138.128.38]:1713 "EHLO smtp1.cern.ch") by vger.rutgers.edu with ESMTP id ; Thu, 8 Jul 1999 13:47:48 -0400 Received: from dxplus05.cern.ch (dxplus05.cern.ch [137.138.127.250]) by smtp1.cern.ch (8.9.3/8.9.3) with ESMTP id TAA24975; Thu, 8 Jul 1999 19:46:35 +0200 (MET DST) Received: (from jes@localhost) by dxplus05.cern.ch (8.9.3/8.9.3) id TAA14165; Thu, 8 Jul 1999 19:46:34 +0200 (MET DST) To: Jeff Garzik Cc: Vignaud Jean-Baptiste , axp-list , FrameBuffer , Linux kernel , Bibek Sahu , "Adam C. Powell IV" Subject: Re: [linux-fbdev] Re: bug in fbmem.c, References: <000d01bebc8d$37b25fc0$cc000001@PC_VIGNAUD.xandmail.com> <376F7E90.B2646D23@pobox.com> From: Jes Sorensen Date: 08 Jul 1999 19:46:34 +0200 In-Reply-To: Jeff Garzik's message of "Tue, 22 Jun 1999 08:16:16 -0400" Message-ID: X-Mailer: Gnus v5.6.45/Emacs 20.2 Sender: owner-linux-kernel@vger.rutgers.edu Precedence: bulk X-Loop: majordomo@vger.rutgers.edu X-Orcpt: rfc822;linux-kernel-outgoing-dig Message-ID: <19990708174634.6YMckeJQWCApe10_FJHwPzuzsYl1lVLI0xZDl-tawg0@z> >>>>> "Jeff" == Jeff Garzik writes: Jeff> Vignaud Jean-Baptiste wrote: >> 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. Jeff> Good catch! I guess I shouldn't only use the sight of a penguin Jeff> and running XF86_FBDev as tests. ;-) Jeff> You cannot eliminate the copy_to_user() and copy_from_user() Jeff> calls. I don't recall what type of addresses copy_xxx_user() Jeff> wants, but I suspect you either need a copy buffer Jeff> memcpy_fromio (bufruf, base_addr+p, copy_size); if Jeff> (copy_to_user(buf, bufruf, copy_size)) ... Jeff> or maybe you can get away with some variant of Jeff> if (copy_to_user(buf, __phys_to_virt (base_addr+p), copy_size) Jeff> ... You generally cannot apply phys_to_virt to frame buffer memory addresses, you are not guaranteed a 1->1 mapping of it. Jes - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/