[PATCH 3/3] amdgpu: Fix amdgpu_bo_list_handle typedef not to hide pointer type

Edward O'Callaghan funfunctor at folklore1984.net
Fri Sep 16 08:46:10 UTC 2016


Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
 amdgpu/amdgpu.h            | 10 +++++-----
 amdgpu/amdgpu_bo.c         |  6 +++---
 tests/amdgpu/amdgpu_test.h |  2 +-
 tests/amdgpu/basic_tests.c |  8 ++++----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index 9332fab..77ddb87 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -117,7 +117,7 @@ typedef struct amdgpu_bo *amdgpu_bo_handle;
 /**
  * Define handle for list of BOs
  */
-typedef struct amdgpu_bo_list *amdgpu_bo_list_handle;
+typedef struct amdgpu_bo_list amdgpu_bo_list_handle_t;
 
 /**
  * Define handle to be used to work with VA allocated ranges
@@ -332,7 +332,7 @@ struct amdgpu_cs_request {
 	/**
 	 * List handle with resources used by this request.
 	 */
-	amdgpu_bo_list_handle resources;
+	amdgpu_bo_list_handle_t * resources;
 
 	/**
 	 * Number of dependencies this Command submission needs to
@@ -747,7 +747,7 @@ int amdgpu_bo_list_create(amdgpu_device_handle dev,
 			  uint32_t number_of_resources,
 			  amdgpu_bo_handle *resources,
 			  uint8_t *resource_prios,
-			  amdgpu_bo_list_handle *result);
+			  amdgpu_bo_list_handle_t ** result);
 
 /**
  * Destroys a BO list handle.
@@ -759,7 +759,7 @@ int amdgpu_bo_list_create(amdgpu_device_handle dev,
  *
  * \sa amdgpu_bo_list_create()
 */
-int amdgpu_bo_list_destroy(amdgpu_bo_list_handle handle);
+int amdgpu_bo_list_destroy(amdgpu_bo_list_handle_t * handle);
 
 /**
  * Update resources for existing BO list
@@ -774,7 +774,7 @@ int amdgpu_bo_list_destroy(amdgpu_bo_list_handle handle);
  *
  * \sa amdgpu_bo_list_update()
 */
-int amdgpu_bo_list_update(amdgpu_bo_list_handle handle,
+int amdgpu_bo_list_update(amdgpu_bo_list_handle_t * handle,
 			  uint32_t number_of_resources,
 			  amdgpu_bo_handle *resources,
 			  uint8_t *resource_prios);
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index d30fd1e..e57e733 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -565,7 +565,7 @@ int amdgpu_bo_list_create(amdgpu_device_handle dev,
 			  uint32_t number_of_resources,
 			  amdgpu_bo_handle *resources,
 			  uint8_t *resource_prios,
-			  amdgpu_bo_list_handle *result)
+			  amdgpu_bo_list_handle_t ** result)
 {
 	struct drm_amdgpu_bo_list_entry *list;
 	union drm_amdgpu_bo_list args;
@@ -616,7 +616,7 @@ int amdgpu_bo_list_create(amdgpu_device_handle dev,
 	return 0;
 }
 
-int amdgpu_bo_list_destroy(amdgpu_bo_list_handle list)
+int amdgpu_bo_list_destroy(amdgpu_bo_list_handle_t * list)
 {
 	union drm_amdgpu_bo_list args;
 	int r;
@@ -634,7 +634,7 @@ int amdgpu_bo_list_destroy(amdgpu_bo_list_handle list)
 	return r;
 }
 
-int amdgpu_bo_list_update(amdgpu_bo_list_handle handle,
+int amdgpu_bo_list_update(amdgpu_bo_list_handle_t * handle,
 			  uint32_t number_of_resources,
 			  amdgpu_bo_handle *resources,
 			  uint8_t *resource_prios)
diff --git a/tests/amdgpu/amdgpu_test.h b/tests/amdgpu/amdgpu_test.h
index acf3359..d4f1873 100644
--- a/tests/amdgpu/amdgpu_test.h
+++ b/tests/amdgpu/amdgpu_test.h
@@ -226,7 +226,7 @@ amdgpu_bo_unmap_and_free(amdgpu_bo_handle bo, amdgpu_va_handle_t * va_handle,
 
 static inline int
 amdgpu_get_bo_list(amdgpu_device_handle dev, amdgpu_bo_handle bo1,
-		   amdgpu_bo_handle bo2, amdgpu_bo_list_handle *list)
+		   amdgpu_bo_handle bo2, amdgpu_bo_list_handle_t ** list)
 {
 	amdgpu_bo_handle resources[] = {bo1, bo2};
 
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 7838249..509154c 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -292,7 +292,7 @@ static void amdgpu_command_submission_gfx_separate_ibs(void)
 	struct amdgpu_cs_fence fence_status = {0};
 	uint32_t *ptr;
 	uint32_t expired;
-	amdgpu_bo_list_handle bo_list;
+	amdgpu_bo_list_handle_t * bo_list;
 	amdgpu_va_handle_t * va_handle, va_handle_ce;
 	int r;
 
@@ -381,7 +381,7 @@ static void amdgpu_command_submission_gfx_shared_ib(void)
 	struct amdgpu_cs_fence fence_status = {0};
 	uint32_t *ptr;
 	uint32_t expired;
-	amdgpu_bo_list_handle bo_list;
+	amdgpu_bo_list_handle_t * bo_list;
 	amdgpu_va_handle_t * va_handle;
 	int r;
 
@@ -488,7 +488,7 @@ static void amdgpu_semaphore_test(void)
 	struct amdgpu_cs_fence fence_status = {0};
 	uint32_t *ptr;
 	uint32_t expired;
-	amdgpu_bo_list_handle bo_list[2];
+	amdgpu_bo_list_handle_t * bo_list[2];
 	amdgpu_va_handle_t * va_handle[2];
 	int r, i;
 
@@ -618,7 +618,7 @@ static void amdgpu_command_submission_compute_nop(void)
 	uint32_t *ptr;
 	uint32_t expired;
 	int i, r, instance;
-	amdgpu_bo_list_handle bo_list;
+	amdgpu_bo_list_handle_t * bo_list;
 	amdgpu_va_handle_t * va_handle;
 
 	r = amdgpu_cs_ctx_create(device_handle, &context_handle);
-- 
2.7.4



More information about the amd-gfx mailing list