winsys/amdgpu: don't try to unmap userptr buffers
authorMarek Olšák <marek.olsak@amd.com>
Thu, 4 Aug 2016 23:18:08 +0000 (01:18 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 9 Aug 2016 23:11:10 +0000 (01:11 +0200)
no app calls this AFAIK

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c

index 1805ce61fe1573536839471a520e6afca43fcf68..db2c77fec0dc73227691d2ea2e5195df988a6201 100644 (file)
@@ -264,6 +264,9 @@ static void amdgpu_bo_unmap(struct pb_buffer *buf)
 {
    struct amdgpu_winsys_bo *bo = (struct amdgpu_winsys_bo*)buf;
 
+   if (bo->user_ptr)
+      return;
+
    amdgpu_bo_cpu_unmap(bo->bo);
 }