Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: "Bruno Prémont" <bonbons@linux-vserver.org>
To: linux-fbdev@vger.kernel.org
Subject: Re: Mirror "module" for framebuffer
Date: Wed, 01 Jun 2011 20:02:59 +0000	[thread overview]
Message-ID: <20110601220259.7e838306@neptune.home> (raw)
In-Reply-To: <4DE67493.6090708@daccii.it>

Hi,

[re-adding linux-fbdev, please make sure to reply-to-all]

On Wed, 01 June 2011 Daniele Salvatore Albano <info@daccii.it> wrote:
>  From what i understand, technically i should hook registered 
> framebuffer and change the callback (info->fbdefio->deferred_io), 
> restoring it on module unloading to avoid the caos.
>
> In this way i could "catch" updates passed to the pagelist argument of 
> the deferred io callback, add them to an own list, and call the original 
> callback to let the driver to do the own work.

Note that some framebuffer drivers might implement (lots) of private
ioctls to implement (accelerated) drawing primitives.
So unless you know the driver you are hooking onto all bets are open.

> This is in the kernel from 2.6.20, so it should be on phone kernel.
> 
> I've a couple more questions:
> - i need to access the structure containing the list of registered 
> framebuffer device (struct fb_info *registered_fb[FB_MAX]), i've seen 
> that there is an export symbol on registered_fb so can i access that 
> directly/num_registered_fb?

You can access it (as does fbcon) though that direct access may/will
go away in the future as (since 2.6.39) now that array is protected
by a mutex on fb core side (fbcon being indirectly fine through its
synchronization via notification events, except when loading fbcon
module)
If you do access the list, write an function to do just that
so there is no big rewrite needed to move your driver forward.

> - i need to know when a framebuffer is registered, i've seen that there 
> is fb_register_client ... from what i see it seems that callback are 
> called on every event so from the callback itself i should check for 
> FB_EVENT_FB_REGISTERED, is this right?

If you want to know when framebuffers get (un)registered (or get
reconfigured) this is the way to go.

> - (stupid question) do all fb modules implement deferred input/output?

No, only a few selected ones implement deferred input/output, usually
because the real framebuffer cannot be mapped into memory or the link
to it is just dead slow so changes are pushed down to device at regular
intervals.


I'm wondering if you not better had to create a new framebuffer driver
(based on virtual framebuffer) with fbdefio to push the changes to a
backing framebuffer [the way fbcon draws console] (as well as whatever you
use to stream to the remote system).
This will make you lose any potential hardware acceleration but keep
things simple.
Though you would need ability to move software to your new framebuffer.

Bruno

  parent reply	other threads:[~2011-06-01 20:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 17:19 Mirror "module" for framebuffer Daniele Salvatore Albano
2011-06-01 18:43 ` Bruno Prémont
2011-06-01 20:02 ` Bruno Prémont [this message]
2011-06-01 20:37 ` Daniele Salvatore Albano

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=20110601220259.7e838306@neptune.home \
    --to=bonbons@linux-vserver.org \
    --cc=linux-fbdev@vger.kernel.org \
    /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