panfrost: Don't check if BO is mmaped before calling panfrost_bo_mmap()
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 14 Sep 2019 08:26:38 +0000 (10:26 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 18 Sep 2019 08:34:08 +0000 (10:34 +0200)
panfrost_bo_mmap() already takes care of that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_resource.c

index 97ab2f9d9a4ecda0fda5566562b6b45462d7a8c1..7083ee37bae25e8e38363854a58d4460ac2aab64 100644 (file)
@@ -561,11 +561,7 @@ panfrost_transfer_map(struct pipe_context *pctx,
         *out_transfer = &transfer->base;
 
         /* If we haven't already mmaped, now's the time */
-
-        if (!bo->cpu) {
-                struct panfrost_screen *screen = pan_screen(pctx->screen);
-                panfrost_bo_mmap(screen, bo);
-        }
+        panfrost_bo_mmap(pan_screen(pctx->screen), bo);
 
         /* Check if we're bound for rendering and this is a read pixels. If so,
          * we need to flush */