]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gem: Return void from context_apply_all
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 8 Jul 2021 15:48:10 +0000 (10:48 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Jul 2021 17:43:57 +0000 (19:43 +0200)
None of the callbacks we use with it return an error code anymore; they
all return 0 unconditionally.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210708154835.528166-6-jason@jlekstrand.net
drivers/gpu/drm/i915/gem/i915_gem_context.c

index 9750a1ac7023e6470f5abc440f6fce9150880a2a..3503d46c88cbf8c91d3c633c89411e4ac4cd7e55 100644 (file)
@@ -718,32 +718,25 @@ __context_engines_await(const struct i915_gem_context *ctx,
        return engines;
 }
 
-static int
+static void
 context_apply_all(struct i915_gem_context *ctx,
-                 int (*fn)(struct intel_context *ce, void *data),
+                 void (*fn)(struct intel_context *ce, void *data),
                  void *data)
 {
        struct i915_gem_engines_iter it;
        struct i915_gem_engines *e;
        struct intel_context *ce;
-       int err = 0;
 
        e = __context_engines_await(ctx, NULL);
-       for_each_gem_engine(ce, e, it) {
-               err = fn(ce, data);
-               if (err)
-                       break;
-       }
+       for_each_gem_engine(ce, e, it)
+               fn(ce, data);
        i915_sw_fence_complete(&e->fence);
-
-       return err;
 }
 
-static int __apply_ppgtt(struct intel_context *ce, void *vm)
+static void __apply_ppgtt(struct intel_context *ce, void *vm)
 {
        i915_vm_put(ce->vm);
        ce->vm = i915_vm_get(vm);
-       return 0;
 }
 
 static struct i915_address_space *
@@ -783,10 +776,9 @@ static void __set_timeline(struct intel_timeline **dst,
                intel_timeline_put(old);
 }
 
-static int __apply_timeline(struct intel_context *ce, void *timeline)
+static void __apply_timeline(struct intel_context *ce, void *timeline)
 {
        __set_timeline(&ce->timeline, timeline);
-       return 0;
 }
 
 static void __assign_timeline(struct i915_gem_context *ctx,
@@ -1841,19 +1833,17 @@ set_persistence(struct i915_gem_context *ctx,
        return __context_set_persistence(ctx, args->value);
 }
 
-static int __apply_priority(struct intel_context *ce, void *arg)
+static void __apply_priority(struct intel_context *ce, void *arg)
 {
        struct i915_gem_context *ctx = arg;
 
        if (!intel_engine_has_timeslices(ce->engine))
-               return 0;
+               return;
 
        if (ctx->sched.priority >= I915_PRIORITY_NORMAL)
                intel_context_set_use_semaphores(ce);
        else
                intel_context_clear_use_semaphores(ce);
-
-       return 0;
 }
 
 static int set_priority(struct i915_gem_context *ctx,