<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I based it on amd-staging-drm-next. I will pull from amdkfd-next, remove Change-Id from and add you in commit message. </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Regards,</p>
<p style="margin-top:0;margin-bottom:0">Yong</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kuehling, Felix<br>
<b>Sent:</b> Friday, November 24, 2017 4:44:48 PM<br>
<b>To:</b> Zhao, Yong; oded.gabbay@gmail.com; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] drm/amdkfd: Delete a useless parameter from create_queue function pointer</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Oded,<br>
<br>
Yong made this patch against our internal KFD branch. I asked him to<br>
send it to upstream as well, since it applies to code I have already<br>
upstreamed. I'm going to do this for more patches in the future as more<br>
KFD code is upstream and more of our internal changes are applicable<br>
upstream directly.<br>
<br>
Is this OK with you, or do you prefer getting all patches through me, in<br>
roughly bi-weekly batches as part of my on-going upstreaming effort?<br>
<br>
Hi Yong,<br>
<br>
Which branch is this patch against? For upstream KFD commits, they<br>
should be applied against amdkfd-next on<br>
git://people.freedesktop.org/~gabbayo/linux. Oded will apply the patch<br>
if he accepts it, so you only need read access to this repository.<br>
<br>
Also, please remove the Change-Id from the commit message. It is<br>
meaningless for upstream submissions outside of our Gerrit server.<br>
<br>
Other than that, this patch is Reviewed-by: Felix Kuehling <Felix<br>
Kuehling@amd.com><br>
<br>
Regards,<br>
  Felix<br>
<br>
<br>
On 2017-11-24 03:57 PM, Yong Zhao wrote:<br>
> Change-Id: Ia5c74ad567c30e206ed804b204fdf8a0f8a75a19<br>
> Signed-off-by: Yong Zhao <yong.zhao@amd.com><br>
> ---<br>
>  drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c  | 14 ++++----------<br>
>  drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h  |  3 +--<br>
>  drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c |  3 +--<br>
>  3 files changed, 6 insertions(+), 14 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c<br>
> index 53a66e8..1df1123 100644<br>
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c<br>
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c<br>
> @@ -144,8 +144,7 @@ static void deallocate_vmid(struct device_queue_manager *dqm,<br>
>  <br>
>  static int create_queue_nocpsch(struct device_queue_manager *dqm,<br>
>                                struct queue *q,<br>
> -                             struct qcm_process_device *qpd,<br>
> -                             int *allocated_vmid)<br>
> +                             struct qcm_process_device *qpd)<br>
>  {<br>
>        int retval;<br>
>  <br>
> @@ -165,7 +164,6 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,<br>
>                if (retval)<br>
>                        goto out_unlock;<br>
>        }<br>
> -     *allocated_vmid = qpd->vmid;<br>
>        q->properties.vmid = qpd->vmid;<br>
>  <br>
>        if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE)<br>
> @@ -176,10 +174,9 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,<br>
>                retval = -EINVAL;<br>
>  <br>
>        if (retval) {<br>
> -             if (list_empty(&qpd->queues_list)) {<br>
> +             if (list_empty(&qpd->queues_list))<br>
>                        deallocate_vmid(dqm, qpd, q);<br>
> -                     *allocated_vmid = 0;<br>
> -             }<br>
> +<br>
>                goto out_unlock;<br>
>        }<br>
>  <br>
> @@ -788,16 +785,13 @@ static void select_sdma_engine_id(struct queue *q)<br>
>  }<br>
>  <br>
>  static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,<br>
> -                     struct qcm_process_device *qpd, int *allocate_vmid)<br>
> +                     struct qcm_process_device *qpd)<br>
>  {<br>
>        int retval;<br>
>        struct mqd_manager *mqd;<br>
>  <br>
>        retval = 0;<br>
>  <br>
> -     if (allocate_vmid)<br>
> -             *allocate_vmid = 0;<br>
> -<br>
>        mutex_lock(&dqm->lock);<br>
>  <br>
>        if (dqm->total_queue_count >= max_num_of_queues_per_device) {<br>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h<br>
> index faf820a..449407a 100644<br>
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h<br>
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h<br>
> @@ -84,8 +84,7 @@ struct device_process_node {<br>
>  struct device_queue_manager_ops {<br>
>        int     (*create_queue)(struct device_queue_manager *dqm,<br>
>                                struct queue *q,<br>
> -                             struct qcm_process_device *qpd,<br>
> -                             int *allocate_vmid);<br>
> +                             struct qcm_process_device *qpd);<br>
>  <br>
>        int     (*destroy_queue)(struct device_queue_manager *dqm,<br>
>                                struct qcm_process_device *qpd,<br>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c<br>
> index 03bec76..1e7bcae 100644<br>
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c<br>
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c<br>
> @@ -199,8 +199,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,<br>
>                        goto err_create_queue;<br>
>                pqn->q = q;<br>
>                pqn->kq = NULL;<br>
> -             retval = dev->dqm->ops.create_queue(dev->dqm, q, &pdd->qpd,<br>
> -                                             &q->properties.vmid);<br>
> +             retval = dev->dqm->ops.create_queue(dev->dqm, q, &pdd->qpd);<br>
>                pr_debug("DQM returned %d for create_queue\n", retval);<br>
>                print_queue(q);<br>
>                break;<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>