mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
drm/amdkfd: CRIU add support for GWS queues
Add support to checkpoint/restore GWS (Global Wave Sync) queues. Signed-off-by: David Yat Sin <david.yatsin@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
7c6b6e18c8
commit
f567656f8a
@ -1103,7 +1103,7 @@ struct kfd_criu_queue_priv_data {
|
||||
uint32_t priority;
|
||||
uint32_t q_percent;
|
||||
uint32_t doorbell_id;
|
||||
uint32_t is_gws;
|
||||
uint32_t gws;
|
||||
uint32_t sdma_id;
|
||||
uint32_t eop_ring_buffer_size;
|
||||
uint32_t ctx_save_restore_area_size;
|
||||
|
@ -636,6 +636,8 @@ static int criu_checkpoint_queue(struct kfd_process_device *pdd,
|
||||
q_data->ctx_save_restore_area_size =
|
||||
q->properties.ctx_save_restore_area_size;
|
||||
|
||||
q_data->gws = !!q->gws;
|
||||
|
||||
ret = pqm_checkpoint_mqd(&pdd->process->pqm, q->properties.queue_id, mqd, ctl_stack);
|
||||
if (ret) {
|
||||
pr_err("Failed checkpoint queue_mqd (%d)\n", ret);
|
||||
@ -743,7 +745,6 @@ static void set_queue_properties_from_criu(struct queue_properties *qp,
|
||||
struct kfd_criu_queue_priv_data *q_data)
|
||||
{
|
||||
qp->is_interop = false;
|
||||
qp->is_gws = q_data->is_gws;
|
||||
qp->queue_percent = q_data->q_percent;
|
||||
qp->priority = q_data->priority;
|
||||
qp->queue_address = q_data->q_address;
|
||||
@ -826,12 +827,15 @@ int kfd_criu_restore_queue(struct kfd_process *p,
|
||||
NULL);
|
||||
if (ret) {
|
||||
pr_err("Failed to create new queue err:%d\n", ret);
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (q_data->gws)
|
||||
ret = pqm_set_gws(&p->pqm, q_data->q_id, pdd->dev->gws);
|
||||
|
||||
exit:
|
||||
if (ret)
|
||||
pr_err("Failed to create queue (%d)\n", ret);
|
||||
pr_err("Failed to restore queue (%d)\n", ret);
|
||||
else
|
||||
pr_debug("Queue id %d was restored successfully\n", queue_id);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user