drm/amdkfd: Delete a useless parameter from create_queue function pointer
Subsystems (3)
PATCH 1/1 drm/amdkfd: Delete a useless parameter from create_queue function pointer
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 14 ++++---------- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +-- 3 files changed, 6 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +4 -10
@@ -144,8 +144,7 @@ static void deallocate_vmid(struct device_queue_manager *dqm,static int create_queue_nocpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocated_vmid) +struct qcm_process_device *qpd) {int retval;
@@ -165,7 +164,6 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,if (retval) goto out_unlock; } - *allocated_vmid = qpd->vmid; q->properties.vmid = qpd->vmid;if (q->properties.type ==KFD_QUEUE_TYPE_COMPUTE )
@@ -176,10 +174,9 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm, retval = -EINVAL ;if (retval) { -if (list_empty (&qpd->queues_list)) { +if (list_empty (&qpd->queues_list))deallocate_vmid (dqm, qpd, q); - *allocated_vmid =0 ; - } + goto out_unlock; }
@@ -788,16 +785,13 @@ static void select_sdma_engine_id(struct queue *q) }static int create_queue_cpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd,int *allocate_vmid) +struct qcm_process_device *qpd) {int retval;struct mqd_manager *mqd; retval =0 ; -if (allocate_vmid) - *allocate_vmid =0 ; -mutex_lock (&dqm->lock);if (dqm->total_queue_count >= max_num_of_queues_per_device) {
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1 -2
@@ -84,8 +84,7 @@ struct device_process_node {struct device_queue_manager_ops {int (*create_queue)(struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocate_vmid); +struct qcm_process_device *qpd); int (*destroy_queue)(struct device_queue_manager *dqm, struct qcm_process_device *qpd,
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1 -2
@@ -199,8 +199,7 @@ int pqm_create_queue(struct process_queue_manager *pqm, goto err_create_queue; pqn->q = q; pqn->kq =NULL ; - retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd, - &q->properties.vmid); + retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd);pr_debug ("DQM returned %d for create_queue\n" , retval);print_queue (q);break ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1511557060-3552-1-git-send-email-yong.zhao-5C7GfCeVMHo@public.gmane.org
Hi Oded,
Yong made this patch against our internal KFD branch. I asked him to send it to upstream as well, since it applies to code I have already upstreamed. I'm going to do this for more patches in the future as more KFD code is upstream and more of our internal changes are applicable upstream directly.
Is this OK with you, or do you prefer getting all patches through me, in roughly bi-weekly batches as part of my on-going upstreaming effort?
Hi Yong,
Which branch is this patch against? For upstream KFD commits, they should be applied against amdkfd-next ongit://people.freedesktop.org/~gabbayo/linux. Oded will apply the patch if he accepts it, so you only need read access to this repository.
Also, please remove the Change-Id from the commit message. It is meaningless for upstream submissions outside of our Gerrit server.
Other than that, this patch is Reviewed-by: Felix Kuehling <Felix [email protected]>
Regards,
Felix
Quoted 80 lines · Yong Zhao
Change-Id Ia5c74ad567c30e206ed804b204fdf8a0f8a75a19Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 14 ++++---------- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +-- 3 files changed, 6 insertions(+), 14 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +4
-10@@ -144,8 +144,7 @@ static void deallocate_vmid(struct device_queue_manager *dqm,static int create_queue_nocpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocated_vmid) +struct qcm_process_device *qpd) {int retval;@@ -165,7 +164,6 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,if (retval) goto out_unlock; } - *allocated_vmid = qpd->vmid; q->properties.vmid = qpd->vmid;if (q->properties.type ==KFD_QUEUE_TYPE_COMPUTE )@@ -176,10 +174,9 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm, retval = -EINVAL ;if (retval) { -if (list_empty (&qpd->queues_list)) { +if (list_empty (&qpd->queues_list))deallocate_vmid (dqm, qpd, q); - *allocated_vmid =0 ; - } + goto out_unlock; }@@ -788,16 +785,13 @@ static void select_sdma_engine_id(struct queue *q) }static int create_queue_cpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd,int *allocate_vmid) +struct qcm_process_device *qpd) {int retval;struct mqd_manager *mqd; retval =0 ; -if (allocate_vmid) - *allocate_vmid =0 ; -mutex_lock (&dqm->lock);if (dqm->total_queue_count >= max_num_of_queues_per_device) {drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1
-2@@ -84,8 +84,7 @@ struct device_process_node {struct device_queue_manager_ops {int (*create_queue)(struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocate_vmid); +struct qcm_process_device *qpd); int (*destroy_queue)(struct device_queue_manager *dqm, struct qcm_process_device *qpd,drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c int pqm_create_queue(struct process_queue_manager *pqm, · line 205
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1
-2@@ -199,8 +199,7 @@ int pqm_create_queue(struct process_queue_manager *pqm, goto err_create_queue; pqn->q = q; pqn->kq =NULL ; - retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd, - &q->properties.vmid); + retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd);pr_debug ("DQM returned %d for create_queue\n" , retval);print_queue (q);break ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): bf0d440f-b554-b366-afe2-7d237fdc1833-5C7GfCeVMHo@public.gmane.org
I based it on amd-staging-drm-next. I will pull from amdkfd-next, remove Change-Id from and add you in commit message.
Regards,
Yong
________________________________
From: Kuehling, Felix
Sent: Friday, November 24, 2017 4:44:48 PM
To: Zhao, Yong; [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdkfd: Delete a useless parameter from create_queue function pointer
Hi Oded,
Yong made this patch against our internal KFD branch. I asked him to send it to upstream as well, since it applies to code I have already upstreamed. I'm going to do this for more patches in the future as more KFD code is upstream and more of our internal changes are applicable upstream directly.
Is this OK with you, or do you prefer getting all patches through me, in roughly bi-weekly batches as part of my on-going upstreaming effort?
Hi Yong,
Which branch is this patch against? For upstream KFD commits, they should be applied against amdkfd-next ongit://people.freedesktop.org/~gabbayo/linux. Oded will apply the patch if he accepts it, so you only need read access to this repository.
Also, please remove the Change-Id from the commit message. It is meaningless for upstream submissions outside of our Gerrit server.
Other than that, this patch is Reviewed-by: Felix Kuehling <Felix [email protected]>
Regards,
Felix
Quoted 80 lines · Yong Zhao
Change-Id Ia5c74ad567c30e206ed804b204fdf8a0f8a75a19Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 14 ++++---------- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +-- 3 files changed, 6 insertions(+), 14 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +4
-10@@ -144,8 +144,7 @@ static void deallocate_vmid(struct device_queue_manager *dqm,static int create_queue_nocpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocated_vmid) +struct qcm_process_device *qpd) {int retval;@@ -165,7 +164,6 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,if (retval) goto out_unlock; } - *allocated_vmid = qpd->vmid; q->properties.vmid = qpd->vmid;if (q->properties.type ==KFD_QUEUE_TYPE_COMPUTE )@@ -176,10 +174,9 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm, retval = -EINVAL ;if (retval) { -if (list_empty (&qpd->queues_list)) { +if (list_empty (&qpd->queues_list))deallocate_vmid (dqm, qpd, q); - *allocated_vmid =0 ; - } + goto out_unlock; }@@ -788,16 +785,13 @@ static void select_sdma_engine_id(struct queue *q) }static int create_queue_cpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd,int *allocate_vmid) +struct qcm_process_device *qpd) {int retval;struct mqd_manager *mqd; retval =0 ; -if (allocate_vmid) - *allocate_vmid =0 ; -mutex_lock (&dqm->lock);if (dqm->total_queue_count >= max_num_of_queues_per_device) {drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1
-2@@ -84,8 +84,7 @@ struct device_process_node {struct device_queue_manager_ops {int (*create_queue)(struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocate_vmid); +struct qcm_process_device *qpd); int (*destroy_queue)(struct device_queue_manager *dqm, struct qcm_process_device *qpd,drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c int pqm_create_queue(struct process_queue_manager *pqm, · line 205
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1
-2@@ -199,8 +199,7 @@ int pqm_create_queue(struct process_queue_manager *pqm, goto err_create_queue; pqn->q = q; pqn->kq =NULL ; - retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd, - &q->properties.vmid); + retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd);pr_debug ("DQM returned %d for create_queue\n" , retval);print_queue (q);break ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Felix Kuehling
Hi Oded,
Yong made this patch against our internal KFD branch. I asked him to send it to upstream as well, since it applies to code I have already upstreamed. I'm going to do this for more patches in the future as more KFD code is upstream and more of our internal changes are applicable upstream directly.
Is this OK with you, or do you prefer getting all patches through me, in roughly bi-weekly batches as part of my on-going upstreaming effort?
Both ways are perfectly fine with me. Whatever works for you guys.
Oded
Quoted 92 lines
Hi Yong,
Which branch is this patch against? For upstream KFD commits, they should be applied against amdkfd-next on
git://people.freedesktop.org/~gabbayo/linux. Oded will apply the patch if he accepts it, so you only need read access to this repository.Also, please remove the Change-Id from the commit message. It is meaningless for upstream submissions outside of our Gerrit server.
Other than that, this patch is Reviewed-by: Felix Kuehling <Felix [email protected]>
Regards,
FelixQuoted 73 lines · Yong Zhao
Change-Id Ia5c74ad567c30e206ed804b204fdf8a0f8a75a19Signed-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 14 ++++---------- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +-- 3 files changed, 6 insertions(+), 14 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +4
-10@@ -144,8 +144,7 @@ static void deallocate_vmid(struct device_queue_manager *dqm,static int create_queue_nocpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocated_vmid) +struct qcm_process_device *qpd) {int retval;@@ -165,7 +164,6 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,if (retval) goto out_unlock; } - *allocated_vmid = qpd->vmid; q->properties.vmid = qpd->vmid;if (q->properties.type ==KFD_QUEUE_TYPE_COMPUTE )@@ -176,10 +174,9 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm, retval = -EINVAL ;if (retval) { -if (list_empty (&qpd->queues_list)) { +if (list_empty (&qpd->queues_list))deallocate_vmid (dqm, qpd, q); - *allocated_vmid =0 ; - } + goto out_unlock; }@@ -788,16 +785,13 @@ static void select_sdma_engine_id(struct queue *q) }static int create_queue_cpsch (struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd,int *allocate_vmid) +struct qcm_process_device *qpd) {int retval;struct mqd_manager *mqd; retval =0 ; -if (allocate_vmid) - *allocate_vmid =0 ; -mutex_lock (&dqm->lock);if (dqm->total_queue_count >= max_num_of_queues_per_device) {drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +1
-2@@ -84,8 +84,7 @@ struct device_process_node {struct device_queue_manager_ops {int (*create_queue)(struct device_queue_manager *dqm,struct queue *q, -struct qcm_process_device *qpd, -int *allocate_vmid); +struct qcm_process_device *qpd);
Quoted 17 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +0
-0int (*destroy_queue)(struct device_queue_manager *dqm, struct qcm_process_device *qpd,drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +0
-0drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c int pqm_create_queue(struct process_queue_manager *pqm, · line 205
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1
-2@@ -199,8 +199,7 @@ int pqm_create_queue(struct process_queue_manager *pqm, goto err_create_queue; pqn->q = q; pqn->kq =NULL ; - retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd, - &q->properties.vmid); + retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd);pr_debug ("DQM returned %d for create_queue\n" , retval);print_queue (q);break ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx