From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
To: ext Ben Tucker <btucker@mpcdata.com>
Cc: linux-omap@vger.kernel.org
Subject: RE: RFBI worked example
Date: Fri, 07 Jan 2011 17:13:58 +0200 [thread overview]
Message-ID: <1294413238.3968.110.camel@nubuntu> (raw)
In-Reply-To: <fd876042b2837b7dd3eaea2257dcbd6f@mail.gmail.com>
On Fri, 2011-01-07 at 14:18 +0000, ext Ben Tucker wrote:
> With further experimentation it appears that I can call the
> omap_rfbi_update() from the call back, but as the callback is in interrupt
> context this could be dangerous. I would love to see an example of this
> elsewhere.
Did you get it working enough to get an image on the panel?
It's been long since I've touched the rfbi code, and I honestly don't
know the state of it, but basically it should work similarly as DSI
command mode:
The panel driver issues an update when the user space has requested it
via OMAPFB_UPDATE_WINDOW. So it's not meant to be triggered
automatically.
If you really want to update the display automatically (which you
shouldn't, as the point with panels with their own framebuffer is to
update only when necessary), you can do it either directly as you do, or
via workqueue or thread.
I don't know right away if calling omap_rfbi_update() from interrupt
context is dangerous, but it might well be so you should check if
carefully.
Also, remember that you may need to stop updates somehow when the panel
is blanked or the driver is unloaded.
>
> static void framedone_callback(void *data)
> {
> int r;
> u16 dw, dh;
> struct omap_dss_device *dssdev = (struct omap_dss_device *)data;
>
> /* Start the next update, triggered on the external H/VSync signals */
> dssdev->driver->get_resolution(dssdev, &dw, &dh);
> r = omap_rfbi_update(dssdev, 0, 0, dw, dh, framedone_callback,
> dssdev);
> if (r < 0)
> printk("omap_rfbi_update FAILED");
> }
>
> static int generic_panel_power_on(struct omap_dss_device *dssdev)
> {
> int r;
> u16 dw, dh;
>
> r = omapdss_rfbi_display_enable(dssdev);
> if (r < 0)
> goto err0;
>
> /* Setup external HSYNC/VSYNC triggering */
> r = omap_rfbi_setup_te(OMAP_DSS_RFBI_TE_MODE_2,
> 4000000, /* HSYNS pulse 4uS */
> 1000000000, /* VSYNC pulse 1ms */
> 0, 0, /* H/VSYNC not inverted */
> 0);
> if (r < 0)
> goto err1;
>
> /* Enable external triggering */
> r = omap_rfbi_enable_te(1, 0);
> if (r < 0)
> goto err1;
>
> #if 0
> /* At a guess I do not think we need to do the prepare_update
> * if we are updating the whole area
> */
I'm not sure if it's ok not to call it every time, but you should at
least call it once to be sure everything is configured properly.
Tomi
next prev parent reply other threads:[~2011-01-07 15:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 14:18 RFBI worked example Ben Tucker
2011-01-07 15:13 ` Tomi Valkeinen [this message]
2011-01-07 17:25 ` Ben Tucker
2011-01-11 17:41 ` OMAP DSS Enable clocks in dss_setup_partial_planes Ben Tucker
2011-01-12 9:14 ` Tomi Valkeinen
2011-01-12 11:20 ` Ben Tucker
2011-01-12 13:10 ` Tomi Valkeinen
2011-01-20 9:58 ` Taneja, Archit
-- strict thread matches above, loose matches on Subject: below --
2011-01-06 15:32 RFBI worked example Ben Tucker
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=1294413238.3968.110.camel@nubuntu \
--to=tomi.valkeinen@nokia.com \
--cc=btucker@mpcdata.com \
--cc=linux-omap@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