]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Drop error handling from dma_fence_work
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 14 Jul 2021 19:34:18 +0000 (14:34 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 16 Jul 2021 19:47:39 +0000 (21:47 +0200)
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
drivers/gpu/drm/i915/gem/i915_gem_clflush.c
drivers/gpu/drm/i915/i915_sw_fence_work.c
drivers/gpu/drm/i915/i915_sw_fence_work.h
drivers/gpu/drm/i915/i915_vma.c

index daf9284ef1f5408e4536a927e57fa85a79ec28a9..f0435c6feb68b579ee7086b12407748635628ebe 100644 (file)
@@ -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)
index a3a81bb8f2c36ffb97bb2b99ad4510ffbdc7258a..5b33ef23d54c9728dc95ed3fb4219e11d17c74ff 100644 (file)
@@ -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);
index 2c409f11c5c5979931ba119e8044e8db0c460888..d56806918d1314128e81cc10f3a9de3dfbad6c56 100644 (file)
@@ -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);
 };
 
index 0f227f28b2802effbc2838394316747448668e0c..5b9dce0f443b034e65711c03f710548b9755417f 100644 (file)
@@ -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)