]> git.karo-electronics.de Git - linux-beck.git/commitdiff
gpu: host1x: Export host1x_syncpt_read()
authorThierry Reding <treding@nvidia.com>
Wed, 28 Jan 2015 13:29:02 +0000 (14:29 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 2 Apr 2015 16:46:20 +0000 (18:46 +0200)
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>
drivers/gpu/host1x/syncpt.c
include/linux/host1x.h

index b10550ee1d8958366b208f3e1927426663e8b91f..6b7fdc1e2ed078c337c8fa235633fcc105c4ccde 100644 (file)
@@ -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;
index 464f33814a94d0ccf82f20b69041188fedb96b59..d2ba7d334039ec2f7660eaabfb94fd4446a65018 100644 (file)
@@ -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,