Skip to contentSkip to conversation

New: AMD RADEON RX 9070 XT - modprobe amdgpu is fail.

Bug 221376 In review [email protected] 4 participants 6 messages Apr 17 – Apr 21

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

https://bugzilla.kernel.org/show_bug.cgi?id=221376

Bug ID: 221376
Summary: AMD RADEON RX 9070 XT - modprobe amdgpu is fail.
Product: Drivers
Version: 2.5
Hardware: Intel
OS: Linux
Status: NEW
Severity: blocking
Priority: P3
Component: Video(DRI - non Intel)
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Created attachment 309877
--> https://bugzilla.kernel.org/attachment.cgi?id=309877&action=edit
Hardware info, Boot log, .config, cpuinfo, pciinfo, iomem, ...

Hi / Sawasdee

I found issue about amdgpu while i run "modprobe amdgpu". My graphic card is AMD RADEON RX 9070 XT.

Best regards
Chanisorn C.

-----------------------------------------------------------------

[  665.195522] Oops: invalid opcode: 0000 [#1] SMP NOPTI
[  665.200616] CPU: 12 UID: 0 PID: 348 Comm: kworker/12:1 Not tainted
6.18.22-x86_64 #1 PREEMPT(none)  32b191964ca8e3668a1a99e4763aaa24b9f95a74
[  665.213239] Hardware name: GIGABYTE MD72-HB1-00/MD72-HB1-00, BIOS F40
12/09/2025
[  665.220645] Workqueue: events work_for_cpu_fn
[  665.225018] RIP: 0010:drm_mm_init+0xc1/0xd0
[  665.229219] Code: 83 05 c2 c5 11 04 01 48 c7 83 f0 00 00 00 00 00 00 00 e8
a2 79 cd ff 48 83 05 b2 c5 11 04 01 5b c3 cc cc cc cc 0f 1f 40 00 90 <0f> 0b 66
66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90
[  665.247994] RSP: 0018:ffa000000d723b60 EFLAGS: 00010246
[  665.253238] RAX: 0000000000000000 RBX: ff11004093c27400 RCX:
000000000000001c
[  665.260380] RDX: 0000000000000000 RSI: 0000000000000000 RDI:
ff11004093c27480
[  665.267522] RBP: 0000000000000003 R08: 0000000000000dc0 R09:
00000000ffffffff
[  665.274686] R10: ff11004093c27400 R11: 0000000000000100 R12:
ff1100408b60f048
[  665.281847] R13: 0000000000000000 R14: 0000000000000000 R15:
000000000000000b
[  665.288985] FS:  0000000000000000(0000) GS:ff11007ffa92d000(0000)
knlGS:0000000000000000
[  665.297080] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  665.302841] CR2: 00007f15ed7d9f55 CR3: 000000000986a002 CR4:
0000000000771ef0
[  665.309987] PKRU: 55555554
[  665.312721] Call Trace:
[  665.315183]  <TASK>
[  665.317294]  ttm_range_man_init_nocheck+0x9d/0x180 [ttm
e3a55dbbe0be4b816fb72e148a49c41281811431]
[  665.326196]  amdgpu_ttm_init.cold+0x45e/0x5cc [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.336132]  ? vprintk_default+0x24/0x40
[  665.340076]  ? __pfx_amdgpu_bo_destroy+0x10/0x10 [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.349758]  amdgpu_bo_init.cold+0x5e/0x77 [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.358984]  gmc_v12_0_sw_init+0x470/0x6f0 [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.368144]  amdgpu_device_ip_init+0x8f/0xb43 [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.377685]  ? __pfx_drm_mode_config_init_release+0x10/0x10
[  665.383282]  ? __drmm_add_action_or_reset+0x22/0x60
[  665.388177]  amdgpu_device_init.cold+0x1495/0x1abe [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.398113]  ? pci_read_config_byte+0x51/0x60
[  665.402483]  amdgpu_driver_load_kms+0x1a/0x80 [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.411851]  amdgpu_pci_probe+0x28e/0x760 [amdgpu
48030e986eac021fd575f848f833ad5701b3f0f1]
[  665.421055]  local_pci_probe+0x51/0xc0
[  665.425013]  work_for_cpu_fn+0x1d/0x30
[  665.428929]  process_scheduled_works+0x2bc/0x680
[  665.433723]  worker_thread+0x1a6/0x4a0
[  665.437641]  ? _raw_spin_unlock_irqrestore+0x1d/0xa0
[  665.442778]  ? __pfx_worker_thread+0x10/0x10
[  665.447200]  kthread+0x1a4/0x3a0
[  665.450573]  ? __pfx_kthread+0x10/0x10
[  665.454462]  ret_from_fork+0x1f8/0x3b0
[  665.458352]  ? __pfx_kthread+0x10/0x10
[  665.462239]  ret_from_fork_asm+0x1a/0x30
[  665.466294]  </TASK>
[  665.468637] Modules linked in: amdgpu(+) amdxcp drm_ttm_helper ttm drm_exec
drm_panel_backlight_quirks gpu_sched drm_suballoc_helper drm_buddy
drm_display_helper cec rc_core igb i2c_algo_bit
[  665.485989] ---[ end trace 0000000000000000 ]---
Apr 18 12:55:32 localhost kernel: kernel BUG at drivers/gpu/drm/drm_mm.c:930!
[  666.125090] pstore: backend (erst) writing error (-28)
[  666.130558] RIP: 0010:drm_mm_init+0xc1/0xd0
Apr 18 12:55:33 [  666.134915] Code: 83 05 c2 c5 11 04 01 48 c7 83 f0 00 00 00

00 00 00 00 e8 a2 79 cd ff 48 83 05 b2 c5 11 04 01 5b c3 cc cc cc cc 0f 1f 40 00 90 <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 localhost kernel[ 666.155476] RSP: 0018:ffa000000d723b60 EFLAGS: 00010246 : pstore: backen[ 666.161693] RAX: 0000000000000000 RBX: ff11004093c27400 RCX:
000000000000001c
d (erst) writing[ 666.170211] RDX: 0000000000000000 RSI: 0000000000000000 RDI:
ff11004093c27480
error (-28)

[  666.178730] RBP: 0000000000000003 R08: 0000000000000dc0 R09:
00000000ffffffff
[  666.187155] R10: ff11004093c27400 R11: 0000000000000100 R12:
ff1100408b60f048
[  666.194550] R13: 0000000000000000 R14: 0000000000000000 R15:
000000000000000b
[  666.201840] FS:  0000000000000000(0000) GS:ff11007ffa92d000(0000)
knlGS:0000000000000000
[  666.210081] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  666.215985] CR2: 00007f15ed7d9f55 CR3: 000000000986a002 CR4:
0000000000771ef0
[  666.223298] PKRU: 55555554

-----------------------------------------------------------------

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 221376] AMD RADEON RX 9070 XT - modprobe amdgpu is fail.

https://bugzilla.kernel.org/show_bug.cgi?id=221376

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |ANSWERED

--- Comment #1 from Artem S. Tashkinov ([email protected]) --- Please report here

https://gitlab.freedesktop.org/drm/amd/-/issues

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

PATCH 1/1 drm/amdgpu: fix zero-size GDS range init on RDNA4

In reply to [email protected]

From: Arjan van de Ven <[email protected]>

RDNA4 (GFX 12) hardware removes the GDS, GWS, and OA on-chip memory resources. The gfx_v12_0 initialisation code correctly leaves adev->gds.gds_size, adev->gds.gws_size, and adev->gds.oa_size at zero to reflect this.

amdgpu_ttm_init() unconditionally calls amdgpu_ttm_init_on_chip() for each of these resources regardless of size. When the size is zero, amdgpu_ttm_init_on_chip() forwards the call to ttm_range_man_init(), which calls drm_mm_init(mm, 0, 0). drm_mm_init() immediately fires DRM_MM_BUG_ON(start + size <= start) -- trivially true when size is zero -- crashing the kernel during modprobe of amdgpu on an RX 9070 XT.

Guard against this by returning 0 early from amdgpu_ttm_init_on_chip() when size_in_page is zero. This skips TTM resource manager registration for hardware resources that are absent, without affecting any other GPU type.

Oops-Analysis: http://oops.fenrus.org/reports/bugzilla.korg/221376/report.html

Assisted-by GitHub Copilot:Claude Sonnet 4.6 linux-kernel-oops-x86.
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3 -0
index afaaab6496def..8075ac735321e 100644
@@ -75,6 +75,9 @@ static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
 				    unsigned int type,
 				    uint64_t size_in_page)
 {
+	if (!size_in_page)
+		return 0;
+
 	return ttm_range_man_init(&adev->mman.bdev, type,
 				  false, size_in_page);
 }
maintainer
#3 lore raw

Re: [PATCH] drm/amdgpu: fix zero-size GDS range init on RDNA4

Quoted 6 lines · On 4/20/26 23:57, [email protected] wrote:

RDNA4 (GFX 12) hardware removes the GDS, GWS, and OA on-chip memory resources. The gfx_v12_0 initialisation code correctly leaves adev->gds.gds_size, adev->gds.gws_size, and adev->gds.oa_size at zero to reflect this.

Quoted 6 lines

amdgpu_ttm_init() unconditionally calls amdgpu_ttm_init_on_chip() for each of these resources regardless of size. When the size is zero, amdgpu_ttm_init_on_chip() forwards the call to ttm_range_man_init(), which calls drm_mm_init(mm, 0, 0). drm_mm_init() immediately fires DRM_MM_BUG_ON(start + size <= start) -- trivially true when size is zero -- crashing the kernel during modprobe of amdgpu on an RX 9070 XT.

Mhm in general not a bad idea, but we are having tons of GFX 12 systems in our test machines and nothing is crashing there.

We are clearly missing something here. Is that on an upstream kernel or something backported?

Regards,
Christian.

Quoted 35 lines

Guard against this by returning 0 early from amdgpu_ttm_init_on_chip() when size_in_page is zero. This skips TTM resource manager registration for hardware resources that are absent, without affecting any other GPU type.

Oops-Analysis: http://oops.fenrus.org/reports/bugzilla.korg/221376/report.html

Assisted-by GitHub Copilot:Claude Sonnet 4.6 linux-kernel-oops-x86.
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3 -0
index afaaab6496def..8075ac735321e 100644
@@ -75,6 +75,9 @@ static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
                                    unsigned int type,
                                    uint64_t size_in_page)
 {
+       if (!size_in_page)
+               return 0;
+
        return ttm_range_man_init(&adev->mman.bdev, type,
                                  false, size_in_page);
 }
#4 lore raw

Re: [PATCH] drm/amdgpu: fix zero-size GDS range init on RDNA4

Quoted 14 lines · Christian König
Quoted 6 lines · On 4/20/26 23:57, [email protected] wrote:

RDNA4 (GFX 12) hardware removes the GDS, GWS, and OA on-chip memory resources. The gfx_v12_0 initialisation code correctly leaves adev->gds.gds_size, adev->gds.gws_size, and adev->gds.oa_size at zero to reflect this.

Quoted 6 lines

amdgpu_ttm_init() unconditionally calls amdgpu_ttm_init_on_chip() for each of these resources regardless of size. When the size is zero, amdgpu_ttm_init_on_chip() forwards the call to ttm_range_man_init(), which calls drm_mm_init(mm, 0, 0). drm_mm_init() immediately fires DRM_MM_BUG_ON(start + size <= start) -- trivially true when size is zero -- crashing the kernel during modprobe of amdgpu on an RX 9070 XT.

Quoted 4 lines

Mhm in general not a bad idea, but we are having tons of GFX 12 systems in our test machines and nothing is crashing there.

We are clearly missing something here. Is that on an upstream kernel or something backported?

the reported oops/etc say 6.18.22 so that does not sound like something crazy backported

(https://bugzilla.kernel.org/show_bug.cgi?id=221376)

#5 lore raw

Re: [PATCH] drm/amdgpu: fix zero-size GDS range init on RDNA4

In reply to Christian König
Quoted 15 lines · Christian König
Quoted 6 lines · On 4/20/26 23:57, [email protected] wrote:

RDNA4 (GFX 12) hardware removes the GDS, GWS, and OA on-chip memory resources. The gfx_v12_0 initialisation code correctly leaves adev->gds.gds_size, adev->gds.gws_size, and adev->gds.oa_size at zero to reflect this.

Quoted 6 lines

amdgpu_ttm_init() unconditionally calls amdgpu_ttm_init_on_chip() for each of these resources regardless of size. When the size is zero, amdgpu_ttm_init_on_chip() forwards the call to ttm_range_man_init(), which calls drm_mm_init(mm, 0, 0). drm_mm_init() immediately fires DRM_MM_BUG_ON(start + size <= start) -- trivially true when size is zero -- crashing the kernel during modprobe of amdgpu on an RX 9070 XT.

Quoted 3 lines

Mhm in general not a bad idea, but we are having tons of GFX 12 systems in our test machines and nothing is crashing there.

We are clearly missing something here. Is that on an upstream kernel or something backported?

Looks like that check only asserts if CONFIG_DRM_DEBUG_MM is set in the user's kernel config. I guess no one uses that option. These chips have been in the market for over a year and no one has reported that until now. Applied with a note about this in the commit message.

Thanks!

Alex

Quoted 40 lines

Regards,
Christian.

Quoted 35 lines

Guard against this by returning 0 early from amdgpu_ttm_init_on_chip() when size_in_page is zero. This skips TTM resource manager registration for hardware resources that are absent, without affecting any other GPU type.

Oops-Analysis: http://oops.fenrus.org/reports/bugzilla.korg/221376/report.html

Assisted-by GitHub Copilot:Claude Sonnet 4.6 linux-kernel-oops-x86.
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3 -0
index afaaab6496def..8075ac735321e 100644
@@ -75,6 +75,9 @@ static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
                                    unsigned int type,
                                    uint64_t size_in_page)
 {
+       if (!size_in_page)
+               return 0;
+
        return ttm_range_man_init(&adev->mman.bdev, type,
                                  false, size_in_page);
 }