From 8276776e645fa25a1cbac2aa7d52a319ffdc2d9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 5 Aug 2016 01:18:08 +0200 Subject: [PATCH] winsys/amdgpu: don't try to unmap userptr buffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit no app calls this AFAIK Reviewed-by: Nicolai Hähnle --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.30.2