All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Improve soft IH ring
@ 2026-05-13 17:08 Timur Kristóf
  2026-05-13 17:08 ` [PATCH 1/3] amdgpu/ih6.1: Fix minor version Timur Kristóf
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Timur Kristóf @ 2026-05-13 17:08 UTC (permalink / raw)
  To: amd-gfx, Alex Deucher, christian.koenig, Marek Olšák,
	Natalie Vock, Melissa Wen, amir.shetaia
  Cc: Timur Kristóf

The soft interrupt handler ring is used in scenarios
when it is beneficial to not process some interrupts
in the interrupt handler of the HW interrupts.

Fix some bugs in the soft IH ring, eg. the kernel should
not access HW registers when working with the soft IH ring
and improve its effectiveness by dispatching it on the
unbound workqueue.

These patches make it more feasible to use the soft IH
ring for handling retry page faults on GPUs that don't
have the filter CAM. The actual retry page fault
improvements are in a separate series.

Timur Kristóf (3):
  amdgpu/ih6.1: Fix minor version
  amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  drm/amdgpu: Use system unbound workqueue for soft IH ring

 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c    | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/ih_v6_1.c    | 9 ++++++++-
 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c    | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c  | 4 ++++
 5 files changed, 27 insertions(+), 2 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] amdgpu/ih6.1: Fix minor version
  2026-05-13 17:08 [PATCH 0/3] Improve soft IH ring Timur Kristóf
@ 2026-05-13 17:08 ` Timur Kristóf
  2026-06-16 11:18   ` Tvrtko Ursulin
  2026-06-16 14:28   ` Alex Deucher
  2026-05-13 17:08 ` [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring Timur Kristóf
  2026-05-13 17:08 ` [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for " Timur Kristóf
  2 siblings, 2 replies; 12+ messages in thread
From: Timur Kristóf @ 2026-05-13 17:08 UTC (permalink / raw)
  To: amd-gfx, Alex Deucher, christian.koenig, Marek Olšák,
	Natalie Vock, Melissa Wen, amir.shetaia
  Cc: Timur Kristóf

Report the correct version of IH v6.1 (previously it showed v6.0).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
index 95b3f4e55ec3..699c274d357e 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
@@ -790,7 +790,7 @@ static void ih_v6_1_set_interrupt_funcs(struct amdgpu_device *adev)
 const struct amdgpu_ip_block_version ih_v6_1_ip_block = {
 	.type = AMD_IP_BLOCK_TYPE_IH,
 	.major = 6,
-	.minor = 0,
+	.minor = 1,
 	.rev = 0,
 	.funcs = &ih_v6_1_ip_funcs,
 };
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  2026-05-13 17:08 [PATCH 0/3] Improve soft IH ring Timur Kristóf
  2026-05-13 17:08 ` [PATCH 1/3] amdgpu/ih6.1: Fix minor version Timur Kristóf
@ 2026-05-13 17:08 ` Timur Kristóf
  2026-06-16 11:39   ` Tvrtko Ursulin
  2026-05-13 17:08 ` [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for " Timur Kristóf
  2 siblings, 1 reply; 12+ messages in thread
From: Timur Kristóf @ 2026-05-13 17:08 UTC (permalink / raw)
  To: amd-gfx, Alex Deucher, christian.koenig, Marek Olšák,
	Natalie Vock, Melissa Wen, amir.shetaia
  Cc: Timur Kristóf

The soft IH ring is implemented entirely in software.
We shouldn't read (or write) and HW registers when accessing it.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c   | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/ih_v6_1.c   | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/ih_v7_0.c   | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 ++++
 4 files changed, 25 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
index 333e9c30c091..65e5d21753f9 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
@@ -439,6 +439,10 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device *adev,
 	struct amdgpu_ih_regs *ih_regs;
 
 	wptr = le32_to_cpu(*ih->wptr_cpu);
+
+	if (ih == &adev->irq.ih_soft)
+		goto out;
+
 	ih_regs = &ih->ih_regs;
 
 	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
@@ -514,6 +518,9 @@ static void ih_v6_0_set_rptr(struct amdgpu_device *adev,
 {
 	struct amdgpu_ih_regs *ih_regs;
 
+	if (ih == &adev->irq.ih_soft)
+		return;
+
 	if (ih->use_doorbell) {
 		/* XXX check if swapping is necessary on BE */
 		*ih->rptr_cpu = ih->rptr;
diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
index 699c274d357e..9dbc20131410 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
@@ -410,6 +410,10 @@ static u32 ih_v6_1_get_wptr(struct amdgpu_device *adev,
 	struct amdgpu_ih_regs *ih_regs;
 
 	wptr = le32_to_cpu(*ih->wptr_cpu);
+
+	if (ih == &adev->irq.ih_soft)
+		goto out;
+
 	ih_regs = &ih->ih_regs;
 
 	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
@@ -481,6 +485,9 @@ static void ih_v6_1_irq_rearm(struct amdgpu_device *adev,
 static void ih_v6_1_set_rptr(struct amdgpu_device *adev,
 			       struct amdgpu_ih_ring *ih)
 {
+	if (ih == &adev->irq.ih_soft)
+		return;
+
 	struct amdgpu_ih_regs *ih_regs;
 
 	if (ih->use_doorbell) {
diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
index 6de9e87e04e1..bd332e8cc5bf 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
@@ -457,6 +457,10 @@ static u32 ih_v7_0_get_wptr(struct amdgpu_device *adev,
 	struct amdgpu_ih_regs *ih_regs;
 
 	wptr = le32_to_cpu(*ih->wptr_cpu);
+
+	if (ih == &adev->irq.ih_soft)
+		goto out;
+
 	ih_regs = &ih->ih_regs;
 
 	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
@@ -527,6 +531,9 @@ static void ih_v7_0_set_rptr(struct amdgpu_device *adev,
 {
 	struct amdgpu_ih_regs *ih_regs;
 
+	if (ih == &adev->irq.ih_soft)
+		return;
+
 	if (ih->use_doorbell) {
 		/* XXX check if swapping is necessary on BE */
 		*ih->rptr_cpu = ih->rptr;
diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
index 4cd325149b63..e7ed37bb48e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
@@ -417,6 +417,10 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device *adev,
 		 */
 		wptr = le32_to_cpu(*ih->wptr_cpu);
 
+		if (ih == &adev->irq.ih_soft)
+			goto out;
+
+
 		if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
 			goto out;
 	}
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for soft IH ring
  2026-05-13 17:08 [PATCH 0/3] Improve soft IH ring Timur Kristóf
  2026-05-13 17:08 ` [PATCH 1/3] amdgpu/ih6.1: Fix minor version Timur Kristóf
  2026-05-13 17:08 ` [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring Timur Kristóf
@ 2026-05-13 17:08 ` Timur Kristóf
  2026-06-16 12:08   ` Tvrtko Ursulin
  2 siblings, 1 reply; 12+ messages in thread
From: Timur Kristóf @ 2026-05-13 17:08 UTC (permalink / raw)
  To: amd-gfx, Alex Deucher, christian.koenig, Marek Olšák,
	Natalie Vock, Melissa Wen, amir.shetaia
  Cc: Timur Kristóf

Allow the kernel to dispatch the soft IH work on other CPUs.

Otherwise it can happen that the soft IH ring fills up
before it actually starts processing anything, which
can easily happen with retry page faults, in which case
the CP repeatedly spams the CPU with a lot of interrupts.

This significantly improves retry page fault handling on
GPUs that don't have the filter CAM and must rely on
software based filtering.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 82bc6d657e5a..515fc32051c8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -549,7 +549,7 @@ void amdgpu_irq_delegate(struct amdgpu_device *adev,
 			 unsigned int num_dw)
 {
 	amdgpu_ih_ring_write(adev, &adev->irq.ih_soft, entry->iv_entry, num_dw);
-	schedule_work(&adev->irq.ih_soft_work);
+	queue_work(system_unbound_wq, &adev->irq.ih_soft_work);
 }
 
 /**
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] amdgpu/ih6.1: Fix minor version
  2026-05-13 17:08 ` [PATCH 1/3] amdgpu/ih6.1: Fix minor version Timur Kristóf
@ 2026-06-16 11:18   ` Tvrtko Ursulin
  2026-06-16 14:28   ` Alex Deucher
  1 sibling, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2026-06-16 11:18 UTC (permalink / raw)
  To: Timur Kristóf, amd-gfx, Alex Deucher, christian.koenig,
	Marek Olšák, Natalie Vock, Melissa Wen, amir.shetaia


On 13/05/2026 18:08, Timur Kristóf wrote:
> Report the correct version of IH v6.1 (previously it showed v6.0).
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> index 95b3f4e55ec3..699c274d357e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> @@ -790,7 +790,7 @@ static void ih_v6_1_set_interrupt_funcs(struct amdgpu_device *adev)
>   const struct amdgpu_ip_block_version ih_v6_1_ip_block = {
>   	.type = AMD_IP_BLOCK_TYPE_IH,
>   	.major = 6,
> -	.minor = 0,
> +	.minor = 1,
>   	.rev = 0,
>   	.funcs = &ih_v6_1_ip_funcs,
>   };

Finally an easy one! :)

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>

Regards,

Tvrtko


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  2026-05-13 17:08 ` [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring Timur Kristóf
@ 2026-06-16 11:39   ` Tvrtko Ursulin
  2026-06-16 12:04     ` Timur Kristóf
  2026-06-16 12:52     ` Christian König
  0 siblings, 2 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2026-06-16 11:39 UTC (permalink / raw)
  To: Timur Kristóf, amd-gfx, Alex Deucher, christian.koenig,
	Marek Olšák, Natalie Vock, Melissa Wen, amir.shetaia


On 13/05/2026 18:08, Timur Kristóf wrote:
> The soft IH ring is implemented entirely in software.
> We shouldn't read (or write) and HW registers when accessing it.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/ih_v6_0.c   | 7 +++++++
>   drivers/gpu/drm/amd/amdgpu/ih_v6_1.c   | 7 +++++++
>   drivers/gpu/drm/amd/amdgpu/ih_v7_0.c   | 7 +++++++
>   drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 ++++
>   4 files changed, 25 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> index 333e9c30c091..65e5d21753f9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> @@ -439,6 +439,10 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device *adev,
>   	struct amdgpu_ih_regs *ih_regs;
>   
>   	wptr = le32_to_cpu(*ih->wptr_cpu);
> +
> +	if (ih == &adev->irq.ih_soft)
> +		goto out;
> +

Would it be feasible to move amdgpu_ih_funcs from device global into the 
IH rings themselves? Then we could have soft IH ops and it would be very 
clean.

Possibly also cleanup all the protoptyes to operate only on ih and not 
the adev + ih pair.

Regards,

Tvrtko

>   	ih_regs = &ih->ih_regs;
>   
>   	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> @@ -514,6 +518,9 @@ static void ih_v6_0_set_rptr(struct amdgpu_device *adev,
>   {
>   	struct amdgpu_ih_regs *ih_regs;
>   
> +	if (ih == &adev->irq.ih_soft)
> +		return;
> +
>   	if (ih->use_doorbell) {
>   		/* XXX check if swapping is necessary on BE */
>   		*ih->rptr_cpu = ih->rptr;
> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> index 699c274d357e..9dbc20131410 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> @@ -410,6 +410,10 @@ static u32 ih_v6_1_get_wptr(struct amdgpu_device *adev,
>   	struct amdgpu_ih_regs *ih_regs;
>   
>   	wptr = le32_to_cpu(*ih->wptr_cpu);
> +
> +	if (ih == &adev->irq.ih_soft)
> +		goto out;
> +
>   	ih_regs = &ih->ih_regs;
>   
>   	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> @@ -481,6 +485,9 @@ static void ih_v6_1_irq_rearm(struct amdgpu_device *adev,
>   static void ih_v6_1_set_rptr(struct amdgpu_device *adev,
>   			       struct amdgpu_ih_ring *ih)
>   {
> +	if (ih == &adev->irq.ih_soft)
> +		return;
> +
>   	struct amdgpu_ih_regs *ih_regs;
>   
>   	if (ih->use_doorbell) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
> index 6de9e87e04e1..bd332e8cc5bf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
> @@ -457,6 +457,10 @@ static u32 ih_v7_0_get_wptr(struct amdgpu_device *adev,
>   	struct amdgpu_ih_regs *ih_regs;
>   
>   	wptr = le32_to_cpu(*ih->wptr_cpu);
> +
> +	if (ih == &adev->irq.ih_soft)
> +		goto out;
> +
>   	ih_regs = &ih->ih_regs;
>   
>   	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> @@ -527,6 +531,9 @@ static void ih_v7_0_set_rptr(struct amdgpu_device *adev,
>   {
>   	struct amdgpu_ih_regs *ih_regs;
>   
> +	if (ih == &adev->irq.ih_soft)
> +		return;
> +
>   	if (ih->use_doorbell) {
>   		/* XXX check if swapping is necessary on BE */
>   		*ih->rptr_cpu = ih->rptr;
> diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> index 4cd325149b63..e7ed37bb48e0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> @@ -417,6 +417,10 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device *adev,
>   		 */
>   		wptr = le32_to_cpu(*ih->wptr_cpu);
>   
> +		if (ih == &adev->irq.ih_soft)
> +			goto out;
> +
> +
>   		if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>   			goto out;
>   	}


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  2026-06-16 11:39   ` Tvrtko Ursulin
@ 2026-06-16 12:04     ` Timur Kristóf
  2026-06-16 13:32       ` Tvrtko Ursulin
  2026-06-16 12:52     ` Christian König
  1 sibling, 1 reply; 12+ messages in thread
From: Timur Kristóf @ 2026-06-16 12:04 UTC (permalink / raw)
  To: amd-gfx, Alex Deucher, christian.koenig, Marek Olšák,
	Natalie Vock, Melissa Wen, amir.shetaia, Tvrtko Ursulin

On Tuesday, June 16, 2026 1:39:56 PM Central European Summer Time Tvrtko 
Ursulin wrote:
> On 13/05/2026 18:08, Timur Kristóf wrote:
> > The soft IH ring is implemented entirely in software.
> > We shouldn't read (or write) and HW registers when accessing it.
> > 
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> > 
> >   drivers/gpu/drm/amd/amdgpu/ih_v6_0.c   | 7 +++++++
> >   drivers/gpu/drm/amd/amdgpu/ih_v6_1.c   | 7 +++++++
> >   drivers/gpu/drm/amd/amdgpu/ih_v7_0.c   | 7 +++++++
> >   drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 ++++
> >   4 files changed, 25 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> > b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c index 333e9c30c091..65e5d21753f9
> > 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
> > @@ -439,6 +439,10 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device
> > *adev,> 
> >   	struct amdgpu_ih_regs *ih_regs;
> >   	
> >   	wptr = le32_to_cpu(*ih->wptr_cpu);
> > 
> > +
> > +	if (ih == &adev->irq.ih_soft)
> > +		goto out;
> > +
> 
> Would it be feasible to move amdgpu_ih_funcs from device global into the
> IH rings themselves? Then we could have soft IH ops and it would be very
> clean.
> 
> Possibly also cleanup all the protoptyes to operate only on ih and not
> the adev + ih pair.

Sure, we can do that in the future. The reason I chose not to do that is 
because that feels like an extremely intrusive refactor across all GPU 
generations with a high chance of introducing regressions and not much value 
to end users.

For now I would like to just focus on making the current code work well with 
minimal refactoring, ie. just get the current soft IH ring implementation to 
work reliably with retry faults.

In the meantime if you have a good idea how to refactor this code to make it 
cleaner without breaking it, I'm happy to listen and we can make a plan how to 
do that in a future series.

Thanks,
Timur




> 
> >   	ih_regs = &ih->ih_regs;
> >   	
> >   	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> > 
> > @@ -514,6 +518,9 @@ static void ih_v6_0_set_rptr(struct amdgpu_device
> > *adev,> 
> >   {
> >   
> >   	struct amdgpu_ih_regs *ih_regs;
> > 
> > +	if (ih == &adev->irq.ih_soft)
> > +		return;
> > +
> > 
> >   	if (ih->use_doorbell) {
> >   	
> >   		/* XXX check if swapping is necessary on BE */
> >   		*ih->rptr_cpu = ih->rptr;
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> > b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c index 699c274d357e..9dbc20131410
> > 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> > @@ -410,6 +410,10 @@ static u32 ih_v6_1_get_wptr(struct amdgpu_device
> > *adev,> 
> >   	struct amdgpu_ih_regs *ih_regs;
> >   	
> >   	wptr = le32_to_cpu(*ih->wptr_cpu);
> > 
> > +
> > +	if (ih == &adev->irq.ih_soft)
> > +		goto out;
> > +
> > 
> >   	ih_regs = &ih->ih_regs;
> >   	
> >   	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> > 
> > @@ -481,6 +485,9 @@ static void ih_v6_1_irq_rearm(struct amdgpu_device
> > *adev,> 
> >   static void ih_v6_1_set_rptr(struct amdgpu_device *adev,
> >   
> >   			       struct amdgpu_ih_ring *ih)
> >   
> >   {
> > 
> > +	if (ih == &adev->irq.ih_soft)
> > +		return;
> > +
> > 
> >   	struct amdgpu_ih_regs *ih_regs;
> >   	
> >   	if (ih->use_doorbell) {
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
> > b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c index 6de9e87e04e1..bd332e8cc5bf
> > 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
> > @@ -457,6 +457,10 @@ static u32 ih_v7_0_get_wptr(struct amdgpu_device
> > *adev,> 
> >   	struct amdgpu_ih_regs *ih_regs;
> >   	
> >   	wptr = le32_to_cpu(*ih->wptr_cpu);
> > 
> > +
> > +	if (ih == &adev->irq.ih_soft)
> > +		goto out;
> > +
> > 
> >   	ih_regs = &ih->ih_regs;
> >   	
> >   	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> > 
> > @@ -527,6 +531,9 @@ static void ih_v7_0_set_rptr(struct amdgpu_device
> > *adev,> 
> >   {
> >   
> >   	struct amdgpu_ih_regs *ih_regs;
> > 
> > +	if (ih == &adev->irq.ih_soft)
> > +		return;
> > +
> > 
> >   	if (ih->use_doorbell) {
> >   	
> >   		/* XXX check if swapping is necessary on BE */
> >   		*ih->rptr_cpu = ih->rptr;
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> > b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c index 4cd325149b63..e7ed37bb48e0
> > 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> > @@ -417,6 +417,10 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device
> > *adev,> 
> >   		 */
> >   		
> >   		wptr = le32_to_cpu(*ih->wptr_cpu);
> > 
> > +		if (ih == &adev->irq.ih_soft)
> > +			goto out;
> > +
> > +
> > 
> >   		if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
> >   		
> >   			goto out;
> >   	
> >   	}





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for soft IH ring
  2026-05-13 17:08 ` [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for " Timur Kristóf
@ 2026-06-16 12:08   ` Tvrtko Ursulin
  2026-06-16 14:29     ` Alex Deucher
  0 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2026-06-16 12:08 UTC (permalink / raw)
  To: Timur Kristóf, amd-gfx, Alex Deucher, christian.koenig,
	Marek Olšák, Natalie Vock, Melissa Wen, amir.shetaia


On 13/05/2026 18:08, Timur Kristóf wrote:
> Allow the kernel to dispatch the soft IH work on other CPUs.
> 
> Otherwise it can happen that the soft IH ring fills up
> before it actually starts processing anything, which
> can easily happen with retry page faults, in which case
> the CP repeatedly spams the CPU with a lot of interrupts.
> 
> This significantly improves retry page fault handling on
> GPUs that don't have the filter CAM and must rely on
> software based filtering.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index 82bc6d657e5a..515fc32051c8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -549,7 +549,7 @@ void amdgpu_irq_delegate(struct amdgpu_device *adev,
>   			 unsigned int num_dw)
>   {
>   	amdgpu_ih_ring_write(adev, &adev->irq.ih_soft, entry->iv_entry, num_dw);
> -	schedule_work(&adev->irq.ih_soft_work);
> +	queue_work(system_unbound_wq, &adev->irq.ih_soft_work);
>   }
>   
>   /**

Look good to me.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>

Maybe later we can consider a high priority driver specific worker or 
something but for now moving away from default system percpu sounds like 
it addresses the problem statement.

Regards,

Tvrtko


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  2026-06-16 11:39   ` Tvrtko Ursulin
  2026-06-16 12:04     ` Timur Kristóf
@ 2026-06-16 12:52     ` Christian König
  1 sibling, 0 replies; 12+ messages in thread
From: Christian König @ 2026-06-16 12:52 UTC (permalink / raw)
  To: Tvrtko Ursulin, Timur Kristóf, amd-gfx, Alex Deucher,
	Marek Olšák, Natalie Vock, Melissa Wen, amir.shetaia

On 6/16/26 13:39, Tvrtko Ursulin wrote:
> 
> On 13/05/2026 18:08, Timur Kristóf wrote:
>> The soft IH ring is implemented entirely in software.
>> We shouldn't read (or write) and HW registers when accessing it.
>>
>> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/ih_v6_0.c   | 7 +++++++
>>   drivers/gpu/drm/amd/amdgpu/ih_v6_1.c   | 7 +++++++
>>   drivers/gpu/drm/amd/amdgpu/ih_v7_0.c   | 7 +++++++
>>   drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 ++++
>>   4 files changed, 25 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
>> index 333e9c30c091..65e5d21753f9 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
>> @@ -439,6 +439,10 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device *adev,
>>       struct amdgpu_ih_regs *ih_regs;
>>         wptr = le32_to_cpu(*ih->wptr_cpu);
>> +
>> +    if (ih == &adev->irq.ih_soft)
>> +        goto out;
>> +
> 
> Would it be feasible to move amdgpu_ih_funcs from device global into the IH rings themselves? Then we could have soft IH ops and it would be very clean.

I've thought about that multiple times as well but never had the time to actually do it.

So feel free to implement the idea.

Thanks,
Christian.

> 
> Possibly also cleanup all the protoptyes to operate only on ih and not the adev + ih pair.
> 
> Regards,
> 
> Tvrtko
> 
>>       ih_regs = &ih->ih_regs;
>>         if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>> @@ -514,6 +518,9 @@ static void ih_v6_0_set_rptr(struct amdgpu_device *adev,
>>   {
>>       struct amdgpu_ih_regs *ih_regs;
>>   +    if (ih == &adev->irq.ih_soft)
>> +        return;
>> +
>>       if (ih->use_doorbell) {
>>           /* XXX check if swapping is necessary on BE */
>>           *ih->rptr_cpu = ih->rptr;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
>> index 699c274d357e..9dbc20131410 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
>> @@ -410,6 +410,10 @@ static u32 ih_v6_1_get_wptr(struct amdgpu_device *adev,
>>       struct amdgpu_ih_regs *ih_regs;
>>         wptr = le32_to_cpu(*ih->wptr_cpu);
>> +
>> +    if (ih == &adev->irq.ih_soft)
>> +        goto out;
>> +
>>       ih_regs = &ih->ih_regs;
>>         if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>> @@ -481,6 +485,9 @@ static void ih_v6_1_irq_rearm(struct amdgpu_device *adev,
>>   static void ih_v6_1_set_rptr(struct amdgpu_device *adev,
>>                      struct amdgpu_ih_ring *ih)
>>   {
>> +    if (ih == &adev->irq.ih_soft)
>> +        return;
>> +
>>       struct amdgpu_ih_regs *ih_regs;
>>         if (ih->use_doorbell) {
>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>> index 6de9e87e04e1..bd332e8cc5bf 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>> @@ -457,6 +457,10 @@ static u32 ih_v7_0_get_wptr(struct amdgpu_device *adev,
>>       struct amdgpu_ih_regs *ih_regs;
>>         wptr = le32_to_cpu(*ih->wptr_cpu);
>> +
>> +    if (ih == &adev->irq.ih_soft)
>> +        goto out;
>> +
>>       ih_regs = &ih->ih_regs;
>>         if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>> @@ -527,6 +531,9 @@ static void ih_v7_0_set_rptr(struct amdgpu_device *adev,
>>   {
>>       struct amdgpu_ih_regs *ih_regs;
>>   +    if (ih == &adev->irq.ih_soft)
>> +        return;
>> +
>>       if (ih->use_doorbell) {
>>           /* XXX check if swapping is necessary on BE */
>>           *ih->rptr_cpu = ih->rptr;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
>> index 4cd325149b63..e7ed37bb48e0 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
>> @@ -417,6 +417,10 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device *adev,
>>            */
>>           wptr = le32_to_cpu(*ih->wptr_cpu);
>>   +        if (ih == &adev->irq.ih_soft)
>> +            goto out;
>> +
>> +
>>           if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>>               goto out;
>>       }
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring
  2026-06-16 12:04     ` Timur Kristóf
@ 2026-06-16 13:32       ` Tvrtko Ursulin
  0 siblings, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2026-06-16 13:32 UTC (permalink / raw)
  To: Timur Kristóf, amd-gfx, Alex Deucher, christian.koenig,
	Marek Olšák, Natalie Vock, Melissa Wen, amir.shetaia


On 16/06/2026 13:04, Timur Kristóf wrote:
> On Tuesday, June 16, 2026 1:39:56 PM Central European Summer Time Tvrtko
> Ursulin wrote:
>> On 13/05/2026 18:08, Timur Kristóf wrote:
>>> The soft IH ring is implemented entirely in software.
>>> We shouldn't read (or write) and HW registers when accessing it.
>>>
>>> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
>>> ---
>>>
>>>    drivers/gpu/drm/amd/amdgpu/ih_v6_0.c   | 7 +++++++
>>>    drivers/gpu/drm/amd/amdgpu/ih_v6_1.c   | 7 +++++++
>>>    drivers/gpu/drm/amd/amdgpu/ih_v7_0.c   | 7 +++++++
>>>    drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 ++++
>>>    4 files changed, 25 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
>>> b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c index 333e9c30c091..65e5d21753f9
>>> 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
>>> @@ -439,6 +439,10 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device
>>> *adev,>
>>>    	struct amdgpu_ih_regs *ih_regs;
>>>    	
>>>    	wptr = le32_to_cpu(*ih->wptr_cpu);
>>>
>>> +
>>> +	if (ih == &adev->irq.ih_soft)
>>> +		goto out;
>>> +
>>
>> Would it be feasible to move amdgpu_ih_funcs from device global into the
>> IH rings themselves? Then we could have soft IH ops and it would be very
>> clean.
>>
>> Possibly also cleanup all the protoptyes to operate only on ih and not
>> the adev + ih pair.
> 
> Sure, we can do that in the future. The reason I chose not to do that is
> because that feels like an extremely intrusive refactor across all GPU
> generations with a high chance of introducing regressions and not much value
> to end users.
> 
> For now I would like to just focus on making the current code work well with
> minimal refactoring, ie. just get the current soft IH ring implementation to
> work reliably with retry faults.
> 
> In the meantime if you have a good idea how to refactor this code to make it
> cleaner without breaking it, I'm happy to listen and we can make a plan how to
> do that in a future series.

I can play with that refactor later, now that Christian gave a green light.

For this patch - it looks good to me. I am somewhat confused by the 
endianess conversion in amdgpu_ih_ring_write() (why is that needed for a 
software ring?), but even if unecessary it can be improved later so:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>

Regards,

Tvrtko

>>>    	ih_regs = &ih->ih_regs;
>>>    	
>>>    	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>>>
>>> @@ -514,6 +518,9 @@ static void ih_v6_0_set_rptr(struct amdgpu_device
>>> *adev,>
>>>    {
>>>    
>>>    	struct amdgpu_ih_regs *ih_regs;
>>>
>>> +	if (ih == &adev->irq.ih_soft)
>>> +		return;
>>> +
>>>
>>>    	if (ih->use_doorbell) {
>>>    	
>>>    		/* XXX check if swapping is necessary on BE */
>>>    		*ih->rptr_cpu = ih->rptr;
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
>>> b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c index 699c274d357e..9dbc20131410
>>> 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
>>> @@ -410,6 +410,10 @@ static u32 ih_v6_1_get_wptr(struct amdgpu_device
>>> *adev,>
>>>    	struct amdgpu_ih_regs *ih_regs;
>>>    	
>>>    	wptr = le32_to_cpu(*ih->wptr_cpu);
>>>
>>> +
>>> +	if (ih == &adev->irq.ih_soft)
>>> +		goto out;
>>> +
>>>
>>>    	ih_regs = &ih->ih_regs;
>>>    	
>>>    	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>>>
>>> @@ -481,6 +485,9 @@ static void ih_v6_1_irq_rearm(struct amdgpu_device
>>> *adev,>
>>>    static void ih_v6_1_set_rptr(struct amdgpu_device *adev,
>>>    
>>>    			       struct amdgpu_ih_ring *ih)
>>>    
>>>    {
>>>
>>> +	if (ih == &adev->irq.ih_soft)
>>> +		return;
>>> +
>>>
>>>    	struct amdgpu_ih_regs *ih_regs;
>>>    	
>>>    	if (ih->use_doorbell) {
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>> b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c index 6de9e87e04e1..bd332e8cc5bf
>>> 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
>>> @@ -457,6 +457,10 @@ static u32 ih_v7_0_get_wptr(struct amdgpu_device
>>> *adev,>
>>>    	struct amdgpu_ih_regs *ih_regs;
>>>    	
>>>    	wptr = le32_to_cpu(*ih->wptr_cpu);
>>>
>>> +
>>> +	if (ih == &adev->irq.ih_soft)
>>> +		goto out;
>>> +
>>>
>>>    	ih_regs = &ih->ih_regs;
>>>    	
>>>    	if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>>>
>>> @@ -527,6 +531,9 @@ static void ih_v7_0_set_rptr(struct amdgpu_device
>>> *adev,>
>>>    {
>>>    
>>>    	struct amdgpu_ih_regs *ih_regs;
>>>
>>> +	if (ih == &adev->irq.ih_soft)
>>> +		return;
>>> +
>>>
>>>    	if (ih->use_doorbell) {
>>>    	
>>>    		/* XXX check if swapping is necessary on BE */
>>>    		*ih->rptr_cpu = ih->rptr;
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
>>> b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c index 4cd325149b63..e7ed37bb48e0
>>> 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
>>> @@ -417,6 +417,10 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device
>>> *adev,>
>>>    		 */
>>>    		
>>>    		wptr = le32_to_cpu(*ih->wptr_cpu);
>>>
>>> +		if (ih == &adev->irq.ih_soft)
>>> +			goto out;
>>> +
>>> +
>>>
>>>    		if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
>>>    		
>>>    			goto out;
>>>    	
>>>    	}
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] amdgpu/ih6.1: Fix minor version
  2026-05-13 17:08 ` [PATCH 1/3] amdgpu/ih6.1: Fix minor version Timur Kristóf
  2026-06-16 11:18   ` Tvrtko Ursulin
@ 2026-06-16 14:28   ` Alex Deucher
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2026-06-16 14:28 UTC (permalink / raw)
  To: Timur Kristóf
  Cc: amd-gfx, Alex Deucher, christian.koenig, Marek Olšák,
	Natalie Vock, Melissa Wen, amir.shetaia

Applied.  Thanks!

On Wed, May 13, 2026 at 1:08 PM Timur Kristóf <timur.kristof@gmail.com> wrote:
>
> Report the correct version of IH v6.1 (previously it showed v6.0).
>
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> index 95b3f4e55ec3..699c274d357e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
> @@ -790,7 +790,7 @@ static void ih_v6_1_set_interrupt_funcs(struct amdgpu_device *adev)
>  const struct amdgpu_ip_block_version ih_v6_1_ip_block = {
>         .type = AMD_IP_BLOCK_TYPE_IH,
>         .major = 6,
> -       .minor = 0,
> +       .minor = 1,
>         .rev = 0,
>         .funcs = &ih_v6_1_ip_funcs,
>  };
> --
> 2.54.0
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for soft IH ring
  2026-06-16 12:08   ` Tvrtko Ursulin
@ 2026-06-16 14:29     ` Alex Deucher
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2026-06-16 14:29 UTC (permalink / raw)
  To: Tvrtko Ursulin
  Cc: Timur Kristóf, amd-gfx, Alex Deucher, christian.koenig,
	Marek Olšák, Natalie Vock, Melissa Wen, amir.shetaia

Applied.  Thanks!

On Tue, Jun 16, 2026 at 8:19 AM Tvrtko Ursulin <tursulin@ursulin.net> wrote:
>
>
> On 13/05/2026 18:08, Timur Kristóf wrote:
> > Allow the kernel to dispatch the soft IH work on other CPUs.
> >
> > Otherwise it can happen that the soft IH ring fills up
> > before it actually starts processing anything, which
> > can easily happen with retry page faults, in which case
> > the CP repeatedly spams the CPU with a lot of interrupts.
> >
> > This significantly improves retry page fault handling on
> > GPUs that don't have the filter CAM and must rely on
> > software based filtering.
> >
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> > index 82bc6d657e5a..515fc32051c8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> > @@ -549,7 +549,7 @@ void amdgpu_irq_delegate(struct amdgpu_device *adev,
> >                        unsigned int num_dw)
> >   {
> >       amdgpu_ih_ring_write(adev, &adev->irq.ih_soft, entry->iv_entry, num_dw);
> > -     schedule_work(&adev->irq.ih_soft_work);
> > +     queue_work(system_unbound_wq, &adev->irq.ih_soft_work);
> >   }
> >
> >   /**
>
> Look good to me.
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>
> Maybe later we can consider a high priority driver specific worker or
> something but for now moving away from default system percpu sounds like
> it addresses the problem statement.
>
> Regards,
>
> Tvrtko
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-06-16 14:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 17:08 [PATCH 0/3] Improve soft IH ring Timur Kristóf
2026-05-13 17:08 ` [PATCH 1/3] amdgpu/ih6.1: Fix minor version Timur Kristóf
2026-06-16 11:18   ` Tvrtko Ursulin
2026-06-16 14:28   ` Alex Deucher
2026-05-13 17:08 ` [PATCH 2/3] amdgpu/ih: Don't perturb HW registers when accessing soft IH ring Timur Kristóf
2026-06-16 11:39   ` Tvrtko Ursulin
2026-06-16 12:04     ` Timur Kristóf
2026-06-16 13:32       ` Tvrtko Ursulin
2026-06-16 12:52     ` Christian König
2026-05-13 17:08 ` [PATCH 3/3] drm/amdgpu: Use system unbound workqueue for " Timur Kristóf
2026-06-16 12:08   ` Tvrtko Ursulin
2026-06-16 14:29     ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.