amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue
Date: Tue, 14 Jan 2020 17:36:41 +0800	[thread overview]
Message-ID: <20200114093640.GA20112@jenkins-Celadon-RN> (raw)
In-Reply-To: <1578638233-9357-1-git-send-email-ray.huang@amd.com>

Ping~

On Fri, Jan 10, 2020 at 02:37:09PM +0800, Huang, Ray wrote:
> The mec ucode will set the CP_HQD_ACTIVE bit while the queue is mapped by
> MAP_QUEUES packet. So we only need set cp active field for kiq queue.
> 
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 +++++--
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 7 +++++--
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 7 +++++--
>  3 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 5b05334..22c69d8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -3323,8 +3323,11 @@ static int gfx_v10_0_compute_mqd_init(struct amdgpu_ring *ring)
>  	tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
>  	mqd->cp_hqd_ib_control = tmp;
>  
> -	/* activate the queue */
> -	mqd->cp_hqd_active = 1;
> +	/* map_queues packet doesn't need activate the queue,
> +	 * so only kiq need set this field.
> +	 */
> +	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
> +		mqd->cp_hqd_active = 1;
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 8b9f440..306ee61 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -4558,8 +4558,11 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)
>  	mqd->cp_hqd_eop_wptr_mem = RREG32(mmCP_HQD_EOP_WPTR_MEM);
>  	mqd->cp_hqd_eop_dones = RREG32(mmCP_HQD_EOP_DONES);
>  
> -	/* activate the queue */
> -	mqd->cp_hqd_active = 1;
> +	/* map_queues packet doesn't need activate the queue,
> +	 * so only kiq need set this field.
> +	 */
> +	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
> +		mqd->cp_hqd_active = 1;
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 45328f9..e29818b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -3313,8 +3313,11 @@ static int gfx_v9_0_mqd_init(struct amdgpu_ring *ring)
>  	tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
>  	mqd->cp_hqd_ib_control = tmp;
>  
> -	/* activate the queue */
> -	mqd->cp_hqd_active = 1;
> +	/* map_queues packet doesn't need activate the queue,
> +	 * so only kiq need set this field.
> +	 */
> +	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
> +		mqd->cp_hqd_active = 1;
>  
>  	return 0;
>  }
> -- 
> 2.7.4
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2020-01-14  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  6:37 [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue Huang Rui
2020-01-10  6:37 ` [PATCH 2/5] drm/amdkfd: use kiq to load the mqd of hiq queue for gfx v9 (v5) Huang Rui
2020-01-10  6:37 ` [PATCH 3/5] drm/amdkfd: use map_queues for hiq on arcturus as well Huang Rui
2020-01-10 23:05   ` Felix Kuehling
2020-01-13  2:38     ` Huang Rui
2020-01-10  6:37 ` [PATCH 4/5] drm/amdkfd: use map_queues for hiq on gfx v10 " Huang Rui
2020-01-10 23:08   ` Felix Kuehling
2020-01-13  9:07     ` Huang Rui
2020-01-10  6:37 ` [PATCH 5/5] drm/amdkfd: use map_queues for hiq on gfx v8 " Huang Rui
2020-01-10 23:09   ` Felix Kuehling
2020-01-14  9:36 ` Huang Rui [this message]
2020-01-14 15:30   ` [PATCH 1/5] drm/amdgpu: only set cp active field for kiq queue Felix Kuehling
2020-01-15  2:55     ` Huang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200114093640.GA20112@jenkins-Celadon-RN \
    --to=ray.huang@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).