aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormonk.liu2015-04-26 21:25:54 -0500
committerAlex Deucher2015-08-05 12:47:49 -0500
commit83d9369583d3200510beebe67edd19e9952c17dd (patch)
tree716bc92e87e3aaf1ffd53fe6d700019e3e237e9e
parentcc01c3cb5ae708689228d1ec6e751f91e7f90741 (diff)
downloadexternal-libgbm-83d9369583d3200510beebe67edd19e9952c17dd.tar.gz
external-libgbm-83d9369583d3200510beebe67edd19e9952c17dd.tar.xz
external-libgbm-83d9369583d3200510beebe67edd19e9952c17dd.zip
amdgpu: fix an error of bo_list handler
original method is just totally wrong, it loses the bo_list handler at all after command stream accomplished Signed-off-by: Monk.Liu <monk.liu@amd.com> Reviewed-by: Christian K├Ânig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-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 614904da..72a2465c 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -707,6 +707,7 @@ static int amdgpu_cs_submit_one(amdgpu_device_handle dev,
707 uint64_t *chunk_array; 707 uint64_t *chunk_array;
708 struct drm_amdgpu_cs_chunk *chunks; 708 struct drm_amdgpu_cs_chunk *chunks;
709 struct drm_amdgpu_cs_chunk_data *chunk_data; 709 struct drm_amdgpu_cs_chunk_data *chunk_data;
710 uint32_t bo_list_handle;
710 711
711 if (ibs_request->ip_type >= AMDGPU_HW_IP_NUM) 712 if (ibs_request->ip_type >= AMDGPU_HW_IP_NUM)
712 return -EINVAL; 713 return -EINVAL;
@@ -754,10 +755,11 @@ static int amdgpu_cs_submit_one(amdgpu_device_handle dev,
754 } 755 }
755 756
756 r = amdgpu_cs_create_bo_list(dev, context, ibs_request, NULL, 757 r = amdgpu_cs_create_bo_list(dev, context, ibs_request, NULL,
757 &cs.in.bo_list_handle); 758 &bo_list_handle);
758 if (r) 759 if (r)
759 goto error_unlock; 760 goto error_unlock;
760 761
762 cs.in.bo_list_handle = bo_list_handle;
761 pthread_mutex_lock(&context->sequence_mutex); 763 pthread_mutex_lock(&context->sequence_mutex);
762 764
763 if (ibs_request->ip_type != AMDGPU_HW_IP_UVD && 765 if (ibs_request->ip_type != AMDGPU_HW_IP_UVD &&
@@ -805,7 +807,7 @@ static int amdgpu_cs_submit_one(amdgpu_device_handle dev,
805 807
806 pthread_mutex_unlock(&context->sequence_mutex); 808 pthread_mutex_unlock(&context->sequence_mutex);
807 809
808 r = amdgpu_cs_free_bo_list(dev, cs.in.bo_list_handle); 810 r = amdgpu_cs_free_bo_list(dev, bo_list_handle);
809 if (r) 811 if (r)
810 goto error_free; 812 goto error_free;
811 813