diff options
author | monk.liu <monk.liu@amd.com> | 2015-05-05 15:15:15 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 13:47:49 -0400 |
commit | 3b50db9d9f77e2eba3f628703c2bffd41a71d20b (patch) | |
tree | ca4c92b75f8a7a46683c86ff02a8909faa44587d /amdgpu/amdgpu_cs.c | |
parent | c68d58aa14b7f737812a35f92af3caf315f20d8a (diff) | |
download | libdrm-3b50db9d9f77e2eba3f628703c2bffd41a71d20b.tar.gz libdrm-3b50db9d9f77e2eba3f628703c2bffd41a71d20b.tar.bz2 libdrm-3b50db9d9f77e2eba3f628703c2bffd41a71d20b.zip |
amdgpu: fix segfault when resources are NULL
Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_cs.c')
-rw-r--r-- | amdgpu/amdgpu_cs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index 8a473a1d..b3defb84 100644 --- a/amdgpu/amdgpu_cs.c +++ b/amdgpu/amdgpu_cs.c @@ -659,7 +659,8 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context, memset(&cs, 0, sizeof(cs)); cs.in.chunks = (uint64_t)(uintptr_t)chunk_array; cs.in.ctx_id = context->id; - cs.in.bo_list_handle = ibs_request->resources->handle; + if (ibs_request->resources) + cs.in.bo_list_handle = ibs_request->resources->handle; cs.in.num_chunks = ibs_request->number_of_ibs; /* IB chunks */ for (i = 0; i < ibs_request->number_of_ibs; i++) { |