Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,924 Members 44,883 Now Online
XDA Developers Android and Mobile Development Forum

Making newer GPU drivers work

Tip us?
 
Ziyan
Old
(Last edited by Ziyan; 1st July 2014 at 09:15 AM.)
#1  
Ziyan's Avatar
Senior Member - OP
Thanks Meter 649
Posts: 214
Join Date: Jun 2010
Location: Szentes, Hungary

 
DONATE TO ME
Default Making newer GPU drivers work

I've updated most of our kernel to 4AJ.2.2. Our kernel was really outdated, but with these changes, it should be easier to make the newer binaries work, as there are many, many kernel side dependencies for them.
Currently, I reverted everything that broke functionality with the current binaries (that includes remoteproc stuff which broke the camera, some sound and usb commits, not that much...), so everything still works.
As far as I see, we can compile the binaries ourselves: Building SGX driver (or just borrow them from another device?). As I have a little side project that I want to do now, I don't intend to get into ROMs too much, but I may as well join the party soon

The best starting point to make the kernel side changes is... well, my simple, but effective method is to compare the kernel dirs, like this. With this method, one can easily find & cherry-pick the changes from github, or I can create a separate branch that includes them (should I do it?), as it's not hard, I actually got them merged at a time with it's dependencies, but I reverted everything to get back the display.

Here's the kernel: https://github.com/Ziyann/omap
and the source: https://github.com/icepeda/omap/tree...da-panda-4aj22

Also, it would be nice to know which binaries should we use, as there may be different versions for 3.0 and 3.4. Which binaries work with this panda kernel? @isrcepeda, we don't want to disturb you as you work on the 3.4 kernel, but it'd be great if you could give us some hints
The Following 20 Users Say Thank You to Ziyan For This Useful Post: [ Click to Expand ]
 
pianistaPL
Old
#2  
pianistaPL's Avatar
Senior Member
Thanks Meter 642
Posts: 1,099
Join Date: Feb 2012
Location: Poznań - Poland
Sorry for the noob question, but you are talking about this driver? http://omapzoom.org/?p=device/ti/pro...33e1f0338c20db
Keep going, i can't helo you but i'm with you with my heart 😇
SAMSUNG GALAXY NEXUS powered by

[ParanoidAndroid 4.4 f2fs version]
+
[DirtyV-UR SuperRAM]
+
[CPU: 384MHz-1400MHz | Hyper governor, Zen I/O sheduler, DynFSync off, C.A.B off]
=
CLEAN, FAST, SMOOTH EXPERIENCE
The Following 2 Users Say Thank You to pianistaPL For This Useful Post: [ Click to Expand ]
 
Ziyan
Old
#3  
Ziyan's Avatar
Senior Member - OP
Thanks Meter 649
Posts: 214
Join Date: Jun 2010
Location: Szentes, Hungary

 
DONATE TO ME
Quote:
Originally Posted by pianistaPL View Post
Sorry for the noob question, but you are talking about this driver? http://omapzoom.org/?p=device/ti/pro...33e1f0338c20db
Keep going, i can't helo you but i'm with you with my heart 😇
Yes, that driver

@Carlos_Manuel
Check out my exp branch, I think I merged most of the things we need, it compiles fine, but I couldn't test it further - I may have easily missed something. I may setup a rom building environment tomorrow, as things are getting complicated...
The Following 2 Users Say Thank You to Ziyan For This Useful Post: [ Click to Expand ]
 
mrgnex
Old
#4  
mrgnex's Avatar
Senior Member
Thanks Meter 289
Posts: 979
Join Date: Jan 2013
Location: Vlaardingen
I am going to say something absolutely stupid but as far as I remember there is a Galaxy S version (was it the advance?) that got a 3.4 kernel from an awesome dev. And the Galaxy Nexus uses the same gpu right? Isnt there a way to use some of that code?

Sent from my Galaxy Nexus using XDA Free mobile app
SΛMSUNG/Google Galaxy Nexus
ROM: Vanir Nightly
Kernel: A.S.K.P. Patty Remix

SΛMSUNG/Google Nexus 10
ROM: Vanir Nightly
Kernel: Stock Vanir
 
Carlos_Manuel
Old
#5  
Carlos_Manuel's Avatar
Senior Member
Thanks Meter 4,307
Posts: 3,665
Join Date: Apr 2011
Location: Kuressaare
Quote:
Originally Posted by Ziyan View Post
Yes, that driver

@Carlos_Manuel
Check out my exp branch, I think I merged most of the things we need, it compiles fine, but I couldn't test it further - I may have easily missed something. I may setup a rom building environment tomorrow, as things are getting complicated...
I'm too sleepy to check them out. Build an kernel, use hardware/ti-omap4xxx/ from omapzoom (d-jb-mr2), update kernel-headers if needed to (some ion changes needed this change), etc.

With the ROM side I hope I can help, when help is needed, as I'm stronger in that than with kernels...

Quote:
Originally Posted by mrgnex View Post
I am going to say something absolutely stupid but as far as I remember there is a Galaxy S version (was it the advance?) that got a 3.4 kernel from an awesome dev. And the Galaxy Nexus uses the same gpu right? Isnt there a way to use some of that code?

Sent from my Galaxy Nexus using XDA Free mobile app

Nexus S uses pvr 540 too, but it has cortex A8 and possibly is an omap4430 device and it doesn't have same files in kernel as tuna.. because Nexus s is another device.. so it won't help at all
Samsung Galaxy Nexus
(the best Android phone ever)
ROM: Dreams
Radio Baseband: I9250XXLJ1

Sony Xperia tablet Z (LTE):
10.5.A.0.230

Samsung jet:
My built CM7

Twitter || Facebook || YouTube: CarlosJacksonHD

Android for Samsung Jt:
http://code.google.com/p/android-for-jet/
 
Ziyan
Old
(Last edited by Ziyan; 2nd July 2014 at 09:31 AM.)
#6  
Ziyan's Avatar
Senior Member - OP
Thanks Meter 649
Posts: 214
Join Date: Jun 2010
Location: Szentes, Hungary

 
DONATE TO ME
Quote:
Originally Posted by Carlos_Manuel View Post
I'm too sleepy to check them out. Build an kernel, use hardware/ti-omap4xxx/ from omapzoom (d-jb-mr2), update kernel-headers if needed to (some ion changes needed this change), etc.

With the ROM side I hope I can help, when help is needed, as I'm stronger in that than with kernels...
Hmm, do we need hardware/ti-omap4xxx? The sgx stuff seems to be in device/ti/proprietary-open.git. And as I see, we need to integrate it to the build system, as android-4.3_r3.1 doesn't have such a folder

Edit: lol, we may not even need to build a rom, just follow these instructions
 
Ziyan
Old
(Last edited by Ziyan; 2nd July 2014 at 12:02 PM.)
#7  
Ziyan's Avatar
Senior Member - OP
Thanks Meter 649
Posts: 214
Join Date: Jun 2010
Location: Szentes, Hungary

 
DONATE TO ME
Well, I managed to compile them. As excepted, things didn't just magically begin working. Android didn't automatically load the modules from /system/lib/modules, but:
Code:
insmod pvrsrvkm_sgx540_120.ko
seemed to work... (note: I had to enable CONFIG_MODULES in the kernel)

dmesg:
http://pastebin.com/RTM4fQAW
Code:
<6>[   66.322906] PVR: PVRCore_Init
<6>[   66.323242] PVR: LinuxMMInit: Maximum page pool size: 10800
<6>[   66.323516] PVR: PVRSRVDriverProbe(pDevice=c78b2800)
<6>[   66.323760] PVR: SGX register base: 0x56000000
<6>[   66.323822] PVR: SGX register size: 65535
<6>[   66.323944] PVR: SGX IRQ: 53
<6>[   66.324218] PVR: EnableSystemClocks: Enabling System Clocks
<6>[   66.324768] PVR: PVRCore_Init: major device 246
This appeared after doing insmod.

logcat:
http://pastebin.com/HyK887z7

Something's definietly bad there. The problem starts there:
Code:
E/IMGSRV  ( 4513): :0: OpenServices: Cannot open device driver /dev/pvrsrvkm.
Code:
root@maguro:/dev # ls -l /dev/pvr*
crw------- root     root     246,   0 2014-07-02 11:31 pvrsrvkm
Hmm, maybe a permission problem? Let's chmod it to 777 (maybe we'll need this included in the ramdisk).

dmesg again:
http://pastebin.com/1vqZunrf

logcat again:
http://pastebin.com/AWJz51X9

That did the trick, it went ahead, and another error popped out.
Well, I'm open to any suggestions while I try to fix this...

EDIT:
Code:
root@maguro:/ # free -m
             total         used         free       shared      buffers
Mem:        809120        66744       742376            0         4896
-/+ buffers:              61848       747272
Swap:            0            0            0
That's a bit too much, isn't it? That android-display stuff which should allocate memory doesn't seem to work, I had the same problem when I merged it with the current drivers. I think I edited the board files the right way... but I'll look around.

EDIT 2:
Code:
<6>[    0.000000] android_display: setting default resolution 720*1280, bpp=4
This may be the problem - we're not 4 bits, that should be 24.

EDIT 3:
Sadly, no.
Code:
	u32 bpp;		/* must be 2 or 4 */
But the error must be somewhere in the memory allocation process. Another evidence.
Code:
<3>[    0.213623] omap_rproc_get_pool: dsp - no carveout memory is available at all
<3>[    0.214782] omap_rproc_get_pool: ipu - no carveout memory is available at all
The Following 4 Users Say Thank You to Ziyan For This Useful Post: [ Click to Expand ]
 
Carlos_Manuel
Old
#8  
Carlos_Manuel's Avatar
Senior Member
Thanks Meter 4,307
Posts: 3,665
Join Date: Apr 2011
Location: Kuressaare
Quote:
Originally Posted by Ziyan View Post
Hmm, do we need hardware/ti-omap4xxx? The sgx stuff seems to be in device/ti/proprietary-open.git. And as I see, we need to integrate it to the build system, as android-4.3_r3.1 doesn't have such a folder

Edit: lol, we may not even need to build a rom, just follow these instructions
I'm too lazy to read.. I've seen that page many times... it's for building the needed module for kernel...?

---------- Post added at 01:07 PM ---------- Previous post was at 12:56 PM ----------

Quote:
Originally Posted by Ziyan View Post
Well, I managed to compile them. As excepted, things didn't just magically begin working. Android didn't automatically load the modules from /system/lib/modules, but:
Code:
insmod pvrsrvkm_sgx540_120.ko
seemed to work... (note: I had to enable CONFIG_MODULES in the kernel)

dmesg:
http://pastebin.com/RTM4fQAW
Code:
<6>[   66.322906] PVR: PVRCore_Init
<6>[   66.323242] PVR: LinuxMMInit: Maximum page pool size: 10800
<6>[   66.323516] PVR: PVRSRVDriverProbe(pDevice=c78b2800)
<6>[   66.323760] PVR: SGX register base: 0x56000000
<6>[   66.323822] PVR: SGX register size: 65535
<6>[   66.323944] PVR: SGX IRQ: 53
<6>[   66.324218] PVR: EnableSystemClocks: Enabling System Clocks
<6>[   66.324768] PVR: PVRCore_Init: major device 246
This appeared after doing insmod.

logcat:
http://pastebin.com/HyK887z7

Something's definietly bad there. The problem starts there:
Code:
E/IMGSRV  ( 4513): :0: OpenServices: Cannot open device driver /dev/pvrsrvkm.
Code:
root@maguro:/dev # ls -l /dev/pvr*
crw------- root     root     246,   0 2014-07-02 11:31 pvrsrvkm
Hmm, maybe a permission problem? Let's chmod it to 777 (maybe we'll need this included in the ramdisk).

dmesg again:
http://pastebin.com/1vqZunrf

logcat again:
http://pastebin.com/AWJz51X9

Well, I'm open to any suggestions while I try to fix this...

EDIT:
Code:
root@maguro:/ # free -m
             total         used         free       shared      buffers
Mem:        809120        66744       742376            0         4896
-/+ buffers:              61848       747272
Swap:            0            0            0
That's a bit too much, isn't it? That android-display stuff doesn't seem to work, I had the same problem when I merged it with the current drivers. I think I edited the board files the right way... but I'll look around.
IF possible, then may this be caused by SELinux?
Samsung Galaxy Nexus
(the best Android phone ever)
ROM: Dreams
Radio Baseband: I9250XXLJ1

Sony Xperia tablet Z (LTE):
10.5.A.0.230

Samsung jet:
My built CM7

Twitter || Facebook || YouTube: CarlosJacksonHD

Android for Samsung Jt:
http://code.google.com/p/android-for-jet/
 
Ziyan
Old
#9  
Ziyan's Avatar
Senior Member - OP
Thanks Meter 649
Posts: 214
Join Date: Jun 2010
Location: Szentes, Hungary

 
DONATE TO ME
Quote:
Originally Posted by Carlos_Manuel View Post
I'm too lazy to read.. I've seen that page many times... it's for building the needed module for kernel...?

---------- Post added at 01:07 PM ---------- Previous post was at 12:56 PM ----------



IF possible, then may this be caused by SELinux?
The module loading may be easily caused by it, as SELinux doesn't allow loadable modules. But as I loaded it manually, this shouldn't be a problem.
The Following User Says Thank You to Ziyan For This Useful Post: [ Click to Expand ]
 
Carlos_Manuel
Old
#10  
Carlos_Manuel's Avatar
Senior Member
Thanks Meter 4,307
Posts: 3,665
Join Date: Apr 2011
Location: Kuressaare
Quote:
Originally Posted by Ziyan View Post
The module loading may be easily caused by it, as SELinux doesn't allow loadable modules. But as I loaded it manually, this shouldn't be a problem.
File_contexts file may be the causer build a ROM with the module. Also enable module support for kernel (just in case)..
Samsung Galaxy Nexus
(the best Android phone ever)
ROM: Dreams
Radio Baseband: I9250XXLJ1

Sony Xperia tablet Z (LTE):
10.5.A.0.230

Samsung jet:
My built CM7

Twitter || Facebook || YouTube: CarlosJacksonHD

Android for Samsung Jt:
http://code.google.com/p/android-for-jet/

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes