Skip to contentSkip to conversation

drm/amdgpu: Fix assignment errors in 'si_common_early_init' functions

PATCH In review Lu Yao 2 participants 2 messages Feb 28, 2024

Subsystems (2)
lore
Share & tools
lore

Lu Yao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix assignment errors in 'si_common_early_init' functions

uvd_ctx_rreg/uvd_ctx_wreg correct value requires function pointer.

---
 drivers/gpu/drm/amd/amdgpu/si.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/si.c +2 -2
index a757526153e5..455d49f7bd9c 100644
@@ -2032,8 +2032,8 @@ static int si_common_early_init(void *handle)
 	adev->pcie_wreg = &si_pcie_wreg;
 	adev->pciep_rreg = &si_pciep_rreg;
 	adev->pciep_wreg = &si_pciep_wreg;
-	adev->uvd_ctx_rreg = si_uvd_ctx_rreg;
-	adev->uvd_ctx_wreg = si_uvd_ctx_wreg;
+	adev->uvd_ctx_rreg = &si_uvd_ctx_rreg;
+	adev->uvd_ctx_wreg = &si_uvd_ctx_wreg;
 	adev->didt_rreg = NULL;
 	adev->didt_wreg = NULL;
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Am 28.02.24 um 02:44 schrieb Lu Yao:

Quoted 1 line

uvd_ctx_rreg/uvd_ctx_wreg correct value requires function pointer.

Yeah, but that is completely irrelevant here. We usually don't use the & for function pointers since that is unnecessary in C.

Regards,
Christian.

Quoted 21 lines
---
  drivers/gpu/drm/amd/amdgpu/si.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/si.c +2 -2
index a757526153e5..455d49f7bd9c 100644
@@ -2032,8 +2032,8 @@ static int si_common_early_init(void *handle)
  	adev->pcie_wreg = &si_pcie_wreg;
  	adev->pciep_rreg = &si_pciep_rreg;
  	adev->pciep_wreg = &si_pciep_wreg;
-	adev->uvd_ctx_rreg = si_uvd_ctx_rreg;
-	adev->uvd_ctx_wreg = si_uvd_ctx_wreg;
+	adev->uvd_ctx_rreg = &si_uvd_ctx_rreg;
+	adev->uvd_ctx_wreg = &si_uvd_ctx_wreg;
  	adev->didt_rreg = NULL;
  	adev->didt_wreg = NULL;