Commit dc194184 authored by Jason Ekstrand's avatar Jason Ekstrand Committed by Daniel Vetter

drm/i915: Drop error handling from dma_fence_work

Asynchronous command parsing was the only thing which ever returned a
non-zero error.  With that gone, we can drop the error handling from
dma_fence_work.
Signed-off-by: default avatarJason Ekstrand <jason@jlekstrand.net>
Reviewed-by: default avatarJon Bloomfield <jon.bloomfield@intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210714193419.1459723-5-jason@jlekstrand.net
parent 7d6a276e
...@@ -24,13 +24,11 @@ static void __do_clflush(struct drm_i915_gem_object *obj) ...@@ -24,13 +24,11 @@ static void __do_clflush(struct drm_i915_gem_object *obj)
i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU); i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);
} }
static int clflush_work(struct dma_fence_work *base) static void clflush_work(struct dma_fence_work *base)
{ {
struct clflush *clflush = container_of(base, typeof(*clflush), base); struct clflush *clflush = container_of(base, typeof(*clflush), base);
__do_clflush(clflush->obj); __do_clflush(clflush->obj);
return 0;
} }
static void clflush_release(struct dma_fence_work *base) static void clflush_release(struct dma_fence_work *base)
......
...@@ -16,11 +16,8 @@ static void fence_complete(struct dma_fence_work *f) ...@@ -16,11 +16,8 @@ static void fence_complete(struct dma_fence_work *f)
static void fence_work(struct work_struct *work) static void fence_work(struct work_struct *work)
{ {
struct dma_fence_work *f = container_of(work, typeof(*f), work); struct dma_fence_work *f = container_of(work, typeof(*f), work);
int err;
err = f->ops->work(f); f->ops->work(f);
if (err)
dma_fence_set_error(&f->dma, err);
fence_complete(f); fence_complete(f);
dma_fence_put(&f->dma); dma_fence_put(&f->dma);
......
...@@ -17,7 +17,7 @@ struct dma_fence_work; ...@@ -17,7 +17,7 @@ struct dma_fence_work;
struct dma_fence_work_ops { struct dma_fence_work_ops {
const char *name; const char *name;
int (*work)(struct dma_fence_work *f); void (*work)(struct dma_fence_work *f);
void (*release)(struct dma_fence_work *f); void (*release)(struct dma_fence_work *f);
}; };
......
...@@ -300,14 +300,13 @@ struct i915_vma_work { ...@@ -300,14 +300,13 @@ struct i915_vma_work {
unsigned int flags; unsigned int flags;
}; };
static int __vma_bind(struct dma_fence_work *work) static void __vma_bind(struct dma_fence_work *work)
{ {
struct i915_vma_work *vw = container_of(work, typeof(*vw), base); struct i915_vma_work *vw = container_of(work, typeof(*vw), base);
struct i915_vma *vma = vw->vma; struct i915_vma *vma = vw->vma;
vma->ops->bind_vma(vw->vm, &vw->stash, vma->ops->bind_vma(vw->vm, &vw->stash,
vma, vw->cache_level, vw->flags); vma, vw->cache_level, vw->flags);
return 0;
} }
static void __vma_release(struct dma_fence_work *work) static void __vma_release(struct dma_fence_work *work)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment