mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 19:12:29 -04:00
The WA buffer we use to capture context utilization contains GGTT references. This means its instructions have to be either fixed or re-emitted during VF post-migration recovery. This patch adds re-emitting content of the utilization WA BB during the recovery. The way we write to vram requires scratch buffer to be used before the whole block is memcopied. We are re-using a scratch buffer introduced in earlier part of the recovery. This is not a performance optimization, but a necessity to avoid creating dependencies between locks. v2: Notable rebase after "Prepare WA BB setup for more users" patch v3: Added error propagation Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Reviewed-by: Michal Winiarski <michal.winiarski@intel.com> Link: https://lore.kernel.org/r/20250802031045.1127138-8-tomasz.lis@intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
54 lines
1.9 KiB
C
54 lines
1.9 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2022 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GUC_SUBMIT_H_
|
|
#define _XE_GUC_SUBMIT_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_printer;
|
|
struct xe_exec_queue;
|
|
struct xe_guc;
|
|
|
|
int xe_guc_submit_init(struct xe_guc *guc, unsigned int num_ids);
|
|
|
|
int xe_guc_submit_reset_prepare(struct xe_guc *guc);
|
|
void xe_guc_submit_reset_wait(struct xe_guc *guc);
|
|
void xe_guc_submit_stop(struct xe_guc *guc);
|
|
int xe_guc_submit_start(struct xe_guc *guc);
|
|
void xe_guc_submit_pause(struct xe_guc *guc);
|
|
void xe_guc_submit_unpause(struct xe_guc *guc);
|
|
int xe_guc_submit_reset_block(struct xe_guc *guc);
|
|
void xe_guc_submit_reset_unblock(struct xe_guc *guc);
|
|
int xe_guc_wait_reset_unblock(struct xe_guc *guc);
|
|
void xe_guc_submit_wedge(struct xe_guc *guc);
|
|
|
|
int xe_guc_read_stopped(struct xe_guc *guc);
|
|
int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len);
|
|
int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len);
|
|
int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len);
|
|
int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
|
|
u32 len);
|
|
int xe_guc_exec_queue_reset_failure_handler(struct xe_guc *guc, u32 *msg, u32 len);
|
|
int xe_guc_error_capture_handler(struct xe_guc *guc, u32 *msg, u32 len);
|
|
|
|
void xe_guc_jobs_ring_rebase(struct xe_guc *guc);
|
|
|
|
struct xe_guc_submit_exec_queue_snapshot *
|
|
xe_guc_exec_queue_snapshot_capture(struct xe_exec_queue *q);
|
|
void
|
|
xe_guc_exec_queue_snapshot_capture_delayed(struct xe_guc_submit_exec_queue_snapshot *snapshot);
|
|
void
|
|
xe_guc_exec_queue_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snapshot,
|
|
struct drm_printer *p);
|
|
void
|
|
xe_guc_exec_queue_snapshot_free(struct xe_guc_submit_exec_queue_snapshot *snapshot);
|
|
void xe_guc_submit_print(struct xe_guc *guc, struct drm_printer *p);
|
|
void xe_guc_register_exec_queue(struct xe_exec_queue *q, int ctx_type);
|
|
|
|
int xe_guc_contexts_hwsp_rebase(struct xe_guc *guc, void *scratch);
|
|
|
|
#endif
|