From 6579324a41cc414009a601738b70a53d6376325c Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 22 Mar 2013 16:34:03 +0200 Subject: 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 Signed-off-by: Terje Bergstrom Reviewed-by: Thierry Reding Tested-by: Thierry Reding Tested-by: Erik Faye-Lund Signed-off-by: Thierry Reding --- drivers/gpu/host1x/syncpt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/gpu/host1x/syncpt.c') diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c index 07fad14..7e77e63 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; } -- cgit v1.1