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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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)
+1 −4
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
};

+1 −2
Original line number Diff line number Diff line
@@ -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)