Commit f567656f authored by David Yat Sin's avatar David Yat Sin Committed by Alex Deucher

drm/amdkfd: CRIU add support for GWS queues

Add support to checkpoint/restore GWS (Global Wave Sync) queues.
Signed-off-by: default avatarDavid Yat Sin <david.yatsin@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7c6b6e18
...@@ -1103,7 +1103,7 @@ struct kfd_criu_queue_priv_data { ...@@ -1103,7 +1103,7 @@ struct kfd_criu_queue_priv_data {
uint32_t priority; uint32_t priority;
uint32_t q_percent; uint32_t q_percent;
uint32_t doorbell_id; uint32_t doorbell_id;
uint32_t is_gws; uint32_t gws;
uint32_t sdma_id; uint32_t sdma_id;
uint32_t eop_ring_buffer_size; uint32_t eop_ring_buffer_size;
uint32_t ctx_save_restore_area_size; uint32_t ctx_save_restore_area_size;
......
...@@ -636,6 +636,8 @@ static int criu_checkpoint_queue(struct kfd_process_device *pdd, ...@@ -636,6 +636,8 @@ static int criu_checkpoint_queue(struct kfd_process_device *pdd,
q_data->ctx_save_restore_area_size = q_data->ctx_save_restore_area_size =
q->properties.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); ret = pqm_checkpoint_mqd(&pdd->process->pqm, q->properties.queue_id, mqd, ctl_stack);
if (ret) { if (ret) {
pr_err("Failed checkpoint queue_mqd (%d)\n", 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, ...@@ -743,7 +745,6 @@ static void set_queue_properties_from_criu(struct queue_properties *qp,
struct kfd_criu_queue_priv_data *q_data) struct kfd_criu_queue_priv_data *q_data)
{ {
qp->is_interop = false; qp->is_interop = false;
qp->is_gws = q_data->is_gws;
qp->queue_percent = q_data->q_percent; qp->queue_percent = q_data->q_percent;
qp->priority = q_data->priority; qp->priority = q_data->priority;
qp->queue_address = q_data->q_address; qp->queue_address = q_data->q_address;
...@@ -826,12 +827,15 @@ int kfd_criu_restore_queue(struct kfd_process *p, ...@@ -826,12 +827,15 @@ int kfd_criu_restore_queue(struct kfd_process *p,
NULL); NULL);
if (ret) { if (ret) {
pr_err("Failed to create new queue err:%d\n", 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: exit:
if (ret) if (ret)
pr_err("Failed to create queue (%d)\n", ret); pr_err("Failed to restore queue (%d)\n", ret);
else else
pr_debug("Queue id %d was restored successfully\n", queue_id); pr_debug("Queue id %d was restored successfully\n", queue_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment