Skip to contentSkip to conversation

drm/amdgpu: enable ih1 ih2 for Arcturus only

PATCH In review Alex Sierra 5 participants 10 messages Sep 2, 2020 – Sep 8, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: enable ih1 ih2 for Arcturus only

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -11
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
 	} else {
 		WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
 	}
-	navi10_ih_reroute_ih(adev);
+	if (adev->asic_type == CHIP_ARCTURUS)
+		navi10_ih_reroute_ih(adev);
 
 	if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
 		if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
 	adev->irq.ih.use_doorbell = true;
 	adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-	r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-	if (r)
-		return r;
+	adev->irq.ih1.ring_size = 0;
+	adev->irq.ih2.ring_size = 0;
 
-	adev->irq.ih1.use_doorbell = true;
-	adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+	if (adev->asic_type == CHIP_ARCTURUS) {
+		r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+		if (r)
+			return r;
 
-	r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-	if (r)
-		return r;
+		adev->irq.ih1.use_doorbell = true;
+		adev->irq.ih1.doorbell_index =
+					(adev->doorbell_index.ih + 1) << 1;
+
+		r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+		if (r)
+			return r;
 
-	adev->irq.ih2.use_doorbell = true;
-	adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+		adev->irq.ih2.use_doorbell = true;
+		adev->irq.ih2.doorbell_index =
+					(adev->doorbell_index.ih + 2) << 1;
+	}
 
 	r = amdgpu_irq_init(adev);
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Am 2020-09-02 um 1:01 p.m. schrieb Alex Sierra:

Quoted 18 lines

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +0 -0
index 350f1bf063c6..4d73869870ab 100644

drivers/gpu/drm/amd/amdgpu/navi10_ih.c static int navi10_ih_irq_init(struct amdgpu_device *adev) · line 309

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +1 -1
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
 	} else {
 		WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
 	}
-	navi10_ih_reroute_ih(adev);
+	if (adev->asic_type == CHIP_ARCTURUS)

Instead of looking at the asic_type here, it would be better to check the IH ring sizes. They are also used further down in this function as the condition to enable the extra interrupt rings. It would be more consistent and this way, the ASIC-specific condition would be limited to one function, navi10_ih_sw_init.

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +1 -0
+		navi10_ih_reroute_ih(adev);
 
 	if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
 		if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
 	adev->irq.ih.use_doorbell = true;
 	adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;

drivers/gpu/drm/amd/amdgpu/navi10_ih.c static int navi10_ih_sw_init(void *handle) · line 675

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +3 -5
 
-	r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-	if (r)
-		return r;
+	adev->irq.ih1.ring_size = 0;
+	adev->irq.ih2.ring_size = 0;
 
-	adev->irq.ih1.use_doorbell = true;
-	adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+	if (adev->asic_type == CHIP_ARCTURUS) {

This may apply to the Arcturus successor as well. I'd use asic_type < NAVI10 instead, to be future-proof.

With these two issues fixed, the patch is

Quoted 14 lines
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +10 -3
+		r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+		if (r)
+			return r;
 
-	r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-	if (r)
-		return r;
+		adev->irq.ih1.use_doorbell = true;
+		adev->irq.ih1.doorbell_index =
+					(adev->doorbell_index.ih + 1) << 1;
+
+		r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+		if (r)
+			return r;

drivers/gpu/drm/amd/amdgpu/navi10_ih.c static int navi10_ih_sw_init(void *handle) · line 694

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +4 -2
 
-	adev->irq.ih2.use_doorbell = true;
-	adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+		adev->irq.ih2.use_doorbell = true;
+		adev->irq.ih2.doorbell_index =
+					(adev->doorbell_index.ih + 2) << 1;
+	}
 
 	r = amdgpu_irq_init(adev);
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw
In reply to Alex Sierra
Quoted 9 lines · Alex Sierra

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

Before committing, let's verify that it fixes that issue.

Alex

Quoted 59 lines
---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -12
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
        } else {
                WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
        }
-       navi10_ih_reroute_ih(adev);
+       if (adev->asic_type == CHIP_ARCTURUS)
+               navi10_ih_reroute_ih(adev);
 
        if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
                if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
        adev->irq.ih.use_doorbell = true;
        adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-       if (r)
-               return r;
+       adev->irq.ih1.ring_size = 0;
+       adev->irq.ih2.ring_size = 0;
 
-       adev->irq.ih1.use_doorbell = true;
-       adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+       if (adev->asic_type == CHIP_ARCTURUS) {
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-       if (r)
-               return r;
+               adev->irq.ih1.use_doorbell = true;
+               adev->irq.ih1.doorbell_index =
+                                       (adev->doorbell_index.ih + 1) << 1;
+
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       adev->irq.ih2.use_doorbell = true;
-       adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+               adev->irq.ih2.use_doorbell = true;
+               adev->irq.ih2.doorbell_index =
+                                       (adev->doorbell_index.ih + 2) << 1;
+       }
 
        r = amdgpu_irq_init(adev);
 
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw

Am 2020-09-02 um 2:08 p.m. schrieb Alex Deucher:

Quoted 10 lines · Alex Sierra
Quoted 8 lines

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

Before committing, let's verify that it fixes that issue.

Has anyone reproduced this in AMD? Or should we ask the gitlab issue reporter to test the patch?

Thanks,
  Felix

Quoted 63 lines

Alex

Quoted 59 lines
---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -12
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
        } else {
                WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
        }
-       navi10_ih_reroute_ih(adev);
+       if (adev->asic_type == CHIP_ARCTURUS)
+               navi10_ih_reroute_ih(adev);
 
        if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
                if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
        adev->irq.ih.use_doorbell = true;
        adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-       if (r)
-               return r;
+       adev->irq.ih1.ring_size = 0;
+       adev->irq.ih2.ring_size = 0;
 
-       adev->irq.ih1.use_doorbell = true;
-       adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+       if (adev->asic_type == CHIP_ARCTURUS) {
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-       if (r)
-               return r;
+               adev->irq.ih1.use_doorbell = true;
+               adev->irq.ih1.doorbell_index =
+                                       (adev->doorbell_index.ih + 1) << 1;
+
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       adev->irq.ih2.use_doorbell = true;
-       adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+               adev->irq.ih2.use_doorbell = true;
+               adev->irq.ih2.doorbell_index =
+                                       (adev->doorbell_index.ih + 2) << 1;
+       }
 
        r = amdgpu_irq_init(adev);
 
--

2.17.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#4 lore raw
Quoted 11 lines · Felix Kuehling

Am 2020-09-02 um 2:08 p.m. schrieb Alex Deucher:

Quoted 9 lines · Alex Sierra
Quoted 8 lines

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

Quoted 4 lines
Quoted 1 line

Before committing, let's verify that it fixes that issue.

Has anyone reproduced this in AMD? Or should we ask the gitlab issue reporter to test the patch?

I've asked on the bug report. I think Nicolai reported an mmhub error at some point, but I can't find the reference now. I haven't heard of anything else.

Alex

Quoted 76 lines

Thanks,
Felix

Quoted 71 lines

Alex

Quoted 59 lines
---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -12
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
        } else {
                WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
        }
-       navi10_ih_reroute_ih(adev);
+       if (adev->asic_type == CHIP_ARCTURUS)
+               navi10_ih_reroute_ih(adev);
 
        if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
                if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
        adev->irq.ih.use_doorbell = true;
        adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-       if (r)
-               return r;
+       adev->irq.ih1.ring_size = 0;
+       adev->irq.ih2.ring_size = 0;
 
-       adev->irq.ih1.use_doorbell = true;
-       adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+       if (adev->asic_type == CHIP_ARCTURUS) {
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-       if (r)
-               return r;
+               adev->irq.ih1.use_doorbell = true;
+               adev->irq.ih1.doorbell_index =
+                                       (adev->doorbell_index.ih + 1) << 1;
+
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       adev->irq.ih2.use_doorbell = true;
-       adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+               adev->irq.ih2.use_doorbell = true;
+               adev->irq.ih2.doorbell_index =
+                                       (adev->doorbell_index.ih + 2) << 1;
+       }
 
        r = amdgpu_irq_init(adev);
 
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#5 lore raw
In reply to Alex Deucher
Quoted 12 lines · Alex Deucher
Quoted 9 lines · Alex Sierra

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

Quoted 1 line

Before committing, let's verify that it fixes that issue.

Looking at the bug report, the OSS (presumably IH) block is causing a write fault so I suspect arcturus may be affected by this as well. We should double check the ring sizes and allocations.

Alex

Quoted 60 lines

Alex

Quoted 56 lines
---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -11
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
        } else {
                WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
        }
-       navi10_ih_reroute_ih(adev);
+       if (adev->asic_type == CHIP_ARCTURUS)
+               navi10_ih_reroute_ih(adev);
 
        if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
                if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
        adev->irq.ih.use_doorbell = true;
        adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-       if (r)
-               return r;
+       adev->irq.ih1.ring_size = 0;
+       adev->irq.ih2.ring_size = 0;
 
-       adev->irq.ih1.use_doorbell = true;
-       adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+       if (adev->asic_type == CHIP_ARCTURUS) {
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-       if (r)
-               return r;
+               adev->irq.ih1.use_doorbell = true;
+               adev->irq.ih1.doorbell_index =
+                                       (adev->doorbell_index.ih + 1) << 1;
+
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       adev->irq.ih2.use_doorbell = true;
-       adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+               adev->irq.ih2.use_doorbell = true;
+               adev->irq.ih2.doorbell_index =
+                                       (adev->doorbell_index.ih + 2) << 1;
+       }
 
        r = amdgpu_irq_init(adev);
 
Quoted 7 lines
Quoted 7 lines

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#6 lore raw

Am 2020-09-02 um 2:13 p.m. schrieb Alex Deucher:

Quoted 10 lines · Alex Deucher
Quoted 9 lines · Alex Sierra
Quoted 8 lines

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

Quoted 4 lines
Quoted 1 line

Before committing, let's verify that it fixes that issue.

Looking at the bug report, the OSS (presumably IH) block is causing a write fault so I suspect arcturus may be affected by this as well. We should double check the ring sizes and allocations.

Alejandro has been doing a lot of testing on Arcturus and didn't run into this problem. That's why I suggested only disabling the IH rings on Navi10 for now. We need the extra rings on Arcturus for our HMM work.

Regards,
  Felix

Quoted 66 lines

Alex

Quoted 62 lines

Alex

Quoted 59 lines
---
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
 1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -12
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
        } else {
                WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
        }
-       navi10_ih_reroute_ih(adev);
+       if (adev->asic_type == CHIP_ARCTURUS)
+               navi10_ih_reroute_ih(adev);
 
        if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
                if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
        adev->irq.ih.use_doorbell = true;
        adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-       if (r)
-               return r;
+       adev->irq.ih1.ring_size = 0;
+       adev->irq.ih2.ring_size = 0;
 
-       adev->irq.ih1.use_doorbell = true;
-       adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+       if (adev->asic_type == CHIP_ARCTURUS) {
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-       if (r)
-               return r;
+               adev->irq.ih1.use_doorbell = true;
+               adev->irq.ih1.doorbell_index =
+                                       (adev->doorbell_index.ih + 1) << 1;
+
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       adev->irq.ih2.use_doorbell = true;
-       adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+               adev->irq.ih2.use_doorbell = true;
+               adev->irq.ih2.doorbell_index =
+                                       (adev->doorbell_index.ih + 2) << 1;
+       }
 
        r = amdgpu_irq_init(adev);
 
--

2.17.1

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#7 lore raw

Am 02.09.20 um 20:28 schrieb Felix Kuehling:

Quoted 11 lines

Am 2020-09-02 um 2:13 p.m. schrieb Alex Deucher:

Quoted 10 lines · Alex Deucher
Quoted 9 lines · Alex Sierra
Quoted 8 lines

Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts.
Further investigation is needed to get to the root cause. Related issue link:
https://gitlab.freedesktop.org/drm/amd/-/issues/1279

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Before committing, let's verify that it fixes that issue.

Looking at the bug report, the OSS (presumably IH) block is causing a write fault so I suspect arcturus may be affected by this as well. We should double check the ring sizes and allocations.

Alejandro has been doing a lot of testing on Arcturus and didn't run into this problem. That's why I suggested only disabling the IH rings on Navi10 for now. We need the extra rings on Arcturus for our HMM work.

I think we should further investigate this before applying any patches.

When Navi10 is affected it's likely that other Navi generations are as well since AFAIK the OSS hasn't changed much between generations.

Regards,
Christian.

Quoted 78 lines

Regards,
  Felix

Quoted 65 lines

Alex

Quoted 62 lines

Alex

Quoted 59 lines
---
  drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 30 ++++++++++++++++----------
  1 file changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +19 -12
index 350f1bf063c6..4d73869870ab 100644
@@ -306,7 +306,8 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
         } else {
                 WREG32_SOC15(OSSSYS, 0, mmIH_RB_CNTL, ih_rb_cntl);
         }
-       navi10_ih_reroute_ih(adev);
+       if (adev->asic_type == CHIP_ARCTURUS)
+               navi10_ih_reroute_ih(adev);
 
         if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) {
                 if (ih->use_bus_addr) {
@@ -668,19 +669,26 @@ static int navi10_ih_sw_init(void *handle)
         adev->irq.ih.use_doorbell = true;
         adev->irq.ih.doorbell_index = adev->doorbell_index.ih << 1;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
-       if (r)
-               return r;
+       adev->irq.ih1.ring_size = 0;
+       adev->irq.ih2.ring_size = 0;
 
-       adev->irq.ih1.use_doorbell = true;
-       adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih + 1) << 1;
+       if (adev->asic_type == CHIP_ARCTURUS) {
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih1, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
-       if (r)
-               return r;
+               adev->irq.ih1.use_doorbell = true;
+               adev->irq.ih1.doorbell_index =
+                                       (adev->doorbell_index.ih + 1) << 1;
+
+               r = amdgpu_ih_ring_init(adev, &adev->irq.ih2, PAGE_SIZE, true);
+               if (r)
+                       return r;
 
-       adev->irq.ih2.use_doorbell = true;
-       adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih + 2) << 1;
+               adev->irq.ih2.use_doorbell = true;
+               adev->irq.ih2.doorbell_index =
+                                       (adev->doorbell_index.ih + 2) << 1;
+       }
 
         r = amdgpu_irq_init(adev);
 
--

2.17.1

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#8 lore raw

Hello all,

Thought I'd chime in here. While I can't speak to the issue the GitLab reporter was experiencing, I can say that I get some performance hit (expected) from this when using multiple monitors with DRI_PRIME. When the second monitor is active (with something rendering to it with relative frequency), then I see a decent performance drop in applications running on my primary monitor compared to before this.

While this is probably expected, and imperceptible to the standard user, I thought I'd at least mention it in an effort to keep contributing.

Thanks for the continued open source work. You all make my life.

Cheers,

Matt

Quoted 4 lines · Christian König

Am 02.09.20 um 20:28 schrieb Felix Kuehling:

Quoted 2 lines

Am 2020-09-02 um 2:13 p.m. schrieb Alex Deucher:

Quoted 1 line

On Wed, Sep 2, 2020 at 2:08 PM Alex Deucher <[email protected]>

I think we should further investigate this before applying any patches.

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#9 lore raw

Am 2020-09-07 um 1:00 a.m. schrieb Matt Coffin:

Quoted 10 lines

Hello all,

Thought I'd chime in here. While I can't speak to the issue the GitLab reporter was experiencing, I can say that I get some performance hit (expected) from this when using multiple monitors with DRI_PRIME. When the second monitor is active (with something rendering to it with relative frequency), then I see a decent performance drop in applications running on my primary monitor compared to before this.

To be clear, are you seeing a performance drop from this partial revert, or from the original change that enabled ih1 and ih2?

I would not expect this change to affect performance for anything other than page fault interrupt handling. You should not be seeing GPU page fault interrupts while running graphics applications.

Regards,
  Felix

Quoted 12 lines

While this is probably expected, and imperceptible to the standard user, I thought I'd at least mention it in an effort to keep contributing.

Thanks for the continued open source work. You all make my life.

Quoted 9 lines

Cheers,

Matt

Quoted 4 lines · Christian König

Am 02.09.20 um 20:28 schrieb Felix Kuehling:

Quoted 2 lines

Am 2020-09-02 um 2:13 p.m. schrieb Alex Deucher:

Quoted 1 line

On Wed, Sep 2, 2020 at 2:08 PM Alex Deucher <[email protected]>

I think we should further investigate this before applying any patches.

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx