From: Jani Nikula <jani.nikula@linux.intel.com>
To: Julia Filipchuk <julia.filipchuk@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: John Harrison <John.C.Harrison@intel.com>,
Julia Filipchuk <julia.filipchuk@intel.com>
Subject: Re: [PATCH] drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
Date: Tue, 22 Apr 2025 12:13:30 +0300 [thread overview]
Message-ID: <87ikmw1rut.fsf@intel.com> (raw)
In-Reply-To: <20250418233918.2217759-1-julia.filipchuk@intel.com>
On Fri, 18 Apr 2025, Julia Filipchuk <julia.filipchuk@intel.com> wrote:
> For newer platforms (post DG2) hardware intentionally stalls on
> submisstion of concurrent RCS and CCS of different address spaces. With
> this workaround GuC will never schedule such conlicting contexts;
> preventing detection of a stall as a hang.
>
> GuC specs recommend to enable this for all platforms starting from MTL
> supporting CCS.
>
> Signed-off-by: Julia Filipchuk <julia.filipchuk@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_gt.h | 8 ++++++++
> drivers/gpu/drm/i915/gt/uc/intel_guc.c | 9 ++++++---
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
> index 998ca029b73a..2f86b2291826 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.h
> @@ -24,6 +24,14 @@ struct drm_printer;
> GRAPHICS_VER_FULL((gt)->i915) >= (from) && \
> GRAPHICS_VER_FULL((gt)->i915) <= (until)))
>
> +/*
> + * Check that the GT is a graphics GT and has atleast minimum IP version.
> + */
> +#define IS_GFX_GT_IP_ATLEAST(gt, from) ( \
> + BUILD_BUG_ON_ZERO((from) < IP_VER(2, 0)) + \
> + ((gt)->type != GT_MEDIA && \
> + GRAPHICS_VER_FULL((gt)->i915) >= (from)))
> +
> /*
> * Check that the GT is a media GT and has an IP version within the
> * specified range (inclusive).
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> index 9df80c325fc1..70c83c1588e9 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> @@ -313,8 +313,12 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
> *
> * The same WA bit is used for both and 22011391025 is applicable to
> * all DG2.
> + *
> + * Platforms post DG2 prevent behavior in hardware. This is implicitly
> + * enabled to give guc management over CCS scheduling.
> */
> - if (IS_DG2(gt->i915))
> + if (IS_DG2(gt->i915) ||
> + (CCS_MASK(gt) && IS_GFX_GT_IP_ATLEAST(gt, IP_VER(12, 70))))
> flags |= GUC_WA_DUAL_QUEUE;
GRAPHICS_VER_FULL((gt)->i915) >= IP_VER(12, 70)
You don't need an extra macro for a single use case that is covered by
existing macros.
BR,
Jani.
>
> /* Wa_22011802037: graphics version 11/12 */
> @@ -322,8 +326,7 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
> flags |= GUC_WA_PRE_PARSER;
>
> /*
> - * Wa_22012727170
> - * Wa_22012727685
> + * Wa_22012727170 Wa_22012727685
> */
> if (IS_DG2_G11(gt->i915))
> flags |= GUC_WA_CONTEXT_ISOLATION;
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-04-22 9:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 23:39 [PATCH] drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms Julia Filipchuk
2025-04-19 0:08 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2025-04-19 0:08 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-04-19 8:25 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-22 9:13 ` Jani Nikula [this message]
2025-04-29 1:05 ` [PATCH] " Julia Filipchuk
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=87ikmw1rut.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=John.C.Harrison@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=julia.filipchuk@intel.com \
/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