summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-05-10 22:38:10 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-05-14 23:19:27 +0200
commit4071e0872fcad846381f86f5164236827f7e91c8 (patch)
treeea631a8a2014984f2ed9fb0230f8097d57308b2e
parent3df01f5c72b0b4ecdca2b3da88a4b6fac809986b (diff)
drm/xe/uc: Move GuC submission init to post hwconfig step
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> Link: https://patchwork.freedesktop.org/patch/msgid/20240510203810.1952-3-michal.wajdeczko@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_guc.c9
-rw-r--r--drivers/gpu/drm/xe/xe_uc.c10
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;
}