drm/amdgpu: add dummy read by engines for some GCVM status registers in gfx10
authorchangzhu <Changfeng.Zhu@amd.com>
Thu, 10 Oct 2019 03:02:33 +0000 (11:02 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Nov 2019 03:06:23 +0000 (22:06 -0500)
commit589b64a7e39720b1784a1a26569c57cb977936ef
tree24e6d4ac50cca6d0f808f507903449c924284fb2
parent6a299d7aaa97dfde5988d8f9e2fa2c046b5793ff
drm/amdgpu: add dummy read by engines for some GCVM status registers in gfx10

The GRBM register interface is now capable of bursting 1 cycle per
register wr->wr, wr->rd much faster than previous muticycle per
transaction done interface.  This has caused a problem where
status registers requiring HW to update have a 1 cycle delay, due
to the register update having to go through GRBM.

For cp ucode, it has realized dummy read in cp firmware.It covers
the use of WAIT_REG_MEM operation 1 case only.So it needs to call
gfx_v10_0_wait_reg_mem in gfx10. Besides it also needs to add warning to
update firmware in case firmware is too old to have function to realize
dummy read in cp firmware.

For sdma ucode, it hasn't realized dummy read in sdma firmware. sdma is
moved to gfxhub in gfx10. So it needs to add dummy read in driver
between amdgpu_ring_emit_wreg and amdgpu_ring_emit_reg_wait for sdma_v5_0.

Signed-off-by: changzhu <Changfeng.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c