mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-27 15:35:38 +00:00

The workqueue used for the reset worker is marked as WQ_MEM_RECLAIM, while the GSC one isn't (and can't be as we need to do memory allocations in the gsc worker). Therefore, we can't flush the latter from the former. The reason why we had such a flush was to avoid interrupting either the GSC FW load or in progress GSC proxy operations. GSC proxy operations fall into 2 categories: 1) GSC proxy init: this only happens once immediately after GSC FW load and does not support being interrupted. The only way to recover from an interruption of the proxy init is to do an FLR and re-load the GSC. 2) GSC proxy request: this can happen in response to a request that the driver sends to the GSC. If this is interrupted, the GSC FW will timeout and the driver request will be failed, but overall the GSC will keep working fine. Flushing the work allowed us to avoid interruption in both cases (unless the hang came from the GSC engine itself, in which case we're toast anyway). However, a failure on a proxy request is tolerable if we're in a scenario where we're triggering a GT reset (i.e., something is already gone pretty wrong), so what we really need to avoid is interrupting the init flow, which we can do by polling on the register that reports when the proxy init is complete (as that ensure us that all the load and init operations have been completed). Note that during suspend we still want to do a flush of the worker to make sure it completes any operations involving the HW before the power is cut. v2: fix spelling in commit msg, rename waiter function (Julia) Fixes:dd0e89e5ed
("drm/xe/gsc: GSC FW load") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4830 Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com> Link: https://lore.kernel.org/r/20250502155104.2201469-1-daniele.ceraolospurio@intel.com (cherry picked from commit12370bfcc4
) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
28 lines
659 B
C
28 lines
659 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GSC_H_
|
|
#define _XE_GSC_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_printer;
|
|
struct xe_gsc;
|
|
struct xe_gt;
|
|
struct xe_hw_engine;
|
|
|
|
int xe_gsc_init(struct xe_gsc *gsc);
|
|
int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc);
|
|
void xe_gsc_wait_for_worker_completion(struct xe_gsc *gsc);
|
|
void xe_gsc_stop_prepare(struct xe_gsc *gsc);
|
|
void xe_gsc_load_start(struct xe_gsc *gsc);
|
|
void xe_gsc_hwe_irq_handler(struct xe_hw_engine *hwe, u16 intr_vec);
|
|
|
|
void xe_gsc_wa_14015076503(struct xe_gt *gt, bool prep);
|
|
|
|
void xe_gsc_print_info(struct xe_gsc *gsc, struct drm_printer *p);
|
|
|
|
#endif
|