Download raw body.
radeondrm: fix CAFEDEAD failure during boot for old Radeons
On Thu, Oct 08, 2026 at 09:02:39AM -0600, Ted Bullock wrote:
> the old radeons i listed in my original mail all report the same issue
>
> https://marc.info/?l=openbsd-bugs&m=162447131102854
> https://marc.info/?l=openbsd-bugs&m=177938265735653
> https://marc.info/?l=openbsd-misc&m=155873575216626&w=2
>
> not all of those are sparc 64 there are plenty of old power pc that
> have these exact vintage chips too so id advise something more robust
> than that but i don't have any to test.
Index: sys/dev/pci/drm/radeon/radeon.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon.h,v
diff -u -p -r1.33 radeon.h
--- sys/dev/pci/drm/radeon/radeon.h 9 Mar 2026 23:58:03 -0000 1.33
+++ sys/dev/pci/drm/radeon/radeon.h 8 Oct 2026 23:22:11 -0000
@@ -2326,6 +2326,7 @@ struct radeon_device {
bus_space_tag_t memt;
bus_dma_tag_t dmat;
void *irqh;
+ bool dma_limited;
void (*switchcb)(void *, int, int);
void *switchcbarg;
Index: sys/dev/pci/drm/radeon/radeon_device.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon_device.c,v
diff -u -p -r1.34 radeon_device.c
--- sys/dev/pci/drm/radeon/radeon_device.c 5 Oct 2026 08:14:58 -0000 1.34
+++ sys/dev/pci/drm/radeon/radeon_device.c 8 Oct 2026 23:49:59 -0000
@@ -1392,6 +1392,13 @@ int radeon_device_init(struct radeon_dev
}
rdev->need_swiotlb = drm_need_swiotlb(dma_bits);
+ /* disabling sparc64 iommu requires 64 bits */
+#ifdef __sparc64__
+ rdev->dma_limited = true;
+#else
+ rdev->dma_limited = dma_bits <= 32;
+#endif
+
/* Registers mapping */
/* TODO: block userspace mapping of io register */
mtx_init(&rdev->mmio_idx_lock, IPL_TTY);
Index: sys/dev/pci/drm/radeon/radeon_ttm.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon_ttm.c,v
diff -u -p -r1.28 radeon_ttm.c
--- sys/dev/pci/drm/radeon/radeon_ttm.c 9 Mar 2026 23:58:03 -0000 1.28
+++ sys/dev/pci/drm/radeon/radeon_ttm.c 8 Oct 2026 23:22:11 -0000
@@ -717,7 +717,7 @@ int radeon_ttm_init(struct radeon_device
/*rdev_to_drm(rdev)->anon_inode->i_mapping*/NULL,
rdev_to_drm(rdev)->vma_offset_manager,
rdev->need_swiotlb,
- dma_addressing_limited(&rdev->pdev->dev));
+ rdev->dma_limited);
#endif
if (r) {
DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
radeondrm: fix CAFEDEAD failure during boot for old Radeons