aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/syncpt.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2013-09-24 16:30:32 +0200
committerThierry Reding <treding@nvidia.com>2013-10-31 09:20:11 +0100
commit35d747a81d7eb824bd0c3476cd0c564b52ad5353 (patch)
tree75bf333cba5d9dfbce532bb0c1391ca9bbeb7b43 /drivers/gpu/host1x/syncpt.c
parentdrm/tegra: Introduce tegra_drm_client structure (diff)
downloadlinux-dev-35d747a81d7eb824bd0c3476cd0c564b52ad5353.tar.xz
linux-dev-35d747a81d7eb824bd0c3476cd0c564b52ad5353.zip
gpu: host1x: Expose syncpt and channel functionality
Expose the buffer objects, syncpoint and channel functionality in the public public header so that drivers can use them. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/syncpt.c')
-rw-r--r--drivers/gpu/host1x/syncpt.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
index 409745b949db..03cf2922e469 100644
--- a/drivers/gpu/host1x/syncpt.c
+++ b/drivers/gpu/host1x/syncpt.c
@@ -354,6 +354,25 @@ void host1x_syncpt_deinit(struct host1x *host)
kfree(sp->name);
}
+/*
+ * Read max. It indicates how many operations there are in queue, either in
+ * channel or in a software thread.
+ * */
+u32 host1x_syncpt_read_max(struct host1x_syncpt *sp)
+{
+ smp_rmb();
+ return (u32)atomic_read(&sp->max_val);
+}
+
+/*
+ * Read min, which is a shadow of the current sync point value in hardware.
+ */
+u32 host1x_syncpt_read_min(struct host1x_syncpt *sp)
+{
+ smp_rmb();
+ return (u32)atomic_read(&sp->min_val);
+}
+
int host1x_syncpt_nb_pts(struct host1x *host)
{
return host->info->nb_pts;