diff options
author | Thierry Reding <treding@nvidia.com> | 2013-09-24 16:30:32 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2013-10-31 09:20:11 +0100 |
commit | 35d747a81d7eb824bd0c3476cd0c564b52ad5353 (patch) | |
tree | 75bf333cba5d9dfbce532bb0c1391ca9bbeb7b43 /drivers/gpu/host1x/syncpt.c | |
parent | 53fa7f7204c97dc0c86b99ff8365ad6a7b2ebd78 (diff) | |
download | lwn-35d747a81d7eb824bd0c3476cd0c564b52ad5353.tar.gz lwn-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.c | 19 |
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; |