LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0014-drm-nouveau-Use-old-struct-dma_attrs-instead-of-unsi.patch of Package drm (Project home:tiwai:bnc1050256)

From 009ca5c9fe5b26cdae55b4aeb54bdc683420fcaa Mon Sep 17 00:00:00 2001
From: Patrik Jakobsson <pjakobsson@suse.de>
Date: Thu, 30 Mar 2017 15:20:01 +0200
Subject: [PATCH 14/14] drm/nouveau: Use old struct dma_attrs instead of
 unsigned long

Signed-off-by: Patrik Jakobsson <pjakobsson@suse.de>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index a6a7fa0..930f0e6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -109,7 +109,7 @@ struct gk20a_instmem {
 	u16 iommu_bit;
 
 	/* Only used by DMA API */
-	unsigned long attrs;
+	struct dma_attrs *attrs;
 };
 #define gk20a_instmem(p) container_of((p), struct gk20a_instmem, base)
 
@@ -597,9 +597,8 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
 
 		nvkm_info(&imem->base.subdev, "using IOMMU\n");
 	} else {
-		imem->attrs = DMA_ATTR_NON_CONSISTENT |
-			      DMA_ATTR_WEAK_ORDERING |
-			      DMA_ATTR_WRITE_COMBINE;
+		dma_set_attr(DMA_ATTR_NON_CONSISTENT | DMA_ATTR_WEAK_ORDERING |
+			     DMA_ATTR_WRITE_COMBINE, imem->attrs);
 
 		nvkm_info(&imem->base.subdev, "using DMA API\n");
 	}
-- 
2.12.0