diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2013-03-22 16:34:03 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2013-04-22 12:32:43 +0200 |
commit | 6579324a41cc414009a601738b70a53d6376325c (patch) | |
tree | 61b3491351217d07ff75851c6d989bf02b213383 /drivers/gpu/host1x/syncpt.c | |
parent | 7ede0b0bf3e2595d40d6195b6fe4c4dcef438830 (diff) | |
download | linux-6579324a41cc414009a601738b70a53d6376325c.tar.gz linux-6579324a41cc414009a601738b70a53d6376325c.tar.xz |
gpu: host1x: Add channel support
Add support for host1x client modules, and host1x channels to submit
work to the clients.
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.c')
-rw-r--r-- | drivers/gpu/host1x/syncpt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c index 07fad1412bab..7e77e63da57b 100644 --- a/drivers/gpu/host1x/syncpt.c +++ b/drivers/gpu/host1x/syncpt.c @@ -300,6 +300,12 @@ bool host1x_syncpt_is_expired(struct host1x_syncpt *sp, u32 thresh) return (s32)(current_val - thresh) >= 0; } +/* remove a wait pointed to by patch_addr */ +int host1x_syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr) +{ + return host1x_hw_syncpt_patch_wait(sp->host, sp, patch_addr); +} + int host1x_syncpt_init(struct host1x *host) { struct host1x_syncpt *syncpt; @@ -319,6 +325,11 @@ int host1x_syncpt_init(struct host1x *host) host1x_syncpt_restore(host); + /* Allocate sync point to use for clearing waits for expired fences */ + host->nop_sp = _host1x_syncpt_alloc(host, NULL, 0); + if (!host->nop_sp) + return -ENOMEM; + return 0; } |