From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Split GuC communication initialization
Date: Thu, 11 Jan 2024 16:43:09 +0000 [thread overview]
Message-ID: <ZaAanbaUDat36k36@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240111162051.585-1-michal.wajdeczko@intel.com>
On Thu, Jan 11, 2024 at 05:20:51PM +0100, Michal Wajdeczko wrote:
> Soon we will be trying to communicate with the GuC firmware very
> early during VF driver probe, before we finish normal init steps.
> Split GuC communication initialization code so the GuC MMIO based
> communication xe_guc_mmio_send() functions will work where needed.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 21 +++++++++++++++++----
> drivers/gpu/drm/xe/xe_guc.h | 1 +
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 6e73ebf67251..0fd9b5efe4c2 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -243,6 +243,22 @@ static void guc_fini(struct drm_device *drm, void *arg)
> xe_force_wake_put(gt_to_fw(guc_to_gt(guc)), XE_FORCEWAKE_ALL);
> }
>
> +/**
> + * xe_guc_comm_init_early - early initialization of GuC communication
> + * @guc: the &xe_guc to initialize
> + *
> + * Must be called prior to first MMIO communication with GuC firmware.
> + */
> +void xe_guc_comm_init_early(struct xe_guc *guc)
> +{
> + struct xe_gt *gt = guc_to_gt(guc);
> +
> + if (xe_gt_is_media_type(gt))
> + guc->notify_reg = MED_GUC_HOST_INTERRUPT;
> + else
> + guc->notify_reg = GUC_HOST_INTERRUPT;
> +}
> +
> int xe_guc_init(struct xe_guc *guc)
> {
> struct xe_device *xe = guc_to_xe(guc);
> @@ -283,10 +299,7 @@ int xe_guc_init(struct xe_guc *guc)
>
> guc_init_params(guc);
>
> - if (xe_gt_is_media_type(gt))
> - guc->notify_reg = MED_GUC_HOST_INTERRUPT;
> - else
> - guc->notify_reg = GUC_HOST_INTERRUPT;
> + xe_guc_comm_init_early(guc);
>
> xe_uc_fw_change_status(&guc->fw, XE_UC_FIRMWARE_LOADABLE);
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.h b/drivers/gpu/drm/xe/xe_guc.h
> index d3e49e7fd7c3..94f2dc5f6f90 100644
> --- a/drivers/gpu/drm/xe/xe_guc.h
> +++ b/drivers/gpu/drm/xe/xe_guc.h
> @@ -13,6 +13,7 @@
>
> struct drm_printer;
>
> +void xe_guc_comm_init_early(struct xe_guc *guc);
> int xe_guc_init(struct xe_guc *guc);
> int xe_guc_init_post_hwconfig(struct xe_guc *guc);
> int xe_guc_post_load_init(struct xe_guc *guc);
>
> base-commit: 79184e72263e91528195db01783148435c7e4fad
> --
> 2.25.1
>
next prev parent reply other threads:[~2024-01-11 16:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:20 [PATCH] drm/xe: Split GuC communication initialization Michal Wajdeczko
2024-01-11 16:43 ` Matthew Brost [this message]
2024-01-11 17:43 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-11 17:43 ` ✓ CI.checkpatch: " Patchwork
2024-01-11 17:44 ` ✓ CI.KUnit: " Patchwork
2024-01-11 17:51 ` ✓ CI.Build: " Patchwork
2024-01-11 17:52 ` ✓ CI.Hooks: " Patchwork
2024-01-11 17:53 ` ✓ CI.checksparse: " Patchwork
2024-01-11 18:30 ` ✓ CI.BAT: " 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=ZaAanbaUDat36k36@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox