Skip to content

amdgpu panic: Offset 00000000 out of framebuffer size on Strix [Radeon 880M / 890M] #408

@emaste

Description

@emaste

Describe the bug
System panics immediately after kldload amgpu

FreeBSD version

FreeBSD AI300 16.0-CURRENT FreeBSD 16.0-CURRENT #7 n283918-87f5b3153f15-dirty: Thu Jan 29 09:12:12 EST 2026     user@AI300:/home/user/obj/home/user/freebsd/amd64.amd64/sys/GENERIC amd64 1600011 1600004

This is my WIP tree on top of commit 783b8a0fd880255a8315db7f59d0450bd7276f4d

PCI Info

vgapci0@pci0:193:0:0:   class=0x038000 rev=0xc1 hdr=0x00 vendor=0x1002 device=0x150e subvendor=0xf111 subdevice=0x000d
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Strix [Radeon 880M / 890M]'
    class      = display

DRM KMOD version

commit 18debec29a6f2f84c8f72b87b22d704648dd3aa7 (origin/master, origin/HEAD)
Author: Ed Maste <emaste@FreeBSD.org>
Date:   Mon Nov 24 21:48:16 2025 -0500

    drm/amd/display: Protect FPU in dml2_init() and dml2_validate()
    
    Part of Linux commits afcdf51d97cd58dd7a2e0aa8acbaea5108fa6826 and
    366e77cd4923c3aa45341e15dcaf3377af9b042f by Huacai Chenl
    <chenhuacai@kernel.org>.
    
    Fixes #372.

To Reproduce
kldload amdgpu

Screenshots

Additional context
In struct linux_fb_info *info, info->screen_base and info->screen_size are both 0.
Adding the hack shown below to fb_setpixel() avoids the panic but as is clear from the patch results in a nonfunctional console. Nonetheless it is possible to start X (as in https://mastodon.social/@emaste/115667720362871745).

diff --git a/drivers/gpu/drm/linux_fb.c b/drivers/gpu/drm/linux_fb.c
index 2aad76ab15..a76fa7b107 100644
--- a/drivers/gpu/drm/linux_fb.c
+++ b/drivers/gpu/drm/linux_fb.c
@@ -334,6 +334,10 @@ fb_setpixel(struct linux_fb_info *info, uint32_t x, uint32_t y,
        uint32_t bytes_per_pixel;
        unsigned int offset;
 
+       /* amdgpu does not populate these */
+       if (info->screen_base == 0 || info->screen_size == 0)
+               return;
+
        bytes_per_pixel = info->var.bits_per_pixel / 8;
        offset = info->fix.line_length * y + x * bytes_per_pixel;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions