Re: Radeon DRM kmod problem after LLVM upgrade!?

From: Yuri <yuri_at_aetern.org>
Date: Sat, 02 Dec 2023 02:00:19 UTC
George Mitchell wrote:
> This afternoon after upgrading llvm15 from 15.0.7_5 to 15.0.7_7, Xorg
> no longer runs properly -- if I use drm-510-kmod instead of VESA.
> 
> My display card is Raven Ridge [Radeon Vega Series / Radeon Vega Mobile
> Series] (USB id vendor=0x1002 device=0x15dd).
> 
> When I boot in single-user mode, load the amdgpu.ko module from
> graphics/drm-510-kmod, and attempt to start Xorg, I get a pretty
> pattern of dots all over the screen, and Xorg reports (on the console):
> 
> ac_rtld error: !data || data->d_size != shdr->sh_size
> LLVM failed to upload shader
> ac_rtld error: !data || data->d_size != shdr->sh_size
> LLVM failed to upload shader
> EE ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:2505
> si_build_shader_variant - Failed to build shader variant (type=0)
> ac_rtld error: !data || data->d_size != shdr->sh_size
> LLVM failed to upload shader
> EE ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:2505
> si_build_shader_variant - Failed to build shader variant (type=0)
> ac_rtld error: !data || data->d_size != shdr->sh_size
> LLVM failed to upload shader
> EE ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:2505
> si_build_shader_variant - Failed to build shader variant (type=0)
> ac_rtld error: !data || data->d_size != shdr->sh_size
> LLVM failed to upload shader
> EE ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:2505
> si_build_shader_variant - Failed to build shader variant (type=0)
> ac_rtld error: !data || data->d_size != shdr->sh_size
> LLVM failed to upload shader
> EE ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:2505
> si_build_shader_variant - Failed to build shader variant (type=0)
> 
> Everything is fine if I use VESA mode, thankfully.
> 
> My system has never been completely trouble-free with amd-510-kmod,
> but it has so far worked wonderfully well when it doesn't crash.  But
> how that driver could interact with LLVM is beyond me.  Should I try
> simply recompiling the module with the latest LLVM?       -- George
> 

See also:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275388

and this may or may not help:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275443