From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Use a modparam to restrict exposed engines
Date: Sat, 5 Oct 2019 13:10:45 +0300 [thread overview]
Message-ID: <20191005101013.GA7645@intel.intel> (raw)
In-Reply-To: <20191001135403.2026-1-chris@chris-wilson.co.uk>
Hi Chris,
On Tue, Oct 01, 2019 at 02:54:02PM +0100, Chris Wilson wrote:
> Allow the user to restrict the available set of engines via a module
> parameter.
what is the driving reason for wanting this? Could you explain it
in the commit log?
It feels a bit confusing, though. You are actually making a
difference between engines we don't have and engines we don't
want, and I don't see why.
Wouldn't it make sense to either
- define a new architecture (which could make things more
confusing).
or
- have it specified in kernel configuration
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Stuart Summers <stuart.summers@intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Martin Peres <martin.peres@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 35 ++++++++++++++++-------
> drivers/gpu/drm/i915/i915_gem.c | 5 ++++
> drivers/gpu/drm/i915/i915_params.c | 4 +++
> drivers/gpu/drm/i915/i915_params.h | 1 +
> 4 files changed, 35 insertions(+), 10 deletions(-)
Because this is a module option that is set by the user, I don't
see any documentation about it.
> +static bool engine_available(struct drm_i915_private *i915, int id)
> +{
> + /* uAPI -- modparam bits must be consistent between kernels */
> + static const unsigned int param_bit[] = {
> + [RCS0] = BIT(0),
> + [VCS0] = BIT(1),
> + [BCS0] = BIT(2),
> + [VECS0] = BIT(3),
> + [VCS1] = BIT(4),
> + [VCS2] = BIT(5),
> + [VCS3] = BIT(6),
> + [VECS1] = BIT(7),
> + };
Yet another way to refer to engines... this time inside a static
function, without any visibility outside.
Andi
> +
> + if (!HAS_ENGINE(i915, id))
> + return false;
(engines we don't have...
> + if (!(i915_modparams.engines & param_bit[id]))
> + return false;
... engines we don't want)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-05 10:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 13:54 [PATCH 1/2] drm/i915: Use a modparam to restrict exposed engines Chris Wilson
2019-10-01 13:54 ` [PATCH 2/2] drm/i915/tgl: Restrict availables engines to rcs0 by default Chris Wilson
2019-10-08 15:17 ` Summers, Stuart
2019-10-01 16:36 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Use a modparam to restrict exposed engines Patchwork
2019-10-01 16:59 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-10-01 17:48 ` [PATCH 1/2] " kbuild test robot
2019-10-01 17:48 ` [Intel-gfx] " kbuild test robot
2019-10-01 18:21 ` kbuild test robot
2019-10-01 18:21 ` [Intel-gfx] " kbuild test robot
2019-10-01 21:54 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Use a modparam to restrict exposed engines (rev2) Patchwork
2019-10-01 22:20 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-02 8:38 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-10-05 10:10 ` Andi Shyti [this message]
2019-10-05 10:20 ` [PATCH 1/2] drm/i915: Use a modparam to restrict exposed engines Chris Wilson
2019-10-08 15:21 ` Summers, Stuart
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=20191005101013.GA7645@intel.intel \
--to=andi.shyti@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.