From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Yifan Zhang <yifan1.zhang@amd.com>
Subject: [PATCH 03/12] drm/amdgpu/gfx10: handle gfxoff in interrupt set functions
Date: Mon, 26 Jan 2026 15:07:38 -0500 [thread overview]
Message-ID: <20260126200747.13527-3-alexander.deucher@amd.com> (raw)
In-Reply-To: <20260126200747.13527-1-alexander.deucher@amd.com>
Need to make sure gfxoff is disallowed when we touch GC
registers over MMIO.
Cc: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 496121bdc1de1..31dd0aeef509d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -9141,6 +9141,7 @@ static int gfx_v10_0_set_eop_interrupt_state(struct amdgpu_device *adev,
unsigned int type,
enum amdgpu_interrupt_state state)
{
+ amdgpu_gfx_off_ctrl(adev, false);
switch (type) {
case AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP:
gfx_v10_0_set_gfx_eop_interrupt_state(adev, 0, 0, state);
@@ -9175,6 +9176,8 @@ static int gfx_v10_0_set_eop_interrupt_state(struct amdgpu_device *adev,
default:
break;
}
+ amdgpu_gfx_off_ctrl(adev, true);
+
return 0;
}
@@ -9226,6 +9229,7 @@ static int gfx_v10_0_set_priv_reg_fault_state(struct amdgpu_device *adev,
u32 cp_int_cntl_reg, cp_int_cntl;
int i, j;
+ amdgpu_gfx_off_ctrl(adev, false);
switch (state) {
case AMDGPU_IRQ_STATE_DISABLE:
case AMDGPU_IRQ_STATE_ENABLE:
@@ -9260,6 +9264,7 @@ static int gfx_v10_0_set_priv_reg_fault_state(struct amdgpu_device *adev,
default:
break;
}
+ amdgpu_gfx_off_ctrl(adev, true);
return 0;
}
@@ -9272,6 +9277,7 @@ static int gfx_v10_0_set_bad_op_fault_state(struct amdgpu_device *adev,
u32 cp_int_cntl_reg, cp_int_cntl;
int i, j;
+ amdgpu_gfx_off_ctrl(adev, false);
switch (state) {
case AMDGPU_IRQ_STATE_DISABLE:
case AMDGPU_IRQ_STATE_ENABLE:
@@ -9306,6 +9312,8 @@ static int gfx_v10_0_set_bad_op_fault_state(struct amdgpu_device *adev,
default:
break;
}
+ amdgpu_gfx_off_ctrl(adev, true);
+
return 0;
}
@@ -9317,6 +9325,7 @@ static int gfx_v10_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
u32 cp_int_cntl_reg, cp_int_cntl;
int i, j;
+ amdgpu_gfx_off_ctrl(adev, false);
switch (state) {
case AMDGPU_IRQ_STATE_DISABLE:
case AMDGPU_IRQ_STATE_ENABLE:
@@ -9337,6 +9346,7 @@ static int gfx_v10_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
default:
break;
}
+ amdgpu_gfx_off_ctrl(adev, true);
return 0;
}
@@ -9410,6 +9420,7 @@ static int gfx_v10_0_kiq_set_interrupt_state(struct amdgpu_device *adev,
uint32_t tmp, target;
struct amdgpu_ring *ring = &(adev->gfx.kiq[0].ring);
+ amdgpu_gfx_off_ctrl(adev, false);
if (ring->me == 1)
target = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE0_INT_CNTL);
else
@@ -9444,6 +9455,8 @@ static int gfx_v10_0_kiq_set_interrupt_state(struct amdgpu_device *adev,
BUG(); /* kiq only support GENERIC2_INT now */
break;
}
+ amdgpu_gfx_off_ctrl(adev, true);
+
return 0;
}
--
2.52.0
next prev parent reply other threads:[~2026-01-26 20:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 20:07 [PATCH 01/12] drm/amdgpu/gfx9: handle gfxoff in interrupt set functions Alex Deucher
2026-01-26 20:07 ` [PATCH 02/12] drm/amdgpu/gmc9: " Alex Deucher
2026-01-26 20:07 ` Alex Deucher [this message]
2026-01-26 20:07 ` [PATCH 04/12] " Alex Deucher
2026-01-26 20:48 ` Alex Deucher
2026-01-27 0:34 ` Zhang, Yifan
2026-01-26 20:07 ` [PATCH 05/12] drm/amdgpu/sdma5: " Alex Deucher
2026-01-26 20:07 ` [PATCH 06/12] drm/amdgpu/sdma5.2: " Alex Deucher
2026-01-26 20:07 ` [PATCH 07/12] drm/amdgpu/gfx11: " Alex Deucher
2026-01-26 20:07 ` [PATCH 08/12] drm/amdgpu/sdma6: " Alex Deucher
2026-01-26 20:07 ` [PATCH 09/12] drm/amdgpu/gfx12: " Alex Deucher
2026-01-26 20:07 ` [PATCH 10/12] drm/amdgpu/gfx12.1: " Alex Deucher
2026-01-26 20:07 ` [PATCH 11/12] drm/amdgpu/sdma7: " Alex Deucher
2026-01-26 20:07 ` [PATCH 12/12] drm/amdgpu/sdma7.1: " Alex Deucher
2026-01-27 4:52 ` [PATCH 01/12] drm/amdgpu/gfx9: " Lazar, Lijo
2026-01-30 14:48 ` Alex Deucher
2026-01-30 15:05 ` Lazar, Lijo
2026-01-30 15:49 ` Alex Deucher
2026-01-31 6:04 ` Lazar, Lijo
2026-02-02 6:33 ` Zhang, Yifan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260126200747.13527-3-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=yifan1.zhang@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox