Hi all.
I'm trying to build BX301A01B-SW-99002-r29p0-01eac0.tar driver with linux kernel and i have some doubts.
First of all, i'm trying to build this driver for a GPU Mali-G31 MP2. Is this driver compatible for this GPU? I have seen that this GPU uses Bifrost driver but in the package i only see code for Midgard driver. Is Midgard now compatible with Mali-G31? I got this driver from Bifrost driver download page.
My second question is about compilation proccess. I have copied the content of the tarball to its corresponding directories and i have enabled CONFIG_MALI_MIDGARD in menuconfig y i have left the default configuration.
The proccess compilation fails with the next output
CC init/version.o LD init/built-in.o drivers/built-in.o: In function `kbasep_platform_device_init': /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33: undefined reference to `platform_funcs' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33:(.text+0xf73e4): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `platform_funcs' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33: undefined reference to `platform_funcs' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33: undefined reference to `platform_funcs' drivers/built-in.o: In function `kbasep_platform_device_term': /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:44: undefined reference to `platform_funcs' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:44:(.text+0xf742c): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `platform_funcs' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:44: undefined reference to `platform_funcs' drivers/built-in.o: In function `kbase_pm_runtime_init': /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:53: undefined reference to `pm_callbacks' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:53:(.text+0x1248c8): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `pm_callbacks' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:53: undefined reference to `pm_callbacks' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:56: undefined reference to `pm_callbacks' drivers/built-in.o: In function `kbase_pm_register_access_enable': /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:108: undefined reference to `pm_callbacks' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:108:(.text+0x1249a8): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `pm_callbacks' /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:108: undefined reference to `pm_callbacks' drivers/built-in.o:/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:125: more undefined references to `pm_callbacks' follow drivers/built-in.o: In function `kbase_pm_register_access_disable': /home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:125:(.text+0x1249ec): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `pm_callbacks' make: *** [Makefile:1022: vmlinux] Error 1
It looks like midgard/platform/rk is has not been compiled but it is defined in the config pageThere is something that i'm doing wrong?
Regards. José Antonio
Hi José Antonio,
I'm not an expert on our Linux drivers, but I've got an initial reply from the team that for Linux the driver covers Midgard, Bifrost & now Valhall too, they've just not updated the name.
Given that's not the problem, hopefully someone else can pick up with what the issue actually is.
Just to be sure you're aware, this is for the kernel driver obviously, you'll need to make sure that the updated kernel driver will work with userspace driver.
Cheers,
Ben
I've found an expert, and they've given me some advice to pass on.
Firstly, that package will support Bifrost as said before, but that particular one won't support Valhall (but that's not your issue). So it's good for you G31.
Secondly, you appear to be trying to build against the "rk" platform - so we're guessing you have a Rockchip development board?
Arm doesn't supply the RK-specific functions. Either you need to get the BSP source from where the board was bought, or you need to write the functions yourself. But the ability to write the functions yourself will require a lot of GPU specific info which you'd need to get off the chip maker. Unfortunately Arm cannot help with that.
It's probably not possible to build this driver without support from the hardware vendor, so we hope you have some access to them?
All the best,