summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-01-04 14:12:22 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-09 22:01:56 +0100
commitf5e0724e76c2c8efb4d3dc43c24228b409bbbfe9 (patch)
tree6b29c9cc8e91ea4923c6dd8eb90d1ef888540d63 /drivers/dma-buf
parentd3b029a44e14f5226fd9b410a0a70eb9b7ed6beb (diff)
dma-fence: Introduce drm_fence_set_error() helper
commit a009e975da5c7d42a7f5eaadc54946eb5f76c9af upstream. The dma_fence.error field (formerly known as dma_fence.status) is an optional field that may be set by drivers before calling dma_fence_signal(). The field can be used to indicate that the fence was completed in err rather than with success, and is visible to other consumers of the fence and to userspace via sync_file. This patch renames the field from status to error so that its meaning is hopefully more clear (and distinct from dma_fence_get_status() which is a composite between the error state and signal state) and adds a helper that validates the preconditions of when it is suitable to adjust the error field. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-3-chris@chris-wilson.co.uk [s/dma_fence/fence/g - gregkh] Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/fence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf/fence.c
index c7a0eefb93ab..04bf29808200 100644
--- a/drivers/dma-buf/fence.c
+++ b/drivers/dma-buf/fence.c
@@ -551,7 +551,7 @@ fence_init(struct fence *fence, const struct fence_ops *ops,
fence->context = context;
fence->seqno = seqno;
fence->flags = 0UL;
- fence->status = 0;
+ fence->error = 0;
trace_fence_init(fence);
}