From: Matthew Brost <matthew.brost@intel.com>
To: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v3 17/18] drm/xe/doc: Add documentation for Multi Queue Group GuC interface
Date: Fri, 21 Nov 2025 22:10:32 -0800 [thread overview]
Message-ID: <aSFT2AXzPg2yM7/o@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251121035147.766072-37-niranjana.vishwanathapura@intel.com>
On Thu, Nov 20, 2025 at 07:51:51PM -0800, Niranjana Vishwanathapura wrote:
> Add kernel documentation for Multi Queue group GuC interface.
>
> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> Documentation/gpu/xe/xe_exec_queue.rst | 8 ++++
> drivers/gpu/drm/xe/xe_exec_queue.c | 3 ++
> drivers/gpu/drm/xe/xe_guc_submit.c | 57 ++++++++++++++++++++++++++
> 3 files changed, 68 insertions(+)
>
> diff --git a/Documentation/gpu/xe/xe_exec_queue.rst b/Documentation/gpu/xe/xe_exec_queue.rst
> index 732af4741df4..8707806211c9 100644
> --- a/Documentation/gpu/xe/xe_exec_queue.rst
> +++ b/Documentation/gpu/xe/xe_exec_queue.rst
> @@ -13,6 +13,14 @@ Multi Queue Group
> .. kernel-doc:: drivers/gpu/drm/xe/xe_exec_queue.c
> :doc: Multi Queue Group
>
> +.. _multi-queue-group-guc-interface:
> +
> +Multi Queue Group GuC interface
> +===============================
> +
> +.. kernel-doc:: drivers/gpu/drm/xe/xe_guc_submit.c
> + :doc: Multi Queue Group GuC interface
> +
> Internal API
> ============
>
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index 50326b4431e0..387497dfd5b1 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -97,6 +97,9 @@
> * When GuC reports an error on any of the queues of a multi queue group,
> * the queue cleanup mechanism is invoked for all the queues of the group
> * as hardware cannot make progress on the multi queue context.
> + *
> + * Refer :ref:`multi-queue-group-guc-interface` for multi queue group GuC
> + * interface.
> */
>
> enum xe_exec_queue_sched_prop {
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index fbe3de30af60..86946760ad0f 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -659,6 +659,63 @@ static void set_exec_queue_group_banned(struct xe_exec_queue *q)
> xe_map_wr_field(xe_, &map_, 0, struct guc_submit_parallel_scratch, \
> field_, val_)
>
> +/**
> + * DOC: Multi Queue Group GuC interface
> + *
> + * The multi queue group coordination between KMD and GuC is through a software
> + * construct called Context Group Page (CGP). The CGP is a KMD managed 4KB page
> + * allocated in the global GTT.
> + *
> + * CGP format:
> + *
> + * +-----------+---------------------------+---------------------------------------------+
> + * | DWORD | Name | Description |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 0 | Version | Bits [15:8]=Major ver, [7:0]=Minor ver |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 1..15 | RESERVED | MBZ |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 16 | KMD_QUEUE_UPDATE_MASK_DW0 | KMD queue mask for queues 31..0 |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 17 | KMD_QUEUE_UPDATE_MASK_DW1 | KMD queue mask for queues 63..32 |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 18..31 | RESERVED | MBZ |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 32 | Q0CD_DW0 | Queue 0 context LRC descriptor lower DWORD |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 33 | Q0ContextIndex | Context ID for Queue 0 |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 34 | Q1CD_DW0 | Queue 1 context LRC descriptor lower DWORD |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 35 | Q1ContextIndex | Context ID for Queue 1 |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | ... |... | ... |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 158 | Q63CD_DW0 | Queue 63 context LRC descriptor lower DWORD |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 159 | Q63ContextIndex | Context ID for Queue 63 |
> + * +-----------+---------------------------+---------------------------------------------+
> + * | 160..1024 | RESERVED | MBZ |
> + * +-----------+---------------------------+---------------------------------------------+
> + *
> + * While registering Q0 with GuC, CGP is updated with Q0 entry and GuC is notified
> + * through XE_GUC_ACTION_REGISTER_CONTEXT_MULTI_QUEUE H2G message which specifies
> + * the CGP address. When the secondary queues are added to the group, the CGP is
> + * updated with entry for that queue and GuC is notified through the H2G interface
> + * XE_GUC_ACTION_MULTI_QUEUE_CONTEXT_CGP_SYNC. GuC responds to these H2G messages
> + * with a XE_GUC_ACTION_NOTIFY_MULTIQ_CONTEXT_CGP_SYNC_DONE G2H message. GuC also
> + * sends a XE_GUC_ACTION_NOTIFY_MULTI_QUEUE_CGP_CONTEXT_ERROR notification for any
> + * error in the CGP. Only one of these CGP update messages can be outstanding
> + * (waiting for GuC response) at any time. The bits in KMD_QUEUE_UPDATE_MASK_DW*
> + * fields indicate which queue entry is being updated in the CGP.
> + *
> + * The primary queue (Q0) represents the multi queue group context in GuC and
> + * submission on any queue of the group must be through Q0 GuC interface only.
> + *
> + * As it is not required to register secondary queues with GuC, the secondary queue
> + * context ids in the CGP are populated with Q0 context id.
> + */
> +
> #define CGP_VERSION_MAJOR_SHIFT 8
>
> static void xe_guc_exec_queue_group_cgp_update(struct xe_device *xe,
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-11-22 6:10 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 3:51 [PATCH v3 00/18] drm/xe: Multi Queue feature support Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 01/18] drm/xe/multi_queue: Add multi_queue_enable_mask to gt information Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 02/18] drm/xe/multi_queue: Add user interface for multi queue support Niranjana Vishwanathapura
2025-11-21 22:51 ` Matthew Brost
2025-11-22 4:35 ` Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 03/18] drm/xe/multi_queue: Add GuC " Niranjana Vishwanathapura
2025-11-22 22:16 ` Matthew Brost
2025-12-03 3:40 ` Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 04/18] drm/xe/multi_queue: Add multi queue priority property Niranjana Vishwanathapura
2025-11-21 22:57 ` Matthew Brost
2025-11-21 3:51 ` [PATCH v3 05/18] drm/xe/multi_queue: Handle invalid exec queue property setting Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 06/18] drm/xe/multi_queue: Add exec_queue set_property ioctl support Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 07/18] drm/xe/multi_queue: Add support for multi queue dynamic priority change Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 08/18] drm/xe/multi_queue: Add multi queue information to guc_info dump Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 09/18] drm/xe/multi_queue: Handle tearing down of a multi queue Niranjana Vishwanathapura
2025-11-21 23:03 ` Matthew Brost
2025-11-22 4:40 ` Niranjana Vishwanathapura
2025-11-22 5:47 ` Matthew Brost
2025-12-09 3:31 ` Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 10/18] drm/xe/multi_queue: Set QUEUE_DRAIN_MODE for Multi Queue batches Niranjana Vishwanathapura
2025-11-24 18:49 ` Matt Roper
2025-12-02 21:28 ` Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 11/18] drm/xe/multi_queue: Handle CGP context error Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 12/18] drm/xe/multi_queue: Reset GT upon CGP_SYNC failure Niranjana Vishwanathapura
2025-11-21 23:08 ` Matthew Brost
2025-11-21 3:51 ` [PATCH v3 13/18] drm/xe/multi_queue: Tracepoint support Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 14/18] drm/xe/multi_queue: Support active group after primary is destroyed Niranjana Vishwanathapura
2025-11-22 5:57 ` Matthew Brost
2025-11-22 6:08 ` Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 15/18] drm/xe/xe3p: Disable GuC Dynamic ICS for Xe3p Niranjana Vishwanathapura
2025-11-21 3:51 ` [PATCH v3 16/18] drm/xe/doc: Add documentation for Multi Queue Group Niranjana Vishwanathapura
2025-11-22 6:02 ` Matthew Brost
2025-11-21 3:51 ` [PATCH v3 17/18] drm/xe/doc: Add documentation for Multi Queue Group GuC interface Niranjana Vishwanathapura
2025-11-22 6:10 ` Matthew Brost [this message]
2025-11-21 3:51 ` [PATCH v3 18/18] drm/xe/multi_queue: Enable multi_queue on xe3p_xpc Niranjana Vishwanathapura
2025-11-21 4:01 ` ✗ CI.checkpatch: warning for drm/xe: Multi Queue feature support (rev3) Patchwork
2025-11-21 4:02 ` ✓ CI.KUnit: success " Patchwork
2025-11-21 4:51 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-11-21 8:10 ` ✗ Xe.CI.Full: " Patchwork
2025-11-24 14:04 ` Patchwork
2025-11-27 9:38 ` [PATCH v3 00/18] drm/xe: Multi Queue feature support Hoppe, Mateusz
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=aSFT2AXzPg2yM7/o@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=niranjana.vishwanathapura@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