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: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jon Bloomfield <jon.bloomfield@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210714193419.1459723-5-jason@jlekstrand.net
This commit is contained in:
Jason Ekstrand 2021-07-14 14:34:18 -05:00 коммит произвёл Daniel Vetter
Родитель 7d6a276e2f
Коммит dc194184d0
4 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -24,13 +24,11 @@ static void __do_clflush(struct drm_i915_gem_object *obj)
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);
__do_clflush(clflush->obj);
return 0;
}
static void clflush_release(struct dma_fence_work *base)

Просмотреть файл

@ -16,11 +16,8 @@ static void fence_complete(struct dma_fence_work *f)
static void fence_work(struct work_struct *work)
{
struct dma_fence_work *f = container_of(work, typeof(*f), work);
int err;
err = f->ops->work(f);
if (err)
dma_fence_set_error(&f->dma, err);
f->ops->work(f);
fence_complete(f);
dma_fence_put(&f->dma);

Просмотреть файл

@ -17,7 +17,7 @@ struct dma_fence_work;
struct dma_fence_work_ops {
const char *name;
int (*work)(struct dma_fence_work *f);
void (*work)(struct dma_fence_work *f);
void (*release)(struct dma_fence_work *f);
};

Просмотреть файл

@ -300,14 +300,13 @@ struct i915_vma_work {
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 *vma = vw->vma;
vma->ops->bind_vma(vw->vm, &vw->stash,
vma, vw->cache_level, vw->flags);
return 0;
}
static void __vma_release(struct dma_fence_work *work)