mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-18 10:23:08 +02:00
d16ef1a18e
If the job about to be submitted is a dma-fence job, update the current
execution mode of the hw engine group. This triggers an immediate suspend
of the exec queues running faulting long-running jobs.
If the job about to be submitted is a long-running job, kick a new worker
used to resume the exec queues running faulting long-running jobs once
the dma-fence jobs have completed.
v2: Kick the resume worker from exec IOCTL, switch to unordered workqueue,
destroy it after use (Matt Brost)
v3: Do not resume if no exec queue was suspended (Matt Brost)
v4: Squash commits (Matt Brost)
v5: Do not kick the worker when xe_vm_in_preempt_fence_mode (Matt Brost)
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809155156.1955925-10-francois.dugast@intel.com
30 lines
921 B
C
30 lines
921 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2024 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_HW_ENGINE_GROUP_H_
|
|
#define _XE_HW_ENGINE_GROUP_H_
|
|
|
|
#include "xe_hw_engine_group_types.h"
|
|
|
|
struct drm_device;
|
|
struct xe_exec_queue;
|
|
struct xe_gt;
|
|
|
|
int xe_hw_engine_setup_groups(struct xe_gt *gt);
|
|
|
|
int xe_hw_engine_group_add_exec_queue(struct xe_hw_engine_group *group, struct xe_exec_queue *q);
|
|
void xe_hw_engine_group_del_exec_queue(struct xe_hw_engine_group *group, struct xe_exec_queue *q);
|
|
|
|
int xe_hw_engine_group_get_mode(struct xe_hw_engine_group *group,
|
|
enum xe_hw_engine_group_execution_mode new_mode,
|
|
enum xe_hw_engine_group_execution_mode *previous_mode);
|
|
void xe_hw_engine_group_put(struct xe_hw_engine_group *group);
|
|
|
|
enum xe_hw_engine_group_execution_mode
|
|
xe_hw_engine_group_find_exec_mode(struct xe_exec_queue *q);
|
|
void xe_hw_engine_group_resume_faulting_lr_jobs(struct xe_hw_engine_group *group);
|
|
|
|
#endif
|