Jump to content

Recommended Posts

Posted

So, if you use the mainline DTSI files, you'll encounter an issue when loading the Mali Midgard GPL kernel module, since the main ARM kernel maintainers changed how the "compatible" properties of Midgard GPU nodes should be defined. Don't ask me why, they created an entire documentation stating that now the Mali Midgard GPU nodes have to harbour the chip series number, a vendor-specific statement, and drop the "arm,mali-midgard" property.
The additions are nice, since they allow a quick detection of the chip number and the chip vendor using /sys nodes names.

 

However, turns out that the Mali kernel driver used the dropped property to detect the GPU. So, I've patched the driver to detect T700 and T800 chips. I forgot the T600 ones, I'll update the patch on the next release.

 

https://github.com/Miouyouyou/RockMyy/blob/master/patches/Midgard/r19p0-01rel0/0005-Added-the-new-compatible-list-mainly-used-by-Rockchi.patch

 

The patch is quite simple :

diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
index 27dcd9c1..cc4932a4 100644
--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
+++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
@@ -4742,6 +4742,12 @@ static const struct dev_pm_ops kbase_pm_ops = {
 static const struct of_device_id kbase_dt_ids[] = {
 	{ .compatible = "arm,malit6xx" },
 	{ .compatible = "arm,mali-midgard" },
+	{ .compatible = "arm,mali-t720" },
+	{ .compatible = "arm,mali-t760" },
+	{ .compatible = "arm,mali-t820" },
+	{ .compatible = "arm,mali-t830" },
+	{ .compatible = "arm,mali-t860" },
+	{ .compatible = "arm,mali-t880" },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, kbase_dt_ids);

 

Posted

Yeah... I still don't know why they nuked the "arm,mali-midgard" property. The TAMIL driver was never released (and might never be at this rate), so the only kernel driver for Mali Midgard GPU is the one provided by ARM, which use that property and seems to be compatible with ALL the Midgard chips, whether it's the first, second or third generation.

 

The other two properties are really useful for user support, but dropping things and break the only driver existing for that hardware is dodgy.

 

That said, that does not require too heavy changes and I posted my patch on the ARM Community, along the other ones, so the driver might incorporate these fixes in future releases, who knows.

 

https://community.arm.com/graphics/b/blog/posts/unofficial-patches-for-the-mali-midgard-kernel-drivers-r19p0-on-linux-4-13-0-rcx

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines