From: monk.liu Date: Mon, 27 Apr 2015 02:38:16 +0000 (+0800) Subject: drm/amdgpu: let bo_list handler start from 1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=decee87a88c05980ebc545c19d4ff252052ddc3e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/amdgpu: let bo_list handler start from 1 this could prevent mis-understanding, because libdrm side will consider no bo_list created if handleis zero Signed-off-by: monk.liu Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c index 819fb861ac04..36d34e0afbc3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c @@ -43,7 +43,7 @@ static int amdgpu_bo_list_create(struct amdgpu_fpriv *fpriv, mutex_lock(&fpriv->bo_list_lock); r = idr_alloc(&fpriv->bo_list_handles, *result, - 0, 0, GFP_KERNEL); + 1, 0, GFP_KERNEL); if (r < 0) { mutex_unlock(&fpriv->bo_list_lock); kfree(*result);