On Wed, May 27, 2026 at 10:54:27AM +0000, Jan Schreiber wrote:
> On 5/27/26 11:56, Stuart Henderson wrote:
> > In short: already defined, so if it hadn't broken the build, setting
> > "option ATOM_DEBUG" wouldn't have done anything anyway.
> >
> > These xxx_DEBUG are typically done by editing the relevant source file
> > and using #define there. Sometimes those might end up committed, that
> > is the case here:
> >
> > /sys/dev/pci/drm/amd/amdgpu/atom.c
> > 34:#define ATOM_DEBUG
> >
> > /sys/dev/pci/drm/radeon/atom.c
> > 35:#define ATOM_DEBUG
> >
> > this could happen e.g. if it's suspected there might be issues with
> > a driver etc and we want to get more information from any dmesg that
> > are sent in.
> >
>
> Thank you Stuart, as I understand you this is intentional/accepted.
> I can work around that but wasn't sure if its a wanted state so I reported
> it as a bug.
Why are you building a kernel with DEBUG/ATOM_DEBUG defined?
In the case of DEBUG, there was a local #undef change which got lost
with the last drm update.
On OpenBSD, the kernel is built in one directory, unlike Linux.
To avoid name conflicts, previously I renamed files now a #include is
used, which makes drm patches slightly easier.
committed this:
Index: sys/dev/pci/drm/amd/amdgpu/atom.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/atom.c,v
diff -u -p -r1.1 atom.c
--- sys/dev/pci/drm/amd/amdgpu/atom.c 9 Mar 2026 23:57:53 -0000 1.1
+++ sys/dev/pci/drm/amd/amdgpu/atom.c 27 May 2026 12:41:52 -0000
@@ -100,6 +100,10 @@ static void debug_print_spaces(int n)
printk(" ");
}
+#ifdef DEBUG
+#undef DEBUG
+#endif
+
#define DEBUG(...) do if (amdgpu_atom_debug) { printk(KERN_DEBUG __VA_ARGS__);
} while (0)
#define SDEBUG(...) do if (amdgpu_atom_debug) { printk(KERN_DEBUG);
debug_print_spaces(debug_depth); printk(__VA_ARGS__); } while (0)
#else