Skip to contentSkip to conversation

drm/amdgpu/soc24: use common nbio callback to set remap offset

PATCH In review Alex Deucher 3 participants 4 messages May 8, 2024 – May 29, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/soc24: use common nbio callback to set remap offset

This fixes HDP flushes on systems with non-4K pages.

---
 drivers/gpu/drm/amd/amdgpu/soc24.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc24.c +1 -3
index 12900488dd618..66c7138fc6aa4 100644
@@ -372,11 +372,9 @@ static const struct amdgpu_asic_funcs soc24_asic_funcs = {
 
 static int soc24_common_early_init(void *handle)
 {
-#define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET;
-	adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET;
+	adev->nbio.funcs->set_reg_remap(adev);
 	adev->smc_rreg = NULL;
 	adev->smc_wreg = NULL;
 	adev->pcie_rreg = &amdgpu_device_indirect_rreg;
Signature · 1 line
2.45.0
#1 lore raw

Ping.

Quoted 28 lines · Alex Deucher

This fixes HDP flushes on systems with non-4K pages.

---
 drivers/gpu/drm/amd/amdgpu/soc24.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc24.c +1 -4
index 12900488dd618..66c7138fc6aa4 100644
@@ -372,11 +372,9 @@ static const struct amdgpu_asic_funcs soc24_asic_funcs = {
 
 static int soc24_common_early_init(void *handle)
 {
-#define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET;
-       adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET;
+       adev->nbio.funcs->set_reg_remap(adev);
        adev->smc_rreg = NULL;
        adev->smc_wreg = NULL;
        adev->pcie_rreg = &amdgpu_device_indirect_rreg;
--

2.45.0

#2 lore raw
In reply to Alex Deucher

Ping?

Quoted 28 lines · Alex Deucher

This fixes HDP flushes on systems with non-4K pages.

---
 drivers/gpu/drm/amd/amdgpu/soc24.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc24.c +1 -4
index 12900488dd618..66c7138fc6aa4 100644
@@ -372,11 +372,9 @@ static const struct amdgpu_asic_funcs soc24_asic_funcs = {
 
 static int soc24_common_early_init(void *handle)
 {
-#define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET;
-       adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET;
+       adev->nbio.funcs->set_reg_remap(adev);
        adev->smc_rreg = NULL;
        adev->smc_wreg = NULL;
        adev->pcie_rreg = &amdgpu_device_indirect_rreg;
--

2.45.0

Reviewed-by
#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Best Regards,
Kevin

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, May 30, 2024 2:08 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu/soc24: use common nbio callback to set remap offset

Ping?

Quoted 29 lines · Alex Deucher

This fixes HDP flushes on systems with non-4K pages.

---
 drivers/gpu/drm/amd/amdgpu/soc24.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc24.c +1 -3
index 12900488dd618..66c7138fc6aa4 100644
@@ -372,11 +372,9 @@ static const struct amdgpu_asic_funcs
 soc24_asic_funcs = {
 
 static int soc24_common_early_init(void *handle)  { -#define
 MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET;
-       adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET;
+       adev->nbio.funcs->set_reg_remap(adev);
        adev->smc_rreg = NULL;
        adev->smc_wreg = NULL;
        adev->pcie_rreg = &amdgpu_device_indirect_rreg;
--

2.45.0