Skip to content

Commit c742374

Browse files
dceraolojnikula
authored andcommitted
drm/i915/huc: Cancel HuC delayed load timer on reset.
In the rare case where we do a full GT reset after starting the HuC load and before it completes (which basically boils down to i915 hanging during init), we need to cancel the delayed load fence, as it will be re-initialized in the post-reset recovery. Fixes: 27536e0 ("drm/i915/huc: track delayed HuC load with a fence") Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Alan Previn <[email protected]> Reviewed-by: Alan Previn <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit cdf7911) Signed-off-by: Jani Nikula <[email protected]>
1 parent f1b17f4 commit c742374

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

drivers/gpu/drm/i915/gt/uc/intel_huc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ static void delayed_huc_load_fini(struct intel_huc *huc)
235235
i915_sw_fence_fini(&huc->delayed_load.fence);
236236
}
237237

238+
int intel_huc_sanitize(struct intel_huc *huc)
239+
{
240+
delayed_huc_load_complete(huc);
241+
intel_uc_fw_sanitize(&huc->fw);
242+
return 0;
243+
}
244+
238245
static bool vcs_supported(struct intel_gt *gt)
239246
{
240247
intel_engine_mask_t mask = gt->info.engine_mask;

drivers/gpu/drm/i915/gt/uc/intel_huc.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct intel_huc {
4141
} delayed_load;
4242
};
4343

44+
int intel_huc_sanitize(struct intel_huc *huc);
4445
void intel_huc_init_early(struct intel_huc *huc);
4546
int intel_huc_init(struct intel_huc *huc);
4647
void intel_huc_fini(struct intel_huc *huc);
@@ -54,12 +55,6 @@ bool intel_huc_is_authenticated(struct intel_huc *huc);
5455
void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus);
5556
void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus);
5657

57-
static inline int intel_huc_sanitize(struct intel_huc *huc)
58-
{
59-
intel_uc_fw_sanitize(&huc->fw);
60-
return 0;
61-
}
62-
6358
static inline bool intel_huc_is_supported(struct intel_huc *huc)
6459
{
6560
return intel_uc_fw_is_supported(&huc->fw);

0 commit comments

Comments
 (0)