summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2025-12-08 18:26:09 +0530
committerAlex Deucher <alexander.deucher@amd.com>2026-03-02 16:42:38 -0500
commitf4eb08f8b216c334752246fe24e1304477d78968 (patch)
tree5820c2ff24a9f14af214d174f60e506a4b52c1c5 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent3d77ca68eb0b48f88cc891d1b98f109b68e2ffcf (diff)
downloadlinux-f4eb08f8b216c334752246fe24e1304477d78968.tar.gz
linux-f4eb08f8b216c334752246fe24e1304477d78968.tar.bz2
linux-f4eb08f8b216c334752246fe24e1304477d78968.zip
drm/amdgpu: Add smc method to register block
Define register access block which consolidates different register access methods. Add smc method to register access block. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c4b86cd7baf4..f6ca7514a36d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3830,8 +3830,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,
adev->fence_context = dma_fence_context_alloc(AMDGPU_MAX_RINGS);
bitmap_zero(adev->gfx.pipe_reserve_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
- adev->smc_rreg = &amdgpu_invalid_rreg;
- adev->smc_wreg = &amdgpu_invalid_wreg;
+ amdgpu_reg_access_init(adev);
+
adev->pcie_rreg = &amdgpu_invalid_rreg;
adev->pcie_wreg = &amdgpu_invalid_wreg;
adev->pcie_rreg_ext = &amdgpu_invalid_rreg_ext;
@@ -3894,7 +3894,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
return r;
spin_lock_init(&adev->mmio_idx_lock);
- spin_lock_init(&adev->smc_idx_lock);
spin_lock_init(&adev->pcie_idx_lock);
spin_lock_init(&adev->uvd_ctx_idx_lock);
spin_lock_init(&adev->didt_idx_lock);