* [bug report] drm/i915: Load balancing across a virtual engine
@ 2019-05-25 10:05 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-05-25 10:05 UTC (permalink / raw)
To: chris; +Cc: intel-gfx
Hello Chris Wilson,
The patch 6d06779e8672: "drm/i915: Load balancing across a virtual
engine" from May 21, 2019, leads to the following static checker
warning:
drivers/gpu/drm/i915/gt/intel_lrc.c:3338 intel_execlists_create_virtual()
warn: assigning (-2) to unsigned variable 've->base.instance'
drivers/gpu/drm/i915/gt/intel_lrc.c
3315 struct intel_context *
3316 intel_execlists_create_virtual(struct i915_gem_context *ctx,
3317 struct intel_engine_cs **siblings,
3318 unsigned int count)
3319 {
3320 struct virtual_engine *ve;
3321 unsigned int n;
3322 int err;
3323
3324 if (count == 0)
3325 return ERR_PTR(-EINVAL);
3326
3327 if (count == 1)
3328 return intel_context_create(ctx, siblings[0]);
3329
3330 ve = kzalloc(struct_size(ve, siblings, count), GFP_KERNEL);
3331 if (!ve)
3332 return ERR_PTR(-ENOMEM);
3333
3334 ve->base.i915 = ctx->i915;
3335 ve->base.id = -1;
3336 ve->base.class = OTHER_CLASS;
3337 ve->base.uabi_class = I915_ENGINE_CLASS_INVALID;
3338 ve->base.instance = I915_ENGINE_CLASS_INVALID_VIRTUAL;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ve->base.instance is u8 and I915_ENGINE_CLASS_INVALID_VIRTUAL is -2.
3339 ve->base.flags = I915_ENGINE_IS_VIRTUAL;
3340
3341 snprintf(ve->base.name, sizeof(ve->base.name), "virtual");
3342
3343 err = i915_timeline_init(ctx->i915, &ve->base.timeline, NULL);
3344 if (err)
3345 goto err_put;
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-25 10:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-25 10:05 [bug report] drm/i915: Load balancing across a virtual engine Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox