From: Ben Tucker <btucker@mpcdata.com>
To: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: RE: RFBI worked example
Date: Fri, 7 Jan 2011 17:25:19 -0000 [thread overview]
Message-ID: <78677181845a6577fe0955a1984ac16a@mail.gmail.com> (raw)
In-Reply-To: <1294413238.3968.110.camel@nubuntu>
> -----Original Message-----
> From: Tomi Valkeinen [mailto:tomi.valkeinen@nokia.com]
> Sent: 07 January 2011 15:14
> To: ext Ben Tucker
> Cc: linux-omap@vger.kernel.org
> Subject: RE: RFBI worked example
>
> 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?
The panel in this case is under development so (it's actually an FPGA) so we
have some way to go before we have an image.
>
> 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:
It appears to be working. As a test I tried using internal triggering with
my panel code (below). Pixel data appears to flow out of the port (the
RFBI_PIXEL_CNT register is decrementing).
>
> 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.
OK, that helps my understanding.
>
> 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.
The primary reason for using RFBI in this design is to allow the RFB to
control the H/VSync's and thus the delivery of pixel data. This is not the
traditional RFBI design.
I am concerned that a thread or workqueue may introduce an unacceptable
delay between FRAMEDONE and re-arming the DSS/RFBI for the next frame. I
guess it depends on the rate that the panel requests frames.
>
> 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.
OK, thankyou. I will check.
>
> Also, remember that you may need to stop updates somehow when the panel
> is blanked or the driver is unloaded.
>
I *think* this is OK because the FRAMEDONE interrupt is deregistered in
omapdss_rfbi_display_disable().
> >
> > 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.
Thanks. I will add this call.
>
> Tomi
>
Ben
next prev parent reply other threads:[~2011-01-07 17:24 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
2011-01-07 17:25 ` Ben Tucker [this message]
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=78677181845a6577fe0955a1984ac16a@mail.gmail.com \
--to=btucker@mpcdata.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@nokia.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