summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/syncpt.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2013-03-22 18:34:02 +0400
committerThierry Reding <thierry.reding@avionic-design.de>2013-04-22 14:32:42 +0400
commit7ede0b0bf3e2595d40d6195b6fe4c4dcef438830 (patch)
treeeb59a94a3892bd41ae810b1726f7e7ae9de96812 /drivers/gpu/host1x/syncpt.h
parent754716874389ccbea5ee03174df8ad9e72e41880 (diff)
downloadlinux-7ede0b0bf3e2595d40d6195b6fe4c4dcef438830.tar.xz
gpu: host1x: Add syncpoint wait and interrupts
Add support for sync point interrupts, and sync point wait. Sync point wait used interrupts for unblocking wait. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/host1x/syncpt.h')
-rw-r--r--drivers/gpu/host1x/syncpt.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/syncpt.h b/drivers/gpu/host1x/syncpt.h
index efa2b6e659d6..17c1616de100 100644
--- a/drivers/gpu/host1x/syncpt.h
+++ b/drivers/gpu/host1x/syncpt.h
@@ -23,6 +23,8 @@
#include <linux/kernel.h>
#include <linux/sched.h>
+#include "intr.h"
+
struct host1x;
struct host1x_syncpt {
@@ -34,6 +36,9 @@ struct host1x_syncpt {
int client_managed;
struct host1x *host;
struct device *dev;
+
+ /* interrupt data */
+ struct host1x_syncpt_intr intr;
};
/* Initialize sync point array */
@@ -113,6 +118,9 @@ void host1x_syncpt_cpu_incr(struct host1x_syncpt *sp);
/* Load current value from hardware to the shadow register. */
u32 host1x_syncpt_load(struct host1x_syncpt *sp);
+/* Check if the given syncpoint value has already passed */
+bool host1x_syncpt_is_expired(struct host1x_syncpt *sp, u32 thresh);
+
/* Save host1x sync point state into shadow registers. */
void host1x_syncpt_save(struct host1x *host);
@@ -128,6 +136,10 @@ void host1x_syncpt_incr(struct host1x_syncpt *sp);
/* Indicate future operations by incrementing the sync point max. */
u32 host1x_syncpt_incr_max(struct host1x_syncpt *sp, u32 incrs);
+/* Wait until sync point reaches a threshold value, or a timeout. */
+int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh,
+ long timeout, u32 *value);
+
/* Check if sync point id is valid. */
static inline int host1x_syncpt_is_valid(struct host1x_syncpt *sp)
{