diff options
author | monk.liu <monk.liu@amd.com> | 2015-04-27 10:25:54 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 13:47:49 -0400 |
commit | 83d9369583d3200510beebe67edd19e9952c17dd (patch) | |
tree | 716bc92e87e3aaf1ffd53fe6d700019e3e237e9e /amdgpu/amdgpu_cs.c | |
parent | cc01c3cb5ae708689228d1ec6e751f91e7f90741 (diff) | |
download | libdrm-83d9369583d3200510beebe67edd19e9952c17dd.tar.gz libdrm-83d9369583d3200510beebe67edd19e9952c17dd.tar.bz2 libdrm-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>
Diffstat (limited to 'amdgpu/amdgpu_cs.c')
-rw-r--r-- | amdgpu/amdgpu_cs.c | 6 |
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, uint64_t *chunk_array; struct drm_amdgpu_cs_chunk *chunks; struct drm_amdgpu_cs_chunk_data *chunk_data; + uint32_t bo_list_handle; if (ibs_request->ip_type >= AMDGPU_HW_IP_NUM) return -EINVAL; @@ -754,10 +755,11 @@ static int amdgpu_cs_submit_one(amdgpu_device_handle dev, } r = amdgpu_cs_create_bo_list(dev, context, ibs_request, NULL, - &cs.in.bo_list_handle); + &bo_list_handle); if (r) goto error_unlock; + cs.in.bo_list_handle = bo_list_handle; pthread_mutex_lock(&context->sequence_mutex); if (ibs_request->ip_type != AMDGPU_HW_IP_UVD && @@ -805,7 +807,7 @@ static int amdgpu_cs_submit_one(amdgpu_device_handle dev, pthread_mutex_unlock(&context->sequence_mutex); - r = amdgpu_cs_free_bo_list(dev, cs.in.bo_list_handle); + r = amdgpu_cs_free_bo_list(dev, bo_list_handle); if (r) goto error_free; |