[Intel-xe] [PATCH] drm/xe: don't auto fall back to execlist mode if guc failed to init

Lucas De Marchi lucas.demarchi at intel.com
Fri Mar 24 07:14:24 UTC 2023


On Thu, Mar 23, 2023 at 08:23:13PM +0000, Chang, Bruce wrote:
>In general, this is due to FW load failure, should just report
>error and fail the probe so that user can easily retry again.
>
>Cc: Matt Roper <matthew.d.roper at intel.com>
>Signed-off-by: Bruce Chang <yu.bruce.chang at intel.com>
>---
> drivers/gpu/drm/xe/xe_gt.c | 4 ++--
> drivers/gpu/drm/xe/xe_uc.c | 3 ---
> 2 files changed, 2 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
>index daa433d0f2f5..8a436c95591e 100644
>--- a/drivers/gpu/drm/xe/xe_gt.c
>+++ b/drivers/gpu/drm/xe/xe_gt.c
>@@ -455,9 +455,9 @@ static int gt_fw_domain_init(struct xe_gt *gt)
> 			goto err_force_wake;
> 	}
>
>-	/* Allow driver to load if uC init fails (likely missing firmware) */
> 	err = xe_uc_init(&gt->uc);
>-	XE_WARN_ON(err);
>+	if (err)
>+		goto err_force_wake;
>
> 	err = xe_uc_init_hwconfig(&gt->uc);
> 	if (err)
>diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
>index 4ccf2b3435e1..70eabf567156 100644
>--- a/drivers/gpu/drm/xe/xe_uc.c
>+++ b/drivers/gpu/drm/xe/xe_uc.c
>@@ -54,9 +54,6 @@ int xe_uc_init(struct xe_uc *uc)
> 	return 0;
>
> err:
>-	/* If any uC firmwares not found, fall back to execlists */
>-	xe_device_guc_submission_disable(uc_to_xe(uc));
>-

now that we are not disabling submission, isn't there anything to undo
from the steps above? if so, then the goto's can be simply removed?

one thing that seems very wrong in the previous state of the code is
disabling guc submission if huc failed.


Lucas De Marchi

> 	return ret;
> }
>
>-- 
>2.25.1
>


More information about the Intel-xe mailing list