drm/amdgpu/gfx9: implement wave VGPR reading
Subsystems (2)
PATCH 1/1 drm/amdgpu/gfx9: implement wave VGPR reading
From: Nicolai Hähnle <[email protected]>
This is already hooked up to the "amdgpu_gpr" debugfs file used by the umr userspace debugging tool.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +10 -0
@@ -929,26 +929,36 @@ static void gfx_v9_0_read_wave_data(struct amdgpu_device *adev, uint32_t simd, ustatic void gfx_v9_0_read_wave_sgprs (struct amdgpu_device *adev,uint32_t simd,uint32_t wave,uint32_t start,uint32_t size,uint32_t *dst) {wave_read_regs ( adev, simd, wave,0 , start +SQIND_WAVE_SGPRS_OFFSET , size, dst); } +static void gfx_v9_0_read_wave_vgprs (struct amdgpu_device *adev,uint32_t simd, +uint32_t wave,uint32_t thread, +uint32_t start,uint32_t size, +uint32_t *dst) +{ +wave_read_regs ( + adev, simd, wave, thread, + start +SQIND_WAVE_VGPRS_OFFSET , size, dst); +}static const struct amdgpu_gfx_funcs gfx_v9_0_gfx_funcs = { .get_gpu_clock_counter = &gfx_v9_0_get_gpu_clock_counter, .select_se_sh = &gfx_v9_0_select_se_sh, .read_wave_data = &gfx_v9_0_read_wave_data, .read_wave_sgprs = &gfx_v9_0_read_wave_sgprs, + .read_wave_vgprs = &gfx_v9_0_read_wave_vgprs, };static void gfx_v9_0_gpu_early_init (struct amdgpu_device *adev) {u32 gb_addr_config; adev->gfx.funcs = &gfx_v9_0_gfx_funcs;switch (adev->asic_type) {case CHIP_VEGA10 :
Signature · 6 lines
2.11.0 _______________________________________________ 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): 20170909104907.10048-1-nhaehnle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Christian König
Acked-byAm 09.09.2017 um 12:49 schrieb Nicolai Hähnle:
Quoted 6 lines
From: Nicolai Hähnle <[email protected]>
This is already hooked up to the "
amdgpu_gpr" debugfs file used by the umr userspace debugging tool.Signed-off-by Nicolai Hähnle <[email protected]>
Quoted 35 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +10
-0@@ -929,26 +929,36 @@ static void gfx_v9_0_read_wave_data(struct amdgpu_device *adev, uint32_t simd, ustatic void gfx_v9_0_read_wave_sgprs (struct amdgpu_device *adev,uint32_t simd,uint32_t wave,uint32_t start,uint32_t size,uint32_t *dst) {wave_read_regs ( adev, simd, wave,0 , start +SQIND_WAVE_SGPRS_OFFSET , size, dst); } +static void gfx_v9_0_read_wave_vgprs (struct amdgpu_device *adev,uint32_t simd, +uint32_t wave,uint32_t thread, +uint32_t start,uint32_t size, +uint32_t *dst) +{ +wave_read_regs ( + adev, simd, wave, thread, + start +SQIND_WAVE_VGPRS_OFFSET , size, dst); +}static const struct amdgpu_gfx_funcs gfx_v9_0_gfx_funcs = { .get_gpu_clock_counter = &gfx_v9_0_get_gpu_clock_counter, .select_se_sh = &gfx_v9_0_select_se_sh, .read_wave_data = &gfx_v9_0_read_wave_data, .read_wave_sgprs = &gfx_v9_0_read_wave_sgprs, + .read_wave_vgprs = &gfx_v9_0_read_wave_vgprs,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_read_wave_data(struct amdgpu_device *adev, uint32_t simd, u · line 964
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0};static void gfx_v9_0_gpu_early_init (struct amdgpu_device *adev) {u32 gb_addr_config; adev->gfx.funcs = &gfx_v9_0_gfx_funcs;switch (adev->asic_type) {case CHIP_VEGA10 :
_______________________________________________
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): 6c2125a5-7bf2-b6e4-a6d0-ec44033bdbde-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Tom St Denis
Reviewed-byQuoted 9 lines · Christian König
Am 09.09.2017 um 12:49 schrieb Nicolai Hähnle:
Quoted 6 lines
From: Nicolai Hähnle <[email protected]>
This is already hooked up to the "
amdgpu_gpr" debugfs file used by the umr userspace debugging tool.Signed-off-by Nicolai Hähnle <[email protected]>Acked-by Christian König <[email protected]>
Also I've tested it to the extent that I can read out data via umr on my Raven while running piglit.
In an ideal world it'd be nice to have a known-answer-test where umr reads out SGPRS/VGPRS and we check against known values.
Tom
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx