arch-linux-santoni icon indicating copy to clipboard operation
arch-linux-santoni copied to clipboard

Ideas for 3D acceleration

Open asriel-danctnix opened this issue 5 years ago • 8 comments

So, the msm-3.18 kernel seems to not support MSM DRM, as compiling it from android-linux-stable will give errors without patching them with the define they're supposed to be used.

Here's some idea for 3D acceleration:

  • Mainline the kernel: This solution seems to be the most hardest, but also the most dangerous one as set the wrong regulator values would physically blow the device up, according to @pinoaffe from postmarketOS IRC, it has happened to someone porting msm-4.9 to Mi 5 (thanks @Danct12 for bringing this up)

  • Upstream the msm-4.9 DRM driver: The Google Pixel 3 (and 3 XL) shipped with the msm-4.9 kernel, and uses MSM DRM instead of the ancient FB_MSM, which is a very good move. Through I wonder if you can just git checkout the MSM DRM tree and includes, and patch it to make it compile with the 3.18 kernel.

  • Last hope (libhybris): Even through it's best to use a open-source driver and try to not use bionic stuffs, both of the idea above might end up failing as it's impossible to do so, using libhybris can bring 3D acceleration with Android libs to GNU/Linux, and this should be the temporary solution right now.

That's what I've thought about, these aren't tested by myself so feel free to correct or try them out.

asriel-danctnix avatar Apr 11 '19 18:04 asriel-danctnix

Thank you for your suggestions! However I'll try my best to answer these questions:

Q: Mainline the kernel A: This is just a dream right now, as msm8940 chipset (and msm8937) aren't in Torvalds tree, however the Adreno 5xx is supported. Also mainlining isn't easy, and yes I did mention about someone fried a device, however I haven't researched into this much, but as I heard that you can definitely avoid that by making sure that you double check the regulator values. Also it's best to use another device with UART and identical chipset for porting a new chipset to mainline kernel. You can join ##linux-msm on freenode if you're willing to do it by yourself.

Q: Upstream the msm-4.9 DRM driver A: Sounds like a easy idea, but it might be hard to be done, since 3.18 to 4.9 might need lots things to be backported, such as the functions, as the function names might be changed from kernel updates, but also new functions gets added. Through I'm sure for the functions you can look for the kernel patches online, again, I don't really know much about this.

Q: libhybris? A: It might be the last hope, even through postmarketOS Wiki doesn't allow these devices with hybris to be featured. This can be done by mounting Halium's /system and partitions, and then run a lxc container. Not only that 3D acceleration exists, but also other features such as accelerometer, light sensor, WIfi,...

As I said, this is my attempt at explaining your ideas.

Danct12 avatar Apr 11 '19 18:04 Danct12

I hope this is isn't out of place here, but that second point caught my eye, since I have a Pixel 3 XL.

In terms of this project working on other devices, does that second point suggest 3D acceleration will have less in the way of implementation on kernels that have that driver?

ubergeek77 avatar Apr 12 '19 19:04 ubergeek77

Probably, since @robclark is the leader of the Freedreno project, he probably knows more about the MSM DRM situation.

Danct12 avatar Apr 12 '19 19:04 Danct12

I apologize for bad quality image, but I got the Redmi 4X to work with libhybris: image

I'm trying to get Xorg running.

Danct12 avatar Apr 14 '19 11:04 Danct12

By the way, I wonder if people are still reading this, if so then I have a good news: @nichcream is working on msm-4.9 for both Xiaomi Redmi 3S and 4X, maybe it's possible to have Direct Rendering Manager on these devices.

Beside that, we will soon be escaped from the hell of the EOL'd 3.18 kernel.

Danct12 avatar Apr 24 '19 16:04 Danct12

Ok msm4.9 is ok on cedric. Whats next? How to get dri? Compile dri and msm dri?

luka177 avatar Feb 04 '20 06:02 luka177

We get open source 4.9 kernel working on santoni. Also Alula booted 5.7 kernel on santoni. https://github.com/MrArtemSid/kernel_msm-4.9 https://twitter.com/alulauwu https://github.com/dreemurrs-embedded/linux-msm89x7

MrArtemSid avatar Jun 07 '20 22:06 MrArtemSid

On Sun, 07 Jun 2020 15:26:42 -0700 MrArtemSid [email protected] wrote:

We get open source 4.9 kernel working on santoni. Also Alula booted 5.7 kernel on santoni. https://github.com/MrArtemSid/kernel_msm-4.9 https://twitter.com/alulauwu https://github.com/dreemurrs-embedded/linux-msm89x7

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Danct12/arch-linux-santoni/issues/1#issuecomment-640289040

We already know about Dreemurrs Embedded Labs works, we're them.

But at this point, I think we better focus on Linux mainline kernel.

-- Dreemurrs Embedded Labs (or DanctNIX)

  • Discord: https://discord.gg/AvtdRJ3
  • Matrix: #danctnix-general:matrix.org

Danct12 avatar Jun 08 '20 01:06 Danct12