Post Reply

Making newer GPU drivers work

OP Ziyan

1st July 2014, 09:12 AM   |  #1  
Ziyan's Avatar
OP Senior Member
Flag Szentes, Hungary
Thanks Meter: 882
 
247 posts
Join Date:Joined: Jun 2010
Donate to Me
More
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
Last edited by Ziyan; 1st July 2014 at 09:15 AM.
The Following 21 Users Say Thank You to Ziyan For This Useful Post: [ View ]
1st July 2014, 03:30 PM   |  #2  
pianistaPL's Avatar
Senior Member
Flag Poznań - Poland
Thanks Meter: 754
 
1,281 posts
Join Date:Joined: Feb 2012
More
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 😇
The Following 2 Users Say Thank You to pianistaPL For This Useful Post: [ View ]
1st July 2014, 11:45 PM   |  #3  
Ziyan's Avatar
OP Senior Member
Flag Szentes, Hungary
Thanks Meter: 882
 
247 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by pianistaPL

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 3 Users Say Thank You to Ziyan For This Useful Post: [ View ]
2nd July 2014, 12:21 AM   |  #4  
mrgnex's Avatar
Senior Member
Flag Vlaardingen
Thanks Meter: 298
 
1,027 posts
Join Date:Joined: Jan 2013
More
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
2nd July 2014, 12:29 AM   |  #5  
Carlos_Manuel's Avatar
Senior Member
Flag Kuressaare
Thanks Meter: 4,315
 
3,666 posts
Join Date:Joined: Apr 2011
More
Quote:
Originally Posted by Ziyan

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

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
2nd July 2014, 09:28 AM   |  #6  
Ziyan's Avatar
OP Senior Member
Flag Szentes, Hungary
Thanks Meter: 882
 
247 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by Carlos_Manuel

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
Last edited by Ziyan; 2nd July 2014 at 09:31 AM.
2nd July 2014, 10:56 AM   |  #7  
Ziyan's Avatar
OP Senior Member
Flag Szentes, Hungary
Thanks Meter: 882
 
247 posts
Join Date:Joined: Jun 2010
Donate to Me
More
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
Last edited by Ziyan; 2nd July 2014 at 12:02 PM.
The Following 4 Users Say Thank You to Ziyan For This Useful Post: [ View ]
2nd July 2014, 11:07 AM   |  #8  
Carlos_Manuel's Avatar
Senior Member
Flag Kuressaare
Thanks Meter: 4,315
 
3,666 posts
Join Date:Joined: Apr 2011
More
Quote:
Originally Posted by Ziyan

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

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?
2nd July 2014, 11:10 AM   |  #9  
Ziyan's Avatar
OP Senior Member
Flag Szentes, Hungary
Thanks Meter: 882
 
247 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by Carlos_Manuel

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: [ View ]
2nd July 2014, 12:00 PM   |  #10  
Carlos_Manuel's Avatar
Senior Member
Flag Kuressaare
Thanks Meter: 4,315
 
3,666 posts
Join Date:Joined: Apr 2011
More
Quote:
Originally Posted by Ziyan

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)..

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy Nexus Developer Discussion [Developers Only] by ThreadRank