Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Build failure with Linux 5.9/5.10 #88

Closed
giuliobenetti opened this issue Dec 16, 2020 · 14 comments · Fixed by #89
Closed

Build failure with Linux 5.9/5.10 #88

giuliobenetti opened this issue Dec 16, 2020 · 14 comments · Fixed by #89

Comments

@giuliobenetti
Copy link
Contributor

giuliobenetti commented Dec 16, 2020

sunxi-mali fails to build with Linux 5.9 and 5.10
Currently working on it in my Repo, here is temp version for r6p2:
https://github.com/giuliobenetti/sunxi-mali/tree/dev/fix-5.10
here I'm working for all versions:
https://github.com/giuliobenetti/sunxi-mali/tree/dev/fix-5.10-all-versions

@giuliobenetti
Copy link
Contributor Author

@avafinger buildroot actually failed. I've done a mistake, so now I can reproduce it and fix it.

@giuliobenetti
Copy link
Contributor Author

one thing to fix is to change every occurence of:
#include <asm/uaccess.h>
with:
#include <linux/uaccess.h>

Then I'm fixing .ioctl difference. Then I'm going to create patches and submit.
@avafinger @kjngineering

@kjngineering
Copy link

Sounds good - I can test build as soon as there is a branch I can drop into the buildroot package config.

@avafinger
Copy link

@giuliobenetti
Right, Please note that A64 seems to need some additional work, but I can test both arch, no problem.

@giuliobenetti
Copy link
Contributor Author

@avafinger yes .ioctl file_operations error

@giuliobenetti
Copy link
Contributor Author

@avafinger @kjngineering

r6p2 is fixed with temporary patches on this branch:
https://github.com/giuliobenetti/sunxi-mali/tree/dev/fix-5.10

Going to fix other versions too. Unfortunately patches for r6p2 don't fit for r6p0, rp81, rp90.

@giuliobenetti giuliobenetti changed the title Build failure with Linux 5.10 Build failure with Linux 5.9/5.10 Dec 17, 2020
@kjngineering
Copy link

kjngineering commented Dec 17, 2020

@giuliobenetti

I was successfully able to build the r6p2 driver under 5.10 for an arm H3 platform using your repository.
I cannot test functionality however as there is some issue at boot time preventing me from getting to console.
I suspect this may be unrelated - it appears to be something to do with the mmc driver.

@avafinger
Copy link

@giuliobenetti
Tested your patch on NanoPi A64 with r6p2 gbm blobs (had this Image ready) and kernel 5.10 and it is working fine. the fbdev will take some time for me to test but I assume mali is working as it should. Thank you for your work. I will not test this in 5.9, already moved all my stuff to 5.10.

@giuliobenetti
Copy link
Contributor Author

@avafinger thanks a lot for testing. Now let’s wait to be merged so I can update buildroot package too.

@giuliobenetti
Copy link
Contributor Author

@kjngineering can you please test my patches on Linux 5.10 and fbdev?

@kjngineering
Copy link

kjngineering commented Dec 17, 2020

@kjngineering can you please test my patches on Linux 5.10 and fbdev?

I was able to build (above) -- but had some other unrelated issues that prevented me from testing the driver.

I'm going to have another go - is there a particular branch/commit you would like me to build against?
https://github.com/giuliobenetti/sunxi-mali/tree/dev/fix-5.10-all-versions?

@giuliobenetti
Copy link
Contributor Author

@kjngineering yes that branch is correct, it's the one i've used to open PR #89
Thank you

@kjngineering
Copy link

kjngineering commented Dec 18, 2020

@giuliobenetti

I had to switch to Buildroot 2020.11 to fix my aforementioned issue, but:
I was able to build the r6p2 that branch against 5.10 on a Allwinner H3 Platform (OrangePi Zero H3 Plus2) without issue.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.0 (kirby@ubuntu) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2020.11) 9.3.0, GNU ld (GNU Binutils) 2.34) #1 SMP Thu Dec 17 17:56:31 PST 2020
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
....
[   14.224574] mali: loading out-of-tree module taints kernel.
[   14.249801] Allwinner sunXi mali glue initialized
[   14.257111] Mali:
[   14.257123] Found Mali GPU Mali-400 MP r1p1
[   14.264189] Mali:
[   14.264200] 2+0 PP cores initialized
[   14.270662] Mali:
[   14.270672] Mali device driver loaded

it passes the glmark2-es2-fbdev.

let me know when the r8p0 patchset is ok and I will test this too on the same hardware.

@giuliobenetti
Copy link
Contributor Author

@kjngineering great. r8p1 is already there in PR #89. That fixes for every version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants