From: Dan Carpenter <dan.carpenter@oracle.com>
To: chris@chris-wilson.co.uk
Cc: intel-gfx@lists.freedesktop.org
Subject: [bug report] drm/i915: Load balancing across a virtual engine
Date: Sat, 25 May 2019 13:05:11 +0300 [thread overview]
Message-ID: <20190525100511.GA26176@mwanda> (raw)
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
reply other threads:[~2019-05-25 10:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190525100511.GA26176@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox