From: sashiko-bot@kernel.org
To: "Jia Yao" <jia.yao@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v10] drm/i915/dg2: Add per-client control for Wa_22013059131
Date: Mon, 28 Sep 2026 03:28:17 +0000 [thread overview]
Message-ID: <20260928032818.0F4881F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260928031341.2958178-1-jia.yao@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/i915: missing WA_22013059131 in ctx_setparam breaks uAPI for default context
--
commit 6bbdc7d4f28ec7ac3f465eca7548193f1bf2364e
Author: Jia Yao <jia.yao@intel.com>
Subject: drm/i915/dg2: Add per-client control for Wa_22013059131
This commit introduces a new context parameter I915_CONTEXT_PARAM_WA_22013059131
to allow userspace to handle the SLM contention workaround itself. It tracks the
opt-out per client and latches the value once before any context is submitted.
Link: https://github.com/intel/compute-runtime/pull/919
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index c58ffa5a8fa6f..2a9141e83936c 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
[ ... ]
> @@ -918,6 +941,15 @@ static int set_proto_ctx_param(struct drm_i915_file_private *fpriv,
> ret = -EINVAL;
> break;
>
> + case I915_CONTEXT_PARAM_WA_22013059131:
> + if (args->size)
> + ret = -EINVAL;
> + else if (!IS_DG2_G11(i915))
> + ret = -ENODEV;
> + else
> + ret = set_client_wa_22013059131(fpriv, args->value);
> + break;
> +
[Severity: High]
Does this missing implementation in ctx_setparam() break the uAPI for the
default context?
The parameter is added here in set_proto_ctx_param(), but it appears to be
missing from ctx_setparam() and i915_gem_context_getparam_ioctl().
Because the default context (id 0) is fully finalized during
i915_gem_context_open(), it is not a proto-context. When userspace attempts
to set this parameter on ctx_id = 0, i915_gem_context_setparam_ioctl()
routes the call to ctx_setparam() instead:
i915_gem_context_setparam_ioctl()
ctx = i915_gem_context_lookup(file_priv, args->ctx_id);
if (ctx) {
ret = ctx_setparam(file_priv, ctx, args);
...
}
Since ctx_setparam() lacks this new case, it will fall through to the
-EINVAL default case, which prevents userspace from configuring this
workaround on the default context as documented.
Additionally, because it is missing from i915_gem_context_getparam_ioctl(),
the new UAPI parameter is strictly write-only and impossible to query.
[ ... ]
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 535cb68fdb5c4..a9821e2cc3a26 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
[ ... ]
> + * any context of the client being submitted for the first time. A later
> + * request for the opposite value fails with -EINVAL. Userspace that wants
> + * to opt out must therefore do so before submitting any work on this fd,
> + * including via the default context (id 0) created on open().
> + *
> + * Note: LSC_CHICKEN_BIT_0_UDW MAXREQS_PER_BANK (bits 39:37) is the
> + * other part of Wa_22013059131 and remains unconditionally programmed
> + * by the kernel regardless of this setting. DG2-G11 only.
> + */
> +#define I915_CONTEXT_PARAM_WA_22013059131 0x10
[Severity: Low]
Can this documentation be fulfilled if the parameter is rejected for the
default context?
The documentation states that userspace can opt out via the default context
(id 0) created on open, but because the parameter is only handled for
proto-contexts, that ioctl request will fail with -EINVAL.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928031341.2958178-1-jia.yao@intel.com?part=1
next prev parent reply other threads:[~2026-09-28 3:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 22:39 [PATCH v9] drm/i915/dg2: Add per-context control for Wa_22013059131 Jia Yao
2026-06-30 23:40 ` ✓ i915.CI.BAT: success for drm/i915/dg2: Add per-context control for Wa_22013059131 (rev10) Patchwork
[not found] ` <20260630225349.984AB1F000E9@smtp.kernel.org>
[not found] ` <178290749714.224587.15234445443946207851@jlahtine-mobl>
2026-07-01 16:47 ` [PATCH v9] drm/i915/dg2: Add per-context control for Wa_22013059131 Joonas Lahtinen
2026-09-21 17:33 ` Yao, Jia
2026-09-22 6:46 ` Joonas Lahtinen
2026-09-22 14:34 ` Yao, Jia
2026-09-23 6:52 ` Joonas Lahtinen
2026-09-23 16:01 ` Yao, Jia
2026-09-23 16:54 ` Joonas Lahtinen
2026-09-23 18:06 ` Yao, Jia
2026-09-23 20:29 ` Matt Roper
2026-09-23 21:20 ` Yao, Jia
2026-09-24 7:21 ` Joonas Lahtinen
2026-09-24 17:58 ` Yao, Jia
2026-07-01 17:22 ` ✗ i915.CI.Full: failure for drm/i915/dg2: Add per-context control for Wa_22013059131 (rev10) Patchwork
2026-09-28 3:13 ` [PATCH v10] drm/i915/dg2: Add per-client control for Wa_22013059131 Jia Yao
2026-09-28 3:28 ` sashiko-bot [this message]
2026-09-28 3:57 ` ✓ i915.CI.BAT: success for drm/i915/dg2: Add per-context control for Wa_22013059131 (rev11) Patchwork
2026-09-29 17:23 ` [PATCH v11] drm/i915/dg2: Add per-client control for Wa_22013059131 Jia Yao
2026-09-29 17:44 ` sashiko-bot
2026-09-29 19:56 ` ✓ i915.CI.BAT: success for drm/i915/dg2: Add per-context control for Wa_22013059131 (rev12) Patchwork
2026-09-30 2:11 ` ✓ i915.CI.Full: " Patchwork
2026-09-30 17:13 ` [PATCH v12] drm/i915/dg2: Add per-client control for Wa_22013059131 Jia Yao
2026-09-30 17:25 ` sashiko-bot
2026-09-30 18:32 ` Yao, Jia
2026-09-30 22:26 ` ✓ i915.CI.BAT: success for drm/i915/dg2: Add per-context control for Wa_22013059131 (rev13) Patchwork
2026-10-01 17:35 ` ✗ i915.CI.Full: failure " Patchwork
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=20260928032818.0F4881F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jia.yao@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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