From a1acffd4e0968ffa65b673163574188a00c9ab7e Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Thu, 21 May 2015 15:08:28 +0900 Subject: nouveau: add coherent BO attribute Add a flag allowing Nouveau to specify that an object should be coherent at allocation time. This is required for some class of objects like fences which are randomly-accessed by both the CPU and GPU. This flag instructs the kernel driver to make sure the object remains coherent even on architectures for which coherency is not guaranteed by the bus. Reviewed-by: Ben Skeggs Signed-off-by: Alexandre Courbot --- nouveau/abi16.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nouveau/abi16.c') diff --git a/nouveau/abi16.c b/nouveau/abi16.c index 538f3a73..4ca0bfba 100644 --- a/nouveau/abi16.c +++ b/nouveau/abi16.c @@ -195,6 +195,9 @@ abi16_bo_init(struct nouveau_bo *bo, uint32_t alignment, if (bo->flags & NOUVEAU_BO_MAP) info->domain |= NOUVEAU_GEM_DOMAIN_MAPPABLE; + if (bo->flags & NOUVEAU_BO_COHERENT) + info->domain |= NOUVEAU_GEM_DOMAIN_COHERENT; + if (!(bo->flags & NOUVEAU_BO_CONTIG)) info->tile_flags = NOUVEAU_GEM_TILE_NONCONTIG; -- cgit v1.2.3