xf86-video-amdgpu: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Thu Jul 16 14:29:02 PDT 2015


 src/amdgpu_bo_helper.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ea32253541959cc36a40fb0118200a8f493dc98a
Author: Jammy Zhou <Jammy.Zhou at amd.com>
Date:   Wed Jul 15 11:26:28 2015 +0800

    Adapt to the interface change of amdgpu_bo_alloc v3
    
    The amdgpu_bo_alloc_result structure is removed from libdrm_amdgpu,
    and the amdgpu_bo_handle is returned directly
    
    v2: remove the va_map/unmap
    v3: simply the code a bit
    
    Signed-off-by: Jammy Zhou <Jammy.Zhou at amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 00e8643..0a32934 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -193,11 +193,9 @@ struct amdgpu_buffer *amdgpu_bo_open(amdgpu_device_handle pDev,
 				       uint32_t domains)
 {
 	struct amdgpu_bo_alloc_request alloc_request;
-	struct amdgpu_bo_alloc_result buffer;
 	struct amdgpu_buffer *bo = NULL;
 
 	memset(&alloc_request, 0, sizeof(struct amdgpu_bo_alloc_request));
-	memset(&buffer, 0, sizeof(struct amdgpu_bo_alloc_result));
 
 	bo = (struct amdgpu_buffer *)calloc(1, sizeof(struct amdgpu_buffer));
 	if (bo == NULL) {
@@ -208,12 +206,11 @@ struct amdgpu_buffer *amdgpu_bo_open(amdgpu_device_handle pDev,
 	alloc_request.phys_alignment = phys_alignment;
 	alloc_request.preferred_heap = domains;
 
-	if (amdgpu_bo_alloc(pDev, &alloc_request, &buffer)) {
+	if (amdgpu_bo_alloc(pDev, &alloc_request, &bo->bo.amdgpu)) {
 		free(bo);
 		return NULL;
 	}
 
-	bo->bo.amdgpu = buffer.buf_handle;
 	bo->ref_count = 1;
 
 	return bo;


More information about the xorg-commit mailing list