summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/nvhost_acm.h
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2011-08-12 09:04:09 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:20:29 -0700
commitf1efa663cb7fb7103fb7ede88cf60634e788e67b (patch)
tree8e710aa1a01be3fef30f36f8d4622c4e60bb3194 /drivers/video/tegra/host/nvhost_acm.h
parent47dab4404ca14ea88560f743a665e61a809d7f0a (diff)
video: tegra: nvhost: add submit timeout support
In this change, nvhost_cdma starts a timer (if a timeout is specified in the userctx), for the buffer at the head of the sync_queue that has not reached its syncpt threshold. If the timeout fires, nvhost_cdma initiates a channel / module reset. It then detects up to where in the sync_queue it stopped execution (based on the current HW syncpt value). For any remaining uncompleted buffers in the context, nvhost_cdma NOPs the entry and CPU incrs the syncpt to where it should be had it completed. If one of the sync_queue entries belongs to another context, it still does the syncpt incrs for this context, but via the PB as a GATHER opcode, At the end, CDMA is restarted, so buffers are refetched (either with NOP slots, or GATHERs to incr syncpts). This appears as though the buffer has completed (and the associated resources released). For testing, debugfs entries have been added under /d/tegra_nvhost force_timeout_val - set the timeout value, in ms force_timeout_channel - channel ID, were timeouts checks occur force_timeout_pid - process ID to set the userctx The idea is to set the timeout_val, then the timeout_channel (e.g. for 3D, the channel ID is 1) and then the process ID, gotten from running adb shell ps. Bug 625545 Original-Change-Id: I659e9255f1105f3439ce23e9169a19739b83ea52 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/42655 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R89759c129e2db8f7dbf83a6066fc29947f95cc27
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.h')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.h b/drivers/video/tegra/host/nvhost_acm.h
index 6f3011e343cd..42bc89ab9d4b 100644
--- a/drivers/video/tegra/host/nvhost_acm.h
+++ b/drivers/video/tegra/host/nvhost_acm.h
@@ -56,6 +56,7 @@ struct nvhost_module {
atomic_t refcount;
wait_queue_head_t idle;
struct nvhost_module *parent;
+ bool can_powergate;
int powergate_id;
int powergate_id2;
int powerdown_delay;
@@ -68,6 +69,7 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name,
void nvhost_module_deinit(struct nvhost_module *mod);
void nvhost_module_suspend(struct nvhost_module *mod, bool system_suspend);
+void nvhost_module_reset(struct nvhost_module *mod);
void nvhost_module_busy(struct nvhost_module *mod);
void nvhost_module_idle_mult(struct nvhost_module *mod, int refs);
int nvhost_module_add_client(struct nvhost_module *mod, void *priv);