]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: add helper function for indirect reg access (v3)
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 17 Sep 2020 11:32:34 +0000 (19:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Oct 2020 14:42:13 +0000 (10:42 -0400)
commit0440d570038230b3b01599954d3c93fbaa691f17
treedc4cc06565422509ff5064a6e0d6bbb5c1cebe12
parentc9f9bb1af27e7fd5ec5e7d85e189aaf4a3b5e21a
drm/amdgpu: add helper function for indirect reg access (v3)

Add helper function in order to remove RREG32/WREG32
in current pcie_rreg/wreg function for soc15 and
onwards adapters.
PCIE_INDEX/DATA pairs are used to access regsiters
outside of mmio bar in the helper functions.
The new helper functions help remove the recursion
of amdgpu_mm_rreg/wreg from pcie_rreg/wreg and
provide the oppotunity to centralize direct and
indirect access in a single function.

v2: Fixed typo and refine the comments

v3: Remove unnecessary volatile local variable

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c