aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--amdgpu/amdgpu_cs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index 3c9be6c2..f9869087 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -705,12 +705,13 @@ int amdgpu_cs_submit_raw(amdgpu_device_handle dev,
705 struct drm_amdgpu_cs_chunk *chunks, 705 struct drm_amdgpu_cs_chunk *chunks,
706 uint64_t *seq_no) 706 uint64_t *seq_no)
707{ 707{
708 union drm_amdgpu_cs cs = {0}; 708 union drm_amdgpu_cs cs;
709 uint64_t *chunk_array; 709 uint64_t *chunk_array;
710 int i, r; 710 int i, r;
711 if (num_chunks == 0) 711 if (num_chunks == 0)
712 return -EINVAL; 712 return -EINVAL;
713 713
714 memset(&cs, 0, sizeof(cs));
714 chunk_array = alloca(sizeof(uint64_t) * num_chunks); 715 chunk_array = alloca(sizeof(uint64_t) * num_chunks);
715 for (i = 0; i < num_chunks; i++) 716 for (i = 0; i < num_chunks; i++)
716 chunk_array[i] = (uint64_t)(uintptr_t)&chunks[i]; 717 chunk_array[i] = (uint64_t)(uintptr_t)&chunks[i];
@@ -750,9 +751,10 @@ int amdgpu_cs_fence_to_handle(amdgpu_device_handle dev,
750 uint32_t what, 751 uint32_t what,
751 uint32_t *out_handle) 752 uint32_t *out_handle)
752{ 753{
753 union drm_amdgpu_fence_to_handle fth = {0}; 754 union drm_amdgpu_fence_to_handle fth;
754 int r; 755 int r;
755 756
757 memset(&fth, 0, sizeof(fth));
756 fth.in.fence.ctx_id = fence->context->id; 758 fth.in.fence.ctx_id = fence->context->id;
757 fth.in.fence.ip_type = fence->ip_type; 759 fth.in.fence.ip_type = fence->ip_type;
758 fth.in.fence.ip_instance = fence->ip_instance; 760 fth.in.fence.ip_instance = fence->ip_instance;