Skip to content

Commit

Permalink
gpu: host1x: Export host1x_syncpt_read()
Browse files Browse the repository at this point in the history
This function is used to read the current value of the syncpt and is
useful in situations where drivers don't schedule work and wait for the
syncpoint to increment. One particular use-case is using the syncpoint
as a VBLANK counter.

Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
thierryreding committed Apr 2, 2015
1 parent dab1633 commit b4a2014
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/host1x/syncpt.c
Expand Up @@ -425,6 +425,12 @@ u32 host1x_syncpt_read_min(struct host1x_syncpt *sp)
}
EXPORT_SYMBOL(host1x_syncpt_read_min);

u32 host1x_syncpt_read(struct host1x_syncpt *sp)
{
return host1x_syncpt_load(sp);
}
EXPORT_SYMBOL(host1x_syncpt_read);

int host1x_syncpt_nb_pts(struct host1x *host)
{
return host->info->nb_pts;
Expand Down
1 change: 1 addition & 0 deletions include/linux/host1x.h
Expand Up @@ -135,6 +135,7 @@ struct host1x_syncpt *host1x_syncpt_get(struct host1x *host, u32 id);
u32 host1x_syncpt_id(struct host1x_syncpt *sp);
u32 host1x_syncpt_read_min(struct host1x_syncpt *sp);
u32 host1x_syncpt_read_max(struct host1x_syncpt *sp);
u32 host1x_syncpt_read(struct host1x_syncpt *sp);
int host1x_syncpt_incr(struct host1x_syncpt *sp);
u32 host1x_syncpt_incr_max(struct host1x_syncpt *sp, u32 incrs);
int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, long timeout,
Expand Down

0 comments on commit b4a2014

Please sign in to comment.