All of lore.kernel.org
 help / color / mirror / Atom feed
* How to use host1x syncpt?
@ 2014-02-04 23:51 Bryan Wu
       [not found] ` <CAK5ve-+ARW3cx+671vNYQCWYPe=CVa5n81q2-BrKyGzF8Nv4fw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Bryan Wu @ 2014-02-04 23:51 UTC (permalink / raw)
  To: linux-tegra, Stephen Warren, Thierry Reding; +Cc: Eric Brower

Hi Stephen and Thierry,

Recently I'm working on upstreaming my V4L2 driver for Tegra video
input module, which is using host1x syncpt to wait for frame
capturing.

So here is my basic steps for handling host1x syncpt,

1. Call host1x_syncpt_request(cam->client.dev, flags); to allocate
syncpts for my driver.

2. Program host1x_syncpt_id(sp) into Tegra VI syncpt event register.
So when VI captures one frame, syncpt will be increased one.

3. Call thresh = host1x_syncpt_incr_max(sp, 1) to incr max_val of the
syncpt, which is the threshold for waiting.

4. Start capture and wait for host1x syncpt event like this
host1x_syncpt_wait(sp, thresh, WAIT_TIMEOUT, &value);

Is that the right sequence?

host1x_syncpt_incr_max() is not exported and without calling it I
always got error message like this:
"tegra-host1x 50000000.host1x: syncpt_load failed: id=1, min=46, max=0, live=46"
So I have to increase the max_val manually like step 3. And
host1x_syncpt_incr() won't increase the max_val which will still
generate this error message.

Actually with the steps I listed, I can capture data from real sensor now.

Thanks,
-Bryan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-13 11:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 23:51 How to use host1x syncpt? Bryan Wu
     [not found] ` <CAK5ve-+ARW3cx+671vNYQCWYPe=CVa5n81q2-BrKyGzF8Nv4fw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-07  2:11   ` Bryan Wu
     [not found]     ` <CAK5ve-+sWLtaCQwPOm99pzPmtJioAKUjba-_6eV5bqf3KxXwFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-11  0:08       ` Bryan Wu
     [not found]         ` <CAK5ve-+A1-V8rrDo4HAHoBgdD+U-Dp6XY_GAzEmxfv49w9qVOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-12 19:39           ` Bryan Wu
2014-02-13 11:36   ` Terje Bergström

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.