[PATCH] drm/amdgpu: Added more hqd debug messages

Zeng, Oak Oak.Zeng at amd.com
Wed Mar 1 22:28:41 UTC 2017


Hi Alex,

COMPUTE_PGM* registers are per pipe per queue - each queue of each pipe has a copy of those registers.

kgd_hqd_dump is called per pipe per queue. In kgd_hqd_dump, SRBM_GFX_CNTL register is set up to lock the correct pipe/queue. This is done through function acquire_queue(kgd, pipe_id, queue_id).

-----Original Message-----
From: Deucher, Alexander 
Sent: Wednesday, March 01, 2017 5:00 PM
To: 'ozeng'; amd-gfx at lists.freedesktop.org
Cc: Zeng, Oak
Subject: RE: [PATCH] drm/amdgpu: Added more hqd debug messages

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf 
> Of ozeng
> Sent: Wednesday, March 01, 2017 4:28 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zeng, Oak
> Subject: [PATCH] drm/amdgpu: Added more hqd debug messages
> 
> Dump register COMPUTE_PGM_RSRC1 and COMPUTE_PGM_RSRC2 in function 
> kgd_hqd_dump
> 
> Change-Id: I8e007f5bcc095d3283b642791860dd072dd43b1c
> Signed-off-by: Oak Zeng <Oak.Zeng at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 ++  
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
> index 7732def..d7bcdc3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
> @@ -439,6 +439,8 @@ static int kgd_hqd_dump(struct kgd_dev *kgd,
> 
>  	acquire_queue(kgd, pipe_id, queue_id);
> 
> +	DUMP_REG(mmCOMPUTE_PGM_RSRC1);
> +	DUMP_REG(mmCOMPUTE_PGM_RSRC2);
>  	DUMP_REG(mmCOMPUTE_STATIC_THREAD_MGMT_SE0);
>  	DUMP_REG(mmCOMPUTE_STATIC_THREAD_MGMT_SE1);
>  	DUMP_REG(mmCOMPUTE_STATIC_THREAD_MGMT_SE2);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> index 289c188..2aff607 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> @@ -433,6 +433,8 @@ static int kgd_hqd_dump(struct kgd_dev *kgd,
> 
>  	acquire_queue(kgd, pipe_id, queue_id);
> 
> +	DUMP_REG(mmCOMPUTE_PGM_RSRC1);
> +	DUMP_REG(mmCOMPUTE_PGM_RSRC2);
>  	DUMP_REG(mmCOMPUTE_STATIC_THREAD_MGMT_SE0);
>  	DUMP_REG(mmCOMPUTE_STATIC_THREAD_MGMT_SE1);
>  	DUMP_REG(mmCOMPUTE_STATIC_THREAD_MGMT_SE2);

Aren't COMPUTE_PGM* registers multi-state for pipelining?  In which case, reading them back via MMIO is largely useless.

Alex

> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list