summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjqdeng <Emily.Deng@amd.com>2016-07-05 15:46:37 +0800
committerQiang Yu <Qiang.Yu@amd.com>2017-05-17 11:10:47 +0800
commitcdea4e508e185c33fd22480397e53c6676fd69fa (patch)
treea0ff90658cd874746e69e5e05885d99c160ac5c7
parent3a4fa98167b8add4ebbe1bb2a3f29ca7ab344449 (diff)
amdgpu: Make amdgpu_get_auth to non-static
The amdgpu_get_auth will be used by another two functions amdgpu_get_fb_id and amdgpu_get_bo_from_fb_id, so make it to non-static, and add definition to amdgpu_internal.h. Signed-off-by: jqdeng <Emily.Deng@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
-rw-r--r--amdgpu/amdgpu_device.c2
-rw-r--r--amdgpu/amdgpu_internal.h14
2 files changed, 15 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index 807f63ed..5d2a15ee 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -113,7 +113,7 @@ static int fd_compare(void *key1, void *key2)
* >0 - AMD specific error code\n
* <0 - Negative POSIX Error code
*/
-static int amdgpu_get_auth(int fd, int *auth)
+int amdgpu_get_auth(int fd, int *auth)
{
int r = 0;
drm_client_t client = {};
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index f4fbd13b..899909b0 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -161,6 +161,20 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev);
drm_private uint64_t amdgpu_cs_calculate_timeout(uint64_t timeout);
/**
+* Get the authenticated form fd,
+*
+* \param fd - \c [in] File descriptor for AMD GPU device
+* \param auth - \c [out] Pointer to output the fd is authenticated or not
+* A render node fd, output auth = 0
+* A legacy fd, get the authenticated for compatibility root
+*
+* \return 0 on success\n
+* >0 - AMD specific error code\n
+* <0 - Negative POSIX Error code
+*/
+int amdgpu_get_auth(int fd, int *auth);
+
+/**
* Inline functions.
*/