From d4fac1e1d7f7c43663d64e826e946f6da2da7a73 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 29 Jun 2017 18:33:05 +0200 Subject: gallium/radeon: enable suballocations for VRAM with no CPU access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/winsys/radeon') diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index c516df05d8e..91f09b9f5d6 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -925,6 +925,9 @@ radeon_winsys_bo_create(struct radeon_winsys *rws, /* VRAM implies WC. This is not optional. */ if (domain & RADEON_DOMAIN_VRAM) flags |= RADEON_FLAG_GTT_WC; + /* NO_CPU_ACCESS is valid with VRAM only. */ + if (domain != RADEON_DOMAIN_VRAM) + flags &= ~RADEON_FLAG_NO_CPU_ACCESS; /* Sub-allocate small buffers from slabs. */ if (!(flags & RADEON_FLAG_NO_SUBALLOC) && -- cgit v1.2.3