diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 21:34:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 21:34:04 -0400 |
commit | 29b88e23a9212136d39b0161a39afe587d0170a5 (patch) | |
tree | 48d9f857b137222e35f853004973e12a515314f5 /include/linux/dma-buf.h | |
parent | 2521129a6d2fd8a81f99cf95055eddea3df914ff (diff) | |
parent | 4e3a25b0274b8474f5ad46215a270785dd18265e (diff) |
Merge tag 'driver-core-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here's the big driver-core pull request for 3.17-rc1.
Largest thing in here is the dma-buf rework and fence code, that
touched many different subsystems so it was agreed it should go
through this tree to handle merge issues. There's also some firmware
loading updates, as well as tests added, and a few other tiny changes,
the changelog has the details.
All have been in linux-next for a long time"
* tag 'driver-core-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
ARM: imx: Remove references to platform_bus in mxc code
firmware loader: Fix _request_firmware_load() return val for fw load abort
platform: Remove most references to platform_bus device
test: add firmware_class loader test
doc: fix minor typos in firmware_class README
staging: android: Cleanup style issues
Documentation: devres: Sort managed interfaces
Documentation: devres: Add devm_kmalloc() et al
fs: debugfs: remove trailing whitespace
kernfs: kernel-doc warning fix
debugfs: Fix corrupted loop in debugfs_remove_recursive
stable_kernel_rules: Add pointer to netdev-FAQ for network patches
driver core: platform: add device binding path 'driver_override'
driver core/platform: remove unused implicit padding in platform_object
firmware loader: inform direct failure when udev loader is disabled
firmware: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
firmware: read firmware size using i_size_read()
firmware loader: allow disabling of udev as firmware loader
reservation: add suppport for read-only access using rcu
reservation: update api and add some helpers
...
Conflicts:
drivers/base/platform.c
Diffstat (limited to 'include/linux/dma-buf.h')
-rw-r--r-- | include/linux/dma-buf.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index f886985a28b2..694e1fe1c4b4 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/list.h> | 30 | #include <linux/list.h> |
31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
33 | #include <linux/fence.h> | ||
34 | #include <linux/wait.h> | ||
33 | 35 | ||
34 | struct device; | 36 | struct device; |
35 | struct dma_buf; | 37 | struct dma_buf; |
@@ -115,6 +117,7 @@ struct dma_buf_ops { | |||
115 | * @exp_name: name of the exporter; useful for debugging. | 117 | * @exp_name: name of the exporter; useful for debugging. |
116 | * @list_node: node for dma_buf accounting and debugging. | 118 | * @list_node: node for dma_buf accounting and debugging. |
117 | * @priv: exporter specific private data for this buffer object. | 119 | * @priv: exporter specific private data for this buffer object. |
120 | * @resv: reservation object linked to this dma-buf | ||
118 | */ | 121 | */ |
119 | struct dma_buf { | 122 | struct dma_buf { |
120 | size_t size; | 123 | size_t size; |
@@ -128,6 +131,17 @@ struct dma_buf { | |||
128 | const char *exp_name; | 131 | const char *exp_name; |
129 | struct list_head list_node; | 132 | struct list_head list_node; |
130 | void *priv; | 133 | void *priv; |
134 | struct reservation_object *resv; | ||
135 | |||
136 | /* poll support */ | ||
137 | wait_queue_head_t poll; | ||
138 | |||
139 | struct dma_buf_poll_cb_t { | ||
140 | struct fence_cb cb; | ||
141 | wait_queue_head_t *poll; | ||
142 | |||
143 | unsigned long active; | ||
144 | } cb_excl, cb_shared; | ||
131 | }; | 145 | }; |
132 | 146 | ||
133 | /** | 147 | /** |
@@ -168,10 +182,11 @@ void dma_buf_detach(struct dma_buf *dmabuf, | |||
168 | struct dma_buf_attachment *dmabuf_attach); | 182 | struct dma_buf_attachment *dmabuf_attach); |
169 | 183 | ||
170 | struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, | 184 | struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, |
171 | size_t size, int flags, const char *); | 185 | size_t size, int flags, const char *, |
186 | struct reservation_object *); | ||
172 | 187 | ||
173 | #define dma_buf_export(priv, ops, size, flags) \ | 188 | #define dma_buf_export(priv, ops, size, flags, resv) \ |
174 | dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME) | 189 | dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME, resv) |
175 | 190 | ||
176 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); | 191 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); |
177 | struct dma_buf *dma_buf_get(int fd); | 192 | struct dma_buf *dma_buf_get(int fd); |