From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH] drm/xe/uc: Fix and start using xe_uc_fw_sanitize()
Date: Fri, 14 Jun 2024 09:29:33 +0530 [thread overview]
Message-ID: <d79dd252-5196-4762-8c5b-9ca44b0c8317@intel.com> (raw)
In-Reply-To: <20240613153424.2120-1-michal.wajdeczko@intel.com>
On 13-06-2024 21:04, Michal Wajdeczko wrote:
> Helper xe_uc_fw_sanitize() was defined but never used. First fix
> it by properly exiting also from the LOAD_FAIL state, then use it
> in GuC and HuC sanitize code.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 2 +-
> drivers/gpu/drm/xe/xe_huc.c | 4 +---
> drivers/gpu/drm/xe/xe_uc_fw.h | 2 +-
> 3 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 0bf6e01b8910..0e1a5674ef13 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -1094,7 +1094,7 @@ void xe_guc_irq_handler(struct xe_guc *guc, const u16 iir)
>
> void xe_guc_sanitize(struct xe_guc *guc)
> {
> - xe_uc_fw_change_status(&guc->fw, XE_UC_FIRMWARE_LOADABLE);
> + xe_uc_fw_sanitize(&guc->fw);
> xe_guc_ct_disable(&guc->ct);
> guc->submission_state.enabled = false;
> }
> diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
> index b039ff49341b..6238fb354914 100644
> --- a/drivers/gpu/drm/xe/xe_huc.c
> +++ b/drivers/gpu/drm/xe/xe_huc.c
> @@ -295,9 +295,7 @@ int xe_huc_auth(struct xe_huc *huc, enum xe_huc_auth_types type)
>
> void xe_huc_sanitize(struct xe_huc *huc)
> {
> - if (!xe_uc_fw_is_loadable(&huc->fw))
> - return;
> - xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_LOADABLE);
> + xe_uc_fw_sanitize(&huc->fw);
> }
>
> void xe_huc_print_info(struct xe_huc *huc, struct drm_printer *p)
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.h b/drivers/gpu/drm/xe/xe_uc_fw.h
> index 35078038797e..c108e9d08e70 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.h
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.h
> @@ -158,7 +158,7 @@ static inline bool xe_uc_fw_is_overridden(const struct xe_uc_fw *uc_fw)
>
> static inline void xe_uc_fw_sanitize(struct xe_uc_fw *uc_fw)
> {
> - if (xe_uc_fw_is_loaded(uc_fw))
> + if (xe_uc_fw_is_loadable(uc_fw))
> xe_uc_fw_change_status(uc_fw, XE_UC_FIRMWARE_LOADABLE);
LGTM
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> }
>
prev parent reply other threads:[~2024-06-14 3:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 15:34 [PATCH] drm/xe/uc: Fix and start using xe_uc_fw_sanitize() Michal Wajdeczko
2024-06-13 15:59 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-13 15:59 ` ✓ CI.checkpatch: " Patchwork
2024-06-13 16:00 ` ✓ CI.KUnit: " Patchwork
2024-06-13 16:12 ` ✓ CI.Build: " Patchwork
2024-06-13 16:14 ` ✗ CI.Hooks: failure " Patchwork
2024-06-13 16:16 ` ✓ CI.checksparse: success " Patchwork
2024-06-13 16:38 ` ✓ CI.BAT: " Patchwork
2024-06-13 23:22 ` ✗ CI.FULL: failure " Patchwork
2024-06-14 9:00 ` Michal Wajdeczko
2024-06-14 3:59 ` Ghimiray, Himal Prasad [this message]
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=d79dd252-5196-4762-8c5b-9ca44b0c8317@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--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