mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 23:34:00 -04:00
Previously, the driver's internal wedged.mode state was updated without verifying whether the corresponding engine reset policy update in GuC succeeded. This could leave the driver reporting a wedged.mode state that doesn't match the actual reset behavior programmed in GuC. With this change, the reset policy is updated first, and the driver's wedged.mode state is modified only if the policy update succeeds on all available GTs. This patch also introduces two functional improvements: - The policy is sent to GuC only when a change is required. An update is needed only when entering or leaving XE_WEDGED_MODE_UPON_ANY_HANG, because only in that case the reset policy changes. For example, switching between XE_WEDGED_MODE_UPON_CRITICAL_ERROR and XE_WEDGED_MODE_NEVER doesn't affect the reset policy, so there is no need to send the same value to GuC. - An inconsistent_reset flag is added to track cases where reset policy update succeeds only on a subset of GTs. If such inconsistency is detected, future wedged mode configuration will force a retry of the reset policy update to restore a consistent state across all GTs. Fixes:6b8ef44cc0("drm/xe: Introduce the wedged_mode debugfs") Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patch.msgid.link/20260107174741.29163-3-lukasz.laguna@intel.com Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit0f13dead4e) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
22 lines
561 B
C
22 lines
561 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2022 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GUC_ADS_H_
|
|
#define _XE_GUC_ADS_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct xe_guc_ads;
|
|
|
|
int xe_guc_ads_init(struct xe_guc_ads *ads);
|
|
int xe_guc_ads_init_post_hwconfig(struct xe_guc_ads *ads);
|
|
void xe_guc_ads_populate(struct xe_guc_ads *ads);
|
|
void xe_guc_ads_populate_minimal(struct xe_guc_ads *ads);
|
|
void xe_guc_ads_populate_post_load(struct xe_guc_ads *ads);
|
|
int xe_guc_ads_scheduler_policy_toggle_reset(struct xe_guc_ads *ads,
|
|
bool enable_engine_reset);
|
|
|
|
#endif
|