All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] udmabuf: use cache_sgt_mapping option
@ 2019-11-26  1:10 Gurchetan Singh
  2019-11-26  1:10 ` [PATCH 2/5] udmabuf: allow userspace to set map attributes Gurchetan Singh
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Gurchetan Singh @ 2019-11-26  1:10 UTC (permalink / raw)
  To: dri-devel; +Cc: Gurchetan Singh, kraxel, hch

The GEM prime helpers do it, so should we. It's also possible to make
it optional later.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
---
 drivers/dma-buf/udmabuf.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 9635897458a0..b345e91d831a 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -108,12 +108,13 @@ static void kunmap_udmabuf(struct dma_buf *buf, unsigned long page_num,
 }
 
 static const struct dma_buf_ops udmabuf_ops = {
-	.map_dma_buf	  = map_udmabuf,
-	.unmap_dma_buf	  = unmap_udmabuf,
-	.release	  = release_udmabuf,
-	.map		  = kmap_udmabuf,
-	.unmap		  = kunmap_udmabuf,
-	.mmap		  = mmap_udmabuf,
+	.cache_sgt_mapping = true,
+	.map_dma_buf	   = map_udmabuf,
+	.unmap_dma_buf	   = unmap_udmabuf,
+	.release	   = release_udmabuf,
+	.map		   = kmap_udmabuf,
+	.unmap		   = kunmap_udmabuf,
+	.mmap		   = mmap_udmabuf,
 };
 
 #define SEALS_WANTED (F_SEAL_SHRINK)
-- 
2.24.0.432.g9d3f5f5b63-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-03  1:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26  1:10 [PATCH 1/5] udmabuf: use cache_sgt_mapping option Gurchetan Singh
2019-11-26  1:10 ` [PATCH 2/5] udmabuf: allow userspace to set map attributes Gurchetan Singh
2019-11-28 11:48   ` Gerd Hoffmann
2019-12-03  1:48     ` Gurchetan Singh
2019-11-26  1:10 ` [PATCH 3/5] udmabuf: add a pointer to the miscdevice in dma-buf private data Gurchetan Singh
2019-11-26  1:10 ` [PATCH 4/5] udmabuf: separate out creating/destroying scatter-table Gurchetan Singh
2019-11-26  1:10 ` [PATCH 5/5] udmabuf: implement begin_cpu_access/end_cpu_access hooks Gurchetan Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.