linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: fb_write change in your tree
Date: Tue, 23 Mar 2004 14:57:04 +1100	[thread overview]
Message-ID: <1080014223.22188.87.camel@gaston> (raw)

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

             reply	other threads:[~2004-03-23  4:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23  3:57 Benjamin Herrenschmidt [this message]
2004-03-23 18:21 ` fb_write change in your tree 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1080014223.22188.87.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).