From: Marek Olšák Date: Thu, 4 Aug 2016 23:18:08 +0000 (+0200) Subject: winsys/amdgpu: don't try to unmap userptr buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8276776e645fa25a1cbac2aa7d52a319ffdc2d9a;p=mesa.git winsys/amdgpu: don't try to unmap userptr buffers no app calls this AFAIK Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 1805ce61fe1..db2c77fec0d 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -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); }