Re: How to use host1x syncpt?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05.02.2014 01:51, Bryan Wu wrote:
> 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?

You should get the correct syncpt fence value by calling
host1x_syncpt_incr_max(). It seems we've just forgotten to export it,
but you can add a trivial patch to export that function.

If you don't do this, host1x will treat your sync point value as "out of
valid range", consider it an outdated one, and treat any waits as NOP.

Terje
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux