amdgpu: cleanup public interface v2
Remove the mostly unused device parameter, for the few cases
where we really need it keep a copy in the context structure.
v2: rebased on internal branch
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index 19bc7e1..c91452e 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -94,6 +94,7 @@
* sequence_mutex -> pendings_mutex -> pool_mutex.
*/
struct amdgpu_context {
+ struct amdgpu_device *dev;
/** Mutex for accessing fences and to maintain command submissions
and pending lists in good sequence. */
pthread_mutex_t sequence_mutex;
@@ -116,6 +117,7 @@
};
struct amdgpu_ib {
+ amdgpu_context_handle context;
struct list_head list_node;
amdgpu_bo_handle buf_handle;
void *cpu;