linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Magnus Damm" <magnus.damm@gmail.com>
To: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: linux-fbdev-devel@lists.sourceforge.net, adaplas@gmail.com,
	armbru@redhat.com, lethal@linux-sh.org,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [RFC 2.6.28 1/2] fbdev: add ability to set damage
Date: Thu, 15 Jan 2009 19:29:10 +0900	[thread overview]
Message-ID: <aec7e5c30901150229g3e262adeje1776fc22cac1d64@mail.gmail.com> (raw)
In-Reply-To: <45a44e480901150153ta1fbe5fk5480dc5630cf1d6b@mail.gmail.com>

Hi Jaya,

I agree with Tomi about the memory allocation.

On Thu, Jan 15, 2009 at 6:53 PM, Jaya Kumar <jayakumar.lkml@gmail.com> wrote:
> Acknowledging that kzalloc is definitely not appropriate for all
> drivers, I propose the following changes to the implementation.
>
> a) allow userspace to determine optimal number of rectangles
> FBIO_GETDAMAGE
> which would allow the driver to report back (in the same fb_damage
> structure) the optimal number of rectangles that it can support.
>
> b) allow drivers to handle memory allocation as desired themselves
> Instead of doing the copy_from_user and kzalloc in the higher level
> fb_set_damage, we pass that user pointer directly to the driver. Thus,
> it would be:
> int (*fb_set_damage)(struct fb_info *info, struct fb_damage_user *damage);
>
> and the driver can handle according to its needs.

I wonder how fine grained control that is needed. It's not an exact
science, right? If a slightly larger area is updated than what is
needed then we will take a performance hit, but things should work as
expected apart from that right?

I'm a big fan of simple things like bitmaps. I wonder if it's a good
idea to divide the entire frame buffer into equally sized X*Y tiles
and have a bitmap of dirty bits. A "1" in the bitmap means tile is
dirty and needs update and a "0" means no need to update. The best
tile size is application specific. The size of the bitmap varies of
course with the tile size.

For a 1024x768 display using 32x32 tiles we need 24 32-bit words.
That's pretty small and simple, no?

Cheers,

/ magnus

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword

  reply	other threads:[~2009-01-15 10:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15  0:06 [RFC 2.6.28 1/2] fbdev: add ability to set damage Jaya Kumar
2009-01-15  0:06 ` [RFC 2.6.28 2/2] broadsheetfb: add damage handling Jaya Kumar
2009-01-15  9:25 ` [RFC 2.6.28 1/2] fbdev: add ability to set damage Tomi Valkeinen
2009-01-15  9:53   ` Jaya Kumar
2009-01-15 10:29     ` Magnus Damm [this message]
2009-01-15 11:08       ` Jaya Kumar
2009-01-16  3:09         ` Magnus Damm
2009-01-16  9:24           ` Jaya Kumar
2009-01-16 11:08             ` Magnus Damm
2009-01-16 22:14               ` Jaya Kumar
2009-01-19  4:44                 ` Magnus Damm
2009-01-19 15:15                   ` Jaya Kumar
2009-01-20  4:17                     ` Magnus Damm
2009-01-20  4:21                       ` Mikhail Gusarov
2009-01-20  4:34                         ` Magnus Damm
2009-01-20 10:22                           ` Michal Suchanek
2009-01-22 21:51                           ` Jaya Kumar
2009-01-19 12:59                 ` Tomi Valkeinen

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=aec7e5c30901150229g3e262adeje1776fc22cac1d64@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=adaplas@gmail.com \
    --cc=armbru@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=jayakumar.lkml@gmail.com \
    --cc=lethal@linux-sh.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).