dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER
@ 2012-09-28 12:41 Maarten Lankhorst
  2012-09-28 12:42 ` [PATCH 2/5] fence: dma-buf cross-device synchronization (v9) Maarten Lankhorst
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Maarten Lankhorst @ 2012-09-28 12:41 UTC (permalink / raw)
  To: jakob, thellstrom, dri-devel, linaro-mm-sig, sumit.semwal,
	linux-media
  Cc: linux-kernel

Documentation says that code requiring dma-buf should add it to
select, so inline fallbacks are not going to be used. A link error
will make it obvious what went wrong, instead of silently doing
nothing at runtime.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
 include/linux/dma-buf.h |   99 -----------------------------------------------
 1 file changed, 99 deletions(-)

diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index eb48f38..bd2e52c 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -156,7 +156,6 @@ static inline void get_dma_buf(struct dma_buf *dmabuf)
 	get_file(dmabuf->file);
 }
 
-#ifdef CONFIG_DMA_SHARED_BUFFER
 struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
 							struct device *dev);
 void dma_buf_detach(struct dma_buf *dmabuf,
@@ -184,103 +183,5 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
 		 unsigned long);
 void *dma_buf_vmap(struct dma_buf *);
 void dma_buf_vunmap(struct dma_buf *, void *vaddr);
-#else
-
-static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
-							struct device *dev)
-{
-	return ERR_PTR(-ENODEV);
-}
-
-static inline void dma_buf_detach(struct dma_buf *dmabuf,
-				  struct dma_buf_attachment *dmabuf_attach)
-{
-	return;
-}
-
-static inline struct dma_buf *dma_buf_export(void *priv,
-					     const struct dma_buf_ops *ops,
-					     size_t size, int flags)
-{
-	return ERR_PTR(-ENODEV);
-}
-
-static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
-{
-	return -ENODEV;
-}
-
-static inline struct dma_buf *dma_buf_get(int fd)
-{
-	return ERR_PTR(-ENODEV);
-}
-
-static inline void dma_buf_put(struct dma_buf *dmabuf)
-{
-	return;
-}
-
-static inline struct sg_table *dma_buf_map_attachment(
-	struct dma_buf_attachment *attach, enum dma_data_direction write)
-{
-	return ERR_PTR(-ENODEV);
-}
-
-static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
-			struct sg_table *sg, enum dma_data_direction dir)
-{
-	return;
-}
-
-static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
-					   size_t start, size_t len,
-					   enum dma_data_direction dir)
-{
-	return -ENODEV;
-}
-
-static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
-					  size_t start, size_t len,
-					  enum dma_data_direction dir)
-{
-}
-
-static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf,
-					unsigned long pnum)
-{
-	return NULL;
-}
-
-static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf,
-					 unsigned long pnum, void *vaddr)
-{
-}
-
-static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum)
-{
-	return NULL;
-}
-
-static inline void dma_buf_kunmap(struct dma_buf *dmabuf,
-				  unsigned long pnum, void *vaddr)
-{
-}
-
-static inline int dma_buf_mmap(struct dma_buf *dmabuf,
-			       struct vm_area_struct *vma,
-			       unsigned long pgoff)
-{
-	return -ENODEV;
-}
-
-static inline void *dma_buf_vmap(struct dma_buf *dmabuf)
-{
-	return NULL;
-}
-
-static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
-{
-}
-#endif /* CONFIG_DMA_SHARED_BUFFER */
 
 #endif /* __DMA_BUF_H__ */

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

end of thread, other threads:[~2012-10-07 16:31 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-28 12:41 [PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER Maarten Lankhorst
2012-09-28 12:42 ` [PATCH 2/5] fence: dma-buf cross-device synchronization (v9) Maarten Lankhorst
2012-10-07 16:31   ` Maarten Lankhorst
2012-09-28 12:42 ` [PATCH 3/5] seqno-fence: Hardware dma-buf implementation of fencing (v3) Maarten Lankhorst
2012-09-28 12:43 ` [PATCH 4/5] reservation: cross-device reservation support Maarten Lankhorst
2012-09-28 15:29   ` Thomas Hellström
2012-09-28 16:01     ` Maarten Lankhorst
2012-10-03 12:33   ` Thomas Hellstrom
2012-09-28 12:43 ` [PATCH 5/5] reservation: Add lockdep annotation and selftests Maarten Lankhorst
2012-09-28 13:20 ` [PATCH 1/5] dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER Daniel Vetter
2012-09-28 14:14 ` Maarten Lankhorst
2012-09-28 19:42   ` Thomas Hellstrom
2012-09-28 20:10     ` Thomas Hellstrom
2012-09-29 15:16       ` Maarten Lankhorst
2012-10-01  8:49         ` Thomas Hellstrom
2012-10-01  9:47     ` Maarten Lankhorst
2012-10-02  6:46       ` Thomas Hellstrom
2012-10-02  8:03         ` Daniel Vetter
2012-10-03  7:45           ` Thomas Hellstrom
2012-10-03  7:54             ` Daniel Vetter
2012-10-03  8:37               ` Thomas Hellstrom
2012-10-03  8:53                 ` Daniel Vetter
2012-10-03 10:53                   ` Thomas Hellstrom
2012-10-03 12:46                     ` Maarten Lankhorst
2012-10-03 12:56                       ` Thomas Hellstrom
2012-10-03  7:57             ` Maarten Lankhorst
2012-10-03  8:35               ` Thomas Hellstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).