linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: James Simmons <jsimmons@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH 17/41] fbdev: Add drawing functions	forframebuffers in system RAM
Date: Thu, 03 May 2007 05:08:12 +0800	[thread overview]
Message-ID: <1178140092.4606.40.camel@daplas> (raw)
In-Reply-To: <Pine.LNX.4.64.0705022154230.12422@pentafluge.infradead.org>

On Wed, 2007-05-02 at 21:55 +0100, James Simmons wrote:
> > > > 	Hi Tony,
> > > > 
> > > > > The generic drawing functions (cfbimgblt, cfbcopyarea, 
> > > > > cfbfillrect) assume
> > > > > that the framebuffer is in IO memory.  However, we have 3 
> > > > > drivers (hecubafb,
> > > > > arcfb, and vfb) where the framebuffer is allocated from 
> > > > > system RAM (via
> > > > > vmalloc). Using _raw_read/write and family for these drivers 
> > > > > (as used in
> > > > > the cfb* functions) is illegal, especially in other platforms.
> > > > 
> > > > This is also true for ps3fb. I'll update the support for that once this
> > > > patch has hit mainline.
> > > 
> > > Bloat.
> > 
> > Only the source gets larger.  Only drivers that need it will compile it.
> > 
> > >  It would be much easier to replace the FB_WRITEL and FB_READL 
> > > macros.
> > 
> > Of course it's not as simple as replacing FB_WRITEL and FB_READL. Think
> > very carefully. 
> > 
> > Hint1: #define FB_MAX 32
> > Hint2: sparse
> 
> Yeap. fbwrite/fbread are not flexable enough. The is way I put hooks into
> struct fb_pixmap for writing/reading the framebuffer.

I did try that too, but the drawing functions are part of the innermost
loop, in an extremely hot path.  Replacing those macros with function
pointers will drop the performance considerably.  Remember the
memcpy/for-loop replacement?  The speed degradation was significant and
it's not even in the hottest path.

Secondly, how would you reconcile sparse annotations?

Tony



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

      reply	other threads:[~2007-05-02 21:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25  6:40 [PATCH 17/41] fbdev: Add drawing functions for framebuffers in system RAM Antonino A. Daplas
     [not found] ` <CA6404BA52C51146981195CF9A147C1C01A9A04D@GBISE0BASMSX01.eu.sony.com>
2007-05-02 20:22   ` [PATCH 17/41] fbdev: Add drawing functions forframebuffers " James Simmons
2007-05-02 20:31     ` Geert Uytterhoeven
2007-05-02 20:32     ` Antonino A. Daplas
2007-05-02 20:55       ` James Simmons
2007-05-02 21:08         ` Antonino A. Daplas [this message]

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=1178140092.4606.40.camel@daplas \
    --to=adaplas@gmail.com \
    --cc=akpm@osdl.org \
    --cc=geert@linux-m68k.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).