From bf072ed6696ad660bb704ec65e009dfece443a8b Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Tue, 28 Jan 2020 14:23:26 +0530 Subject: [PATCH] gpu: nvgpu: Add nvgpu_nvhost_syncpt_get_name() for safety build JIRA NVGPU-3770 Change-Id: Ic811ea50d364b9229db341aefb0c08124cacfc5f Signed-off-by: Lakshmanan M Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286335 Reviewed-by: Dinesh T Reviewed-by: Rajesh Devaraj Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions Tested-by: Dinesh T Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/include/nvgpu/nvhost.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h index 1454066f1..226714c76 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -96,11 +96,22 @@ u32 nvgpu_nvhost_get_syncpt_host_managed(struct nvgpu_nvhost_dev *nvgpu_syncpt_d int nvgpu_nvhost_create_symlink(struct gk20a *g); void nvgpu_nvhost_remove_symlink(struct gk20a *g); -const char *nvgpu_nvhost_syncpt_get_name(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev, - int id); - #endif +/** + * @brief Get the sync_pt name of given sync point id. + * + * @param nvgpu_syncpt_dev [in] Sync point device. + * @param id [in] Sync point id. + * + * - Read the sync_pt name of the given sync point by de-referring the + * #nvgpu_syncpt_dev->syncpt_names. + * + * @return sync_pt name of given sync point id. + */ +const char *nvgpu_nvhost_syncpt_get_name( + struct nvgpu_nvhost_dev *nvgpu_syncpt_dev, int id); + /** * @brief Increment the value of given sync point to the maximum value. *