Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@cern.ch>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Vignaud Jean-Baptiste <jbv@club-internet.fr>,
	axp-list <axp-list@redhat.com>,
	FrameBuffer <linux-fbdev@vuser.vu.union.edu>,
	Linux kernel <linux-kernel@vger.rutgers.edu>,
	Bibek Sahu <scorpio@dodds.net>,
	"Adam C. Powell IV" <adam.powell@nist.gov>
Subject: Re: [linux-fbdev] Re: bug in fbmem.c,
Date: 08 Jul 1999 19:46:34 +0200	[thread overview]
Message-ID: <d3673vm3ut.fsf@dxplus05.cern.ch> (raw)
In-Reply-To: Jeff Garzik's message of "Tue, 22 Jun 1999 08:16:16 -0400"

>>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> 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


WARNING: multiple messages have this Message-ID (diff)
From: Jes Sorensen <Jes.Sorensen@cern.ch>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Vignaud Jean-Baptiste <jbv@club-internet.fr>,
	axp-list <axp-list@redhat.com>,
	FrameBuffer <linux-fbdev@vuser.vu.union.edu>,
	Linux kernel <linux-kernel@vger.rutgers.edu>,
	Bibek Sahu <scorpio@dodds.net>,
	"Adam C. Powell IV" <adam.powell@nist.gov>
Subject: Re: [linux-fbdev] Re: bug in fbmem.c,
Date: 08 Jul 1999 19:46:34 +0200	[thread overview]
Message-ID: <d3673vm3ut.fsf@dxplus05.cern.ch> (raw)
Message-ID: <19990708174634.6YMckeJQWCApe10_FJHwPzuzsYl1lVLI0xZDl-tawg0@z> (raw)
In-Reply-To: Jeff Garzik's message of "Tue, 22 Jun 1999 08:16:16 -0400"


>>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> 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/


  parent reply	other threads:[~1999-07-08 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-22  8:57 bug in fbmem.c, Vignaud Jean-Baptiste
     [not found] ` <3770E2AF.4BC00019@pobox.com>
1999-06-28 19:55   ` Richard Henderson
     [not found] ` <376F7E90.B2646D23@pobox.com>
1999-07-08 17:46   ` Jes Sorensen [this message]
1999-07-08 17:46     ` [linux-fbdev] " Jes Sorensen
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