diff options
author | Shridhar Rasal <srasal@nvidia.com> | 2014-06-04 17:16:30 +0530 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-06-23 22:50:40 -0700 |
commit | 1a3af264730ab9185a55b118b6cf69e65de4ed94 (patch) | |
tree | fce6b1c3a734eea4e11cc5ddb29c61cdd540c046 /drivers/video | |
parent | f5f5185d50a2d8a05dbacfd621dd22736f4423e0 (diff) |
video: tegra: host: return syncpt name given ID
Add API to return syncpt name for a given sync point ID.
Bug 200007874
Change-Id: I85983881f2f2f266cae1f5d682d7072edc9a8c1f
Reviewed-on: http://git-master/r/418918
(cherry picked from commit 7473a184b4e7329be80e0bd915f0710391d27a26)
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/426605
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/host/nvhost_syncpt.c | 12 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_syncpt.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/nvhost_syncpt.c b/drivers/video/tegra/host/nvhost_syncpt.c index a2cc5bebc216..b0af8a143bd2 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.c +++ b/drivers/video/tegra/host/nvhost_syncpt.c @@ -588,6 +588,18 @@ struct nvhost_sync_timeline *nvhost_syncpt_timeline(struct nvhost_syncpt *sp, } #endif +const char *nvhost_syncpt_get_name_from_id(int id) +{ + struct nvhost_master *host = nvhost; + struct nvhost_syncpt *sp = &host->syncpt; + const char *name = NULL; + + name = sp->syncpt_names[id]; + + return name ? name : ""; +} +EXPORT_SYMBOL_GPL(nvhost_syncpt_get_name_from_id); + const char *nvhost_syncpt_get_name(struct platform_device *pdev, int id) { struct nvhost_master *host = nvhost_get_host(pdev); diff --git a/drivers/video/tegra/host/nvhost_syncpt.h b/drivers/video/tegra/host/nvhost_syncpt.h index a62107916e0c..9de581344e0c 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.h +++ b/drivers/video/tegra/host/nvhost_syncpt.h @@ -134,6 +134,7 @@ void nvhost_syncpt_save(struct nvhost_syncpt *sp); void nvhost_syncpt_reset(struct nvhost_syncpt *sp); void nvhost_syncpt_reset_client(struct platform_device *pdev); +const char *nvhost_syncpt_get_name_from_id(int id); int nvhost_syncpt_read_check(struct nvhost_syncpt *sp, u32 id, u32 *val); u32 nvhost_syncpt_read(struct nvhost_syncpt *sp, u32 id); u32 nvhost_syncpt_read_wait_base(struct nvhost_syncpt *sp, u32 id); |