Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/uc: Move GuC submission init to post hwconfig step
Date: Tue, 14 May 2024 20:24:42 +0000	[thread overview]
Message-ID: <ZkPIijI9aaLrdVlx@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240510203810.1952-3-michal.wajdeczko@intel.com>

On Fri, May 10, 2024 at 10:38:10PM +0200, Michal Wajdeczko wrote:
> We shouldn't need anything from the GuC submission code until we
> finish GuC initialization in post hwconfig step.
> 
> While around add diagnostic message if we fail uC init.
> 
> 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 |  9 +++++++++
>  drivers/gpu/drm/xe/xe_uc.c  | 10 +++-------
>  2 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 0c9938e0ab8c..b1bb94914028 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -21,6 +21,7 @@
>  #include "xe_gt_printk.h"
>  #include "xe_guc_ads.h"
>  #include "xe_guc_ct.h"
> +#include "xe_guc_db_mgr.h"
>  #include "xe_guc_hwconfig.h"
>  #include "xe_guc_log.h"
>  #include "xe_guc_pc.h"
> @@ -356,6 +357,14 @@ int xe_guc_init_post_hwconfig(struct xe_guc *guc)
>  
>  	guc_init_params_post_hwconfig(guc);
>  
> +	ret = xe_guc_submit_init(guc);
> +	if (ret)
> +		return ret;
> +
> +	ret = xe_guc_db_mgr_init(&guc->dbm, ~0);
> +	if (ret)
> +		return ret;
> +
>  	ret = xe_guc_pc_init(&guc->pc);
>  	if (ret)
>  		return ret;
> diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
> index 45035e38388b..0186eafc947d 100644
> --- a/drivers/gpu/drm/xe/xe_uc.c
> +++ b/drivers/gpu/drm/xe/xe_uc.c
> @@ -10,10 +10,9 @@
>  #include "xe_gsc.h"
>  #include "xe_gsc_proxy.h"
>  #include "xe_gt.h"
> +#include "xe_gt_printk.h"
>  #include "xe_guc.h"
> -#include "xe_guc_db_mgr.h"
>  #include "xe_guc_pc.h"
> -#include "xe_guc_submit.h"
>  #include "xe_huc.h"
>  #include "xe_uc_fw.h"
>  #include "xe_wopcm.h"
> @@ -58,13 +57,10 @@ int xe_uc_init(struct xe_uc *uc)
>  	if (ret)
>  		goto err;
>  
> -	ret = xe_guc_submit_init(&uc->guc);
> -	if (ret)
> -		goto err;
> -
> -	ret = xe_guc_db_mgr_init(&uc->guc.dbm, ~0);
> +	return 0;
>  
>  err:
> +	xe_gt_err(uc_to_gt(uc), "Failed to initialize uC (%pe)\n", ERR_PTR(ret));
>  	return ret;
>  }
>  
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-05-14 20:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 20:38 [PATCH 0/2] Move GuC submission init to post hwconfig step Michal Wajdeczko
2024-05-10 20:38 ` [PATCH 1/2] drm/xe/uc: Reorder post hwconfig uC initialization step Michal Wajdeczko
2024-05-14 20:23   ` Matthew Brost
2024-05-10 20:38 ` [PATCH 2/2] drm/xe/uc: Move GuC submission init to post hwconfig step Michal Wajdeczko
2024-05-14 20:24   ` Matthew Brost [this message]
2024-05-10 21:03 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-10 21:03 ` ✓ CI.checkpatch: " Patchwork
2024-05-10 21:04 ` ✓ CI.KUnit: " Patchwork
2024-05-10 21:16 ` ✓ CI.Build: " Patchwork
2024-05-10 21:19 ` ✓ CI.Hooks: " Patchwork
2024-05-10 21:20 ` ✓ CI.checksparse: " Patchwork
2024-05-10 21:41 ` ✓ CI.BAT: " Patchwork
2024-05-11  1:02 ` ✓ CI.FULL: " 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=ZkPIijI9aaLrdVlx@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