Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for 3D acceleration #1

Open
asriel-danctnix opened this issue Apr 11, 2019 · 8 comments
Open

Ideas for 3D acceleration #1

asriel-danctnix opened this issue Apr 11, 2019 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@asriel-danctnix
Copy link
Member

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.

@Danct12 Danct12 added the enhancement New feature or request label Apr 11, 2019
@Danct12
Copy link
Member

Danct12 commented Apr 11, 2019

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 Danct12 added the help wanted Extra attention is needed label Apr 12, 2019
@ubergeek77
Copy link

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?

@Danct12
Copy link
Member

Danct12 commented Apr 12, 2019

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

@Danct12
Copy link
Member

Danct12 commented Apr 14, 2019

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
Copy link
Member

Danct12 commented Apr 24, 2019

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.

@luka177
Copy link

luka177 commented Feb 4, 2020

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

@MrArtemSid
Copy link

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

@Danct12
Copy link
Member

Danct12 commented Jun 8, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants