aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c3
-rw-r--r--include/uapi/drm/nouveau_drm.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 7c077fced1d1..0e690bf19fc9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -189,6 +189,9 @@ nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain,
189 if (!flags || domain & NOUVEAU_GEM_DOMAIN_CPU) 189 if (!flags || domain & NOUVEAU_GEM_DOMAIN_CPU)
190 flags |= TTM_PL_FLAG_SYSTEM; 190 flags |= TTM_PL_FLAG_SYSTEM;
191 191
192 if (domain & NOUVEAU_GEM_DOMAIN_COHERENT)
193 flags |= TTM_PL_FLAG_UNCACHED;
194
192 ret = nouveau_bo_new(dev, size, align, flags, tile_mode, 195 ret = nouveau_bo_new(dev, size, align, flags, tile_mode,
193 tile_flags, NULL, NULL, pnvbo); 196 tile_flags, NULL, NULL, pnvbo);
194 if (ret) 197 if (ret)
diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h
index 0d7608dc1a34..5507eead5863 100644
--- a/include/uapi/drm/nouveau_drm.h
+++ b/include/uapi/drm/nouveau_drm.h
@@ -39,6 +39,7 @@
39#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) 39#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
40#define NOUVEAU_GEM_DOMAIN_GART (1 << 2) 40#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
41#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) 41#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
42#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4)
42 43
43#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */ 44#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */
44#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 45#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00