linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fb_write change in your tree
@ 2004-03-23  3:57 Benjamin Herrenschmidt
  2004-03-23 18:21 ` James Simmons
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-03-23  3:57 UTC (permalink / raw)
  To: James Simmons; +Cc: Linux Fbdev development list

Hi James !

What is this change to fb_write() in your tree ? It looks very
wrong to me. You are removing the ability for the driver to
hook it's own fb_write function, which can be a problem. You
basically assume copy_from_user() can be used straight with
the framebuffer as a destination. This is broken. On ppc, for
example, copy_from_user() may do dcbz's cache instruction on
the destination. However, the fb is mapped uncacheable, that
will result in a lot of exceptions during the copy, which is
plain wrong (or possibly the copy failing completely).

What about drivers that are taking great care _NOT_ to map
the framebuffer (or at least not all of it) to avoid having
to ioremap hundreds of megabytes in kernel space ?

A driver should be able to never fill scree_base provided
that it has filled all the accel hooks and provides it's
own fb_read/write functions (which can be slow as they might
have to do mapping/unmapping of fb portions on demand, but
then, mmap is the preferred way for userland to access the
framebuffer content when that is possible).


Ben.




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

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

end of thread, other threads:[~2004-03-24  9:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-23  3:57 fb_write change in your tree Benjamin Herrenschmidt
2004-03-23 18:21 ` James Simmons
2004-03-23 20:10   ` Geert Uytterhoeven
2004-03-23 21:40     ` James Simmons
2004-03-24  9:28       ` Geert Uytterhoeven
2004-03-23 23:59   ` Benjamin Herrenschmidt
2004-03-24  0:16     ` James Simmons
2004-03-24  0:07       ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).