[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-fbdev] Re: bug in fbmem.c,



>>>>> "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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []