From: "K V P, Satyanarayana" <satyanarayana.k.v.p@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH 1/5] drm/xe/guc: Rename xe_guc_register_exec_queue
Date: Fri, 5 Sep 2025 12:35:53 +0530 [thread overview]
Message-ID: <e6e17151-dcea-42e8-a9ae-2f1fc67d5b53@intel.com> (raw)
In-Reply-To: <20250904192918.7346-2-michal.wajdeczko@intel.com>
On 05-09-2025 00:59, Michal Wajdeczko wrote:
> This function is dedicated for use by the VFs, we shouldn't use
> name that might suggests it's general purpose. While there, update
> asserts to better reflect intended usage.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_submit.c | 14 ++++++++------
> drivers/gpu/drm/xe/xe_guc_submit.h | 2 +-
> drivers/gpu/drm/xe/xe_sriov_vf_ccs.c | 5 ++---
> 3 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 1185b23b1384..f2920b047b2c 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -2528,7 +2528,7 @@ static void guc_exec_queue_print(struct xe_exec_queue *q, struct drm_printer *p)
> }
>
> /**
> - * xe_guc_register_exec_queue - Register exec queue for a given context type.
> + * xe_guc_register_vf_exec_queue - Register exec queue for a given context type.
> * @q: Execution queue
> * @ctx_type: Type of the context
> *
> @@ -2539,15 +2539,17 @@ static void guc_exec_queue_print(struct xe_exec_queue *q, struct drm_printer *p)
> *
> * Returns - None.
> */
> -void xe_guc_register_exec_queue(struct xe_exec_queue *q, int ctx_type)
> +void xe_guc_register_vf_exec_queue(struct xe_exec_queue *q, int ctx_type)
> {
> struct xe_guc *guc = exec_queue_to_guc(q);
> struct xe_device *xe = guc_to_xe(guc);
> + struct xe_gt *gt = guc_to_gt(guc);
>
> - xe_assert(xe, IS_SRIOV_VF(xe));
> - xe_assert(xe, !IS_DGFX(xe));
> - xe_assert(xe, (ctx_type > GUC_CONTEXT_NORMAL &&
> - ctx_type < GUC_CONTEXT_COUNT));
> + xe_gt_assert(gt, IS_SRIOV_VF(xe));
> + xe_gt_assert(gt, !IS_DGFX(xe));
> + xe_gt_assert(gt, ctx_type == GUC_CONTEXT_COMPRESSION_SAVE ||
> + ctx_type == GUC_CONTEXT_COMPRESSION_RESTORE);
> + xe_gt_assert(gt, GUC_SUBMIT_VER(guc) >= MAKE_GUC_VER(1, 23, 0));
>
> register_exec_queue(q, ctx_type);
> enable_scheduling(q);
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.h b/drivers/gpu/drm/xe/xe_guc_submit.h
> index 6b5df5d0956b..9e6f19b03e65 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.h
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.h
> @@ -46,7 +46,7 @@ xe_guc_exec_queue_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snaps
> void
> xe_guc_exec_queue_snapshot_free(struct xe_guc_submit_exec_queue_snapshot *snapshot);
> void xe_guc_submit_print(struct xe_guc *guc, struct drm_printer *p);
> -void xe_guc_register_exec_queue(struct xe_exec_queue *q, int ctx_type);
> +void xe_guc_register_vf_exec_queue(struct xe_exec_queue *q, int ctx_type);
>
> int xe_guc_contexts_hwsp_rebase(struct xe_guc *guc, void *scratch);
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> index 908590fa79d4..19786f64a7da 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> @@ -186,7 +186,6 @@ static void ccs_rw_update_ring(struct xe_tile_vf_ccs *ctx)
>
> static int register_save_restore_context(struct xe_tile_vf_ccs *ctx)
> {
> - int err = -EINVAL;
> int ctx_type;
>
> switch (ctx->ctx_id) {
> @@ -197,10 +196,10 @@ static int register_save_restore_context(struct xe_tile_vf_ccs *ctx)
> ctx_type = GUC_CONTEXT_COMPRESSION_RESTORE;
> break;
> default:
> - return err;
> + return -EINVAL;
> }
>
> - xe_guc_register_exec_queue(ctx->mig_q, ctx_type);
> + xe_guc_register_vf_exec_queue(ctx->mig_q, ctx_type);
> return 0;
> }
>
LGTM.
Reviewed-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
next prev parent reply other threads:[~2025-09-05 7:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 19:29 [PATCH 0/5] Small improvements around VF CCS Michal Wajdeczko
2025-09-04 19:29 ` [PATCH 1/5] drm/xe/guc: Rename xe_guc_register_exec_queue Michal Wajdeczko
2025-09-05 7:05 ` K V P, Satyanarayana [this message]
2025-09-04 19:29 ` [PATCH 2/5] drm/xe/guc: Use proper flag definitions when registering context Michal Wajdeczko
2025-09-04 19:36 ` Matthew Brost
2025-09-04 19:29 ` [PATCH 3/5] drm/xe/vf: Drop IS_VF_CCS_INIT_NEEDED macro Michal Wajdeczko
2025-09-05 3:27 ` Matthew Brost
2025-09-05 7:18 ` K V P, Satyanarayana
2025-09-04 19:29 ` [PATCH 4/5] drm/xe/vf: Use single check when calling VF CCS functions Michal Wajdeczko
2025-09-05 7:40 ` K V P, Satyanarayana
2025-09-04 19:29 ` [PATCH 5/5] drm/xe/bo: Add xe_bo_has_valid_ccs_bb helper Michal Wajdeczko
2025-09-04 20:31 ` Matthew Brost
2025-09-05 7:42 ` K V P, Satyanarayana
2025-09-04 19:36 ` ✓ CI.KUnit: success for Small improvements around VF CCS Patchwork
2025-09-04 20:19 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-05 11:55 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-05 12:34 ` Michal Wajdeczko
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=e6e17151-dcea-42e8-a9ae-2f1fc67d5b53@intel.com \
--to=satyanarayana.k.v.p@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@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 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.