From: Jaya Kumar <jayakumar.lkml@gmail.com>
To: Magnus Damm <magnus.damm@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 06:08:11 -0500 [thread overview]
Message-ID: <45a44e480901150308l63b4ea97rd2fbfe4fa9e2cbb4@mail.gmail.com> (raw)
In-Reply-To: <aec7e5c30901150229g3e262adeje1776fc22cac1d64@mail.gmail.com>
On Thu, Jan 15, 2009 at 5:29 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> Hi Jaya,
>
> I agree with Tomi about the memory allocation.
Yes, I agree with that too. :-) I proposed pushing that decision into
the driver so that it could decide for itself whether it wants to
allocate a buffer or retain a fixed structure.
>
> 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
Agreed that it is not a one-approach fits all scenario.
> needed then we will take a performance hit, but things should work as
> expected apart from that right?
I'm not sure I understood this. Why do you say "If a large area is
updated, then we will take a performance hit."? I think that statement
depends on the device, right? I agree that if a lot of pixels are
updated, then there is a lot of data to transfer, but beyond that it
is very much dependent on the device, whether it uses DMA, what kind
of update latency it has, what kind of partial update capability it
has, all of which affect how much of a performance hit is taken and
what the optimal case would be.
>
> 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?
Okay, I just realized that I neglected to mention the XDamage
extension which had a big influence on me. I think the following page:
http://www.freedesktop.org/wiki/Software/XDamage
and:
http://www.opensource.apple.com/darwinsource/Current/X11proto-15.1/damageproto/damageproto-1.1.0/damageproto.txt
explain a lot of thinking that has gone into solving similar issues.
I think the fact that Xfbdev and Xorg utilize that rectangle and
rectangle count based infrastructure would push us towards retaining
the same concepts. In my mind, Xfbdev/Xorg would be the prime
candidate for this API.
Thanks,
jaya
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
next prev parent reply other threads:[~2009-01-15 11:08 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
2009-01-15 11:08 ` Jaya Kumar [this message]
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=45a44e480901150308l63b4ea97rd2fbfe4fa9e2cbb4@mail.gmail.com \
--to=jayakumar.lkml@gmail.com \
--cc=adaplas@gmail.com \
--cc=armbru@redhat.com \
--cc=geert@linux-m68k.org \
--cc=lethal@linux-sh.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=magnus.damm@gmail.com \
/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).