06-03-2023, 01:01 PM
(This post was last modified: 06-03-2023, 08:58 PM by Der Geist der Maschine.
Edit Reason: GPU library packages
)
GPU firmware loading fails on armbian:
This is probably a first step in having GPU support in Xorg and Wayland.
Apply this kernel patch
Configure the gpu driver as a module
Rebuild the kernel and modules and install them.
The driver needs to be compiled as a kernel module. Unsophisticated guess: that moves out the initialization of the gpu from initrd into systemd-land. That is why the firmware does not need to be in initrd but can reside on the /-filesystem.
The two firmware blobs rgx.fw.36.50.54.182 rgx.sh.36.50.54.182 need to be moved into /lib/firmware/ directory. They come from starfive-'s github repro https://media.githubusercontent.com/medi...866.tar.gz
A reboot shows successful firmware load
Th next step in having GPU support in Xorg and Wayland is probably installing the libs, bin, and headers from said img-gpu-powervr-bin-1.17.6210866.tar.gz "[this] is a GPU library packages from Imagination and provide GPU firmware, libOpenCL, vulkan, gles2, gles3. This library is not open source, only provide with binary library." I have not tried that.
Code:
[ 0.698528] PVR_K:(Fatal): 1: All RGX Firmware image loads failed for 'rgx.fw.36.50.54.182' (PVRSRV_ERROR_NOT_FOUND) [1599]
[ 0.698565] PVR_K:(Error): 1: RGXInit: InitFirmware failed (275) [1556]
[ 0.698592] PVR_K:(Error): 1: RGXInit() failed (PVRSRV_ERROR_NOT_FOUND) in PVRSRVCommonDeviceInitialise() [2156]
[ 0.698626] PVR_K:(Error): 1: PVRSRVDeviceFinalise() failed (PVRSRV_ERROR_NOT_INITIALISED) in PVRSRVCommonDeviceInitialise() [2170]
[ 0.698664] [drm:pvr_drm_load] *ERROR* device (____ptrval____) initialisation failed (err=-19)
This is probably a first step in having GPU support in Xorg and Wayland.
Apply this kernel patch
Code:
schaecsn@pc:~/risc/linux# git diff drivers/gpu/drm/img/img-rogue/Kconfig
diff --git a/drivers/gpu/drm/img/img-rogue/Kconfig b/drivers/gpu/drm/img/img-rogue/Kconfig
index 5b793bb9da0e..6f84a2643e02 100644
--- a/drivers/gpu/drm/img/img-rogue/Kconfig
+++ b/drivers/gpu/drm/img/img-rogue/Kconfig
@@ -1,5 +1,5 @@
config DRM_IMG_ROGUE
- bool "DRM support for PowerVR GPU"
+ tristate "DRM support for PowerVR GPU"
select DRM_IMG
default n
help
Configure the gpu driver as a module
Code:
schaecsn@pc:~/riscv/linux$ scripts/config -m CONFIG_DRM_IMG_ROGUE
Rebuild the kernel and modules and install them.
The driver needs to be compiled as a kernel module. Unsophisticated guess: that moves out the initialization of the gpu from initrd into systemd-land. That is why the firmware does not need to be in initrd but can reside on the /-filesystem.
The two firmware blobs rgx.fw.36.50.54.182 rgx.sh.36.50.54.182 need to be moved into /lib/firmware/ directory. They come from starfive-'s github repro https://media.githubusercontent.com/medi...866.tar.gz
Code:
schaecsn@star64:~$ sudo mv img-gpu-powervr-bin-1.17.6210866/target/lib/firmware/* /lib/firmware/
A reboot shows successful firmware load
Code:
[ 26.414834] PVR_K: 362: Read BVNC 36.50.54.182 from HW device registers
[ 26.414879] PVR_K: 362: RGX Device registered BVNC 36.50.54.182 with 1 core in the system
[ 26.422574] PVR_K: 362: RGX Firmware image 'rgx.fw.36.50.54.182' loaded
[ 26.442903] PVR_K: 362: Shader binary image 'rgx.sh.36.50.54.182' loaded
Th next step in having GPU support in Xorg and Wayland is probably installing the libs, bin, and headers from said img-gpu-powervr-bin-1.17.6210866.tar.gz "[this] is a GPU library packages from Imagination and provide GPU firmware, libOpenCL, vulkan, gles2, gles3. This library is not open source, only provide with binary library." I have not tried that.