diff options
author | Tiago Vignatti <tiago.vignatti@intel.com> | 2015-12-22 16:36:45 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-02-09 03:25:22 -0500 |
commit | 831e9da7dc5c22fd2a5fb64e999f6e077a4338c3 (patch) | |
tree | fd781ca5f233f8559189d35f18842277844e6551 /drivers/dma-buf/dma-buf.c | |
parent | bfe981a0952880df43d08a050bf3ae44aaebd795 (diff) |
dma-buf: Remove range-based flush
This patch removes range-based information used for optimizations in
begin_cpu_access and end_cpu_access.
We don't have any user nor implementation using range-based flush. It seems a
consensus that if we ever want something like that again (or even more robust
using 2D, 3D sub-range regions) we can use the upcoming dma-buf sync ioctl for
such.
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1450820214-12509-3-git-send-email-tiago.vignatti@intel.com
Diffstat (limited to 'drivers/dma-buf/dma-buf.c')
-rw-r--r-- | drivers/dma-buf/dma-buf.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 155c1464948e..b2ac13b4ddaa 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c | |||
@@ -539,13 +539,11 @@ EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment); | |||
539 | * preparations. Coherency is only guaranteed in the specified range for the | 539 | * preparations. Coherency is only guaranteed in the specified range for the |
540 | * specified access direction. | 540 | * specified access direction. |
541 | * @dmabuf: [in] buffer to prepare cpu access for. | 541 | * @dmabuf: [in] buffer to prepare cpu access for. |
542 | * @start: [in] start of range for cpu access. | ||
543 | * @len: [in] length of range for cpu access. | ||
544 | * @direction: [in] length of range for cpu access. | 542 | * @direction: [in] length of range for cpu access. |
545 | * | 543 | * |
546 | * Can return negative error values, returns 0 on success. | 544 | * Can return negative error values, returns 0 on success. |
547 | */ | 545 | */ |
548 | int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, size_t start, size_t len, | 546 | int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, |
549 | enum dma_data_direction direction) | 547 | enum dma_data_direction direction) |
550 | { | 548 | { |
551 | int ret = 0; | 549 | int ret = 0; |
@@ -554,8 +552,7 @@ int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, size_t start, size_t len, | |||
554 | return -EINVAL; | 552 | return -EINVAL; |
555 | 553 | ||
556 | if (dmabuf->ops->begin_cpu_access) | 554 | if (dmabuf->ops->begin_cpu_access) |
557 | ret = dmabuf->ops->begin_cpu_access(dmabuf, start, | 555 | ret = dmabuf->ops->begin_cpu_access(dmabuf, direction); |
558 | len, direction); | ||
559 | 556 | ||
560 | return ret; | 557 | return ret; |
561 | } | 558 | } |
@@ -567,19 +564,17 @@ EXPORT_SYMBOL_GPL(dma_buf_begin_cpu_access); | |||
567 | * actions. Coherency is only guaranteed in the specified range for the | 564 | * actions. Coherency is only guaranteed in the specified range for the |
568 | * specified access direction. | 565 | * specified access direction. |
569 | * @dmabuf: [in] buffer to complete cpu access for. | 566 | * @dmabuf: [in] buffer to complete cpu access for. |
570 | * @start: [in] start of range for cpu access. | ||
571 | * @len: [in] length of range for cpu access. | ||
572 | * @direction: [in] length of range for cpu access. | 567 | * @direction: [in] length of range for cpu access. |
573 | * | 568 | * |
574 | * This call must always succeed. | 569 | * This call must always succeed. |
575 | */ | 570 | */ |
576 | void dma_buf_end_cpu_access(struct dma_buf *dmabuf, size_t start, size_t len, | 571 | void dma_buf_end_cpu_access(struct dma_buf *dmabuf, |
577 | enum dma_data_direction direction) | 572 | enum dma_data_direction direction) |
578 | { | 573 | { |
579 | WARN_ON(!dmabuf); | 574 | WARN_ON(!dmabuf); |
580 | 575 | ||
581 | if (dmabuf->ops->end_cpu_access) | 576 | if (dmabuf->ops->end_cpu_access) |
582 | dmabuf->ops->end_cpu_access(dmabuf, start, len, direction); | 577 | dmabuf->ops->end_cpu_access(dmabuf, direction); |
583 | } | 578 | } |
584 | EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access); | 579 | EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access); |
585 | 580 | ||