mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/xe/guc_submit: Introduce pause/unpause() helpers for PF
Introduce pause/unpause() helpers which stop/start further runs of submission tasks on given GuC and can be called from PF context. This is in preparation of usecases where we simply need to stop/start the scheduler without losing GuC state and don't require dealing with VF migration. v7: Reword commit message (Matthew Brost) Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patch.msgid.link/20251030122357.128825-3-raag.jadav@intel.com
This commit is contained in:
committed by
Ashutosh Dixit
parent
99234edab8
commit
726ceb5716
@@ -2168,6 +2168,21 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_guc_submit_pause - Stop further runs of submission tasks on given GuC.
|
||||
* @guc: the &xe_guc struct instance whose scheduler is to be disabled
|
||||
*/
|
||||
void xe_guc_submit_pause(struct xe_guc *guc)
|
||||
{
|
||||
struct xe_exec_queue *q;
|
||||
unsigned long index;
|
||||
|
||||
mutex_lock(&guc->submission_state.lock);
|
||||
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
|
||||
xe_sched_submission_stop(&q->guc->sched);
|
||||
mutex_unlock(&guc->submission_state.lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_guc_submit_pause_vf - Stop further runs of submission tasks for VF.
|
||||
* @guc: the &xe_guc struct instance whose scheduler is to be disabled
|
||||
@@ -2343,6 +2358,21 @@ static void guc_exec_queue_unpause(struct xe_guc *guc, struct xe_exec_queue *q)
|
||||
xe_sched_submission_resume_tdr(sched);
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_guc_submit_unpause - Allow further runs of submission tasks on given GuC.
|
||||
* @guc: the &xe_guc struct instance whose scheduler is to be enabled
|
||||
*/
|
||||
void xe_guc_submit_unpause(struct xe_guc *guc)
|
||||
{
|
||||
struct xe_exec_queue *q;
|
||||
unsigned long index;
|
||||
|
||||
mutex_lock(&guc->submission_state.lock);
|
||||
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
|
||||
xe_sched_submission_start(&q->guc->sched);
|
||||
mutex_unlock(&guc->submission_state.lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_guc_submit_unpause_vf - Allow further runs of submission tasks for VF.
|
||||
* @guc: the &xe_guc struct instance whose scheduler is to be enabled
|
||||
|
||||
@@ -20,8 +20,10 @@ 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_pause_abort(struct xe_guc *guc);
|
||||
void xe_guc_submit_pause_vf(struct xe_guc *guc);
|
||||
void xe_guc_submit_unpause(struct xe_guc *guc);
|
||||
void xe_guc_submit_unpause_vf(struct xe_guc *guc);
|
||||
void xe_guc_submit_unpause_prepare_vf(struct xe_guc *guc);
|
||||
void xe_guc_submit_wedge(struct xe_guc *guc);
|
||||
|
||||
Reference in New Issue
Block a user