diff options
author | Edward O'Callaghan <funfunctor@folklore1984.net> | 2016-09-17 01:01:45 -0400 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2016-09-19 13:58:35 -0400 |
commit | e88a614c403573e861f82c063d8aee25cf109f17 (patch) | |
tree | b7403b9048c1ceb4fcf2292fd827aeea482f0107 | |
parent | 6f4d92a12786ffebcf508fd96c5d09487cb93b00 (diff) |
drm/amdkfd: Pass 'struct queue_propertices' by reference
Allow init_queue() to take 'struct queue_properties' by reference.
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 291c69d6b58c..d135cd002a95 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | |||
@@ -124,7 +124,7 @@ static bool initialize(struct kernel_queue *kq, struct kfd_dev *dev, | |||
124 | prop.eop_ring_buffer_address = kq->eop_gpu_addr; | 124 | prop.eop_ring_buffer_address = kq->eop_gpu_addr; |
125 | prop.eop_ring_buffer_size = PAGE_SIZE; | 125 | prop.eop_ring_buffer_size = PAGE_SIZE; |
126 | 126 | ||
127 | if (init_queue(&kq->queue, prop) != 0) | 127 | if (init_queue(&kq->queue, &prop) != 0) |
128 | goto err_init_queue; | 128 | goto err_init_queue; |
129 | 129 | ||
130 | kq->queue->device = dev; | 130 | kq->queue->device = dev; |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index 80113c335966..4750cabe4252 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |||
@@ -619,7 +619,7 @@ int kfd_init_apertures(struct kfd_process *process); | |||
619 | /* Queue Context Management */ | 619 | /* Queue Context Management */ |
620 | struct cik_sdma_rlc_registers *get_sdma_mqd(void *mqd); | 620 | struct cik_sdma_rlc_registers *get_sdma_mqd(void *mqd); |
621 | 621 | ||
622 | int init_queue(struct queue **q, struct queue_properties properties); | 622 | int init_queue(struct queue **q, const struct queue_properties *properties); |
623 | void uninit_queue(struct queue *q); | 623 | void uninit_queue(struct queue *q); |
624 | void print_queue_properties(struct queue_properties *q); | 624 | void print_queue_properties(struct queue_properties *q); |
625 | void print_queue(struct queue *q); | 625 | void print_queue(struct queue *q); |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c index 7b69070f7ecc..e1fb40b84c72 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | |||
@@ -129,7 +129,7 @@ static int create_cp_queue(struct process_queue_manager *pqm, | |||
129 | q_properties->vmid = 0; | 129 | q_properties->vmid = 0; |
130 | q_properties->queue_id = qid; | 130 | q_properties->queue_id = qid; |
131 | 131 | ||
132 | retval = init_queue(q, *q_properties); | 132 | retval = init_queue(q, q_properties); |
133 | if (retval != 0) | 133 | if (retval != 0) |
134 | goto err_init_queue; | 134 | goto err_init_queue; |
135 | 135 | ||
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c index 9a0c90b0702e..0ab197077f2d 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c | |||
@@ -63,7 +63,7 @@ void print_queue(struct queue *q) | |||
63 | pr_debug("Queue Device Address: 0x%p\n", q->device); | 63 | pr_debug("Queue Device Address: 0x%p\n", q->device); |
64 | } | 64 | } |
65 | 65 | ||
66 | int init_queue(struct queue **q, struct queue_properties properties) | 66 | int init_queue(struct queue **q, const struct queue_properties *properties) |
67 | { | 67 | { |
68 | struct queue *tmp; | 68 | struct queue *tmp; |
69 | 69 | ||
@@ -73,7 +73,7 @@ int init_queue(struct queue **q, struct queue_properties properties) | |||
73 | if (!tmp) | 73 | if (!tmp) |
74 | return -ENOMEM; | 74 | return -ENOMEM; |
75 | 75 | ||
76 | memcpy(&tmp->properties, &properties, sizeof(struct queue_properties)); | 76 | memcpy(&tmp->properties, properties, sizeof(struct queue_properties)); |
77 | 77 | ||
78 | *q = tmp; | 78 | *q = tmp; |
79 | return 0; | 79 | return 0; |