Skip to content

Commit

Permalink
drm/xe/uc: Move GuC submission init to post hwconfig step
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Matthew Brost <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
mwajdecz committed May 14, 2024
1 parent 3df01f5 commit 4071e08
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/xe/xe_guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 3 additions & 7 deletions drivers/gpu/drm/xe/xe_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 4071e08

Please sign in to comment.