Jump to content

Advent Vega kernel source code now available!


Guest PaulOBrien

Recommended Posts

I am slowly but surely going forward with .39 .. I started with our booting .39, and began porting the latest subsystems to it, one by one... until now, it still boots... i am using right now all chnges except android adb ... I have to still figure out why video on the latest .39 (r14-3) does not show anything, even if there is no error in the kernel log...)

Goodl luck .. seems the current kernel needs additions to use these new libs .. or maybe android does .. cant say right now .. all i know is the new libs dont work as is .. the other libs i had access to did with android changes ... we have missing dev nodes with the new libs .. the ones pershoot mentioned ...

Link to comment
Share on other sites

Guest _motley

Thanks man. I have been trying to merge files like this carefully since they have some p5 conditions etc. It almost seems like the boot loader isn't passing the right params, but there is no way to prove it since I can't get to logging etc. Since we don't pass boot cmd line params from Android and the ones in the kernel are simple, don't the params I always see in dmesg come from the bootloader itself?

Good news pershoot, I have it working now! The MMU loading of the Nvidia firmware .bin was not working due to changes that I needed in /mm (vmalloc, vmscan, vmstat etc.) Thanks again and good work!

Link to comment
Share on other sites

Guest Alexzandro

Hello, found this new in other forum regarding Lg Ox2: looks there are more news on the 22nd of Jan.:

developer.nvidia.com/tegra-android-development-pack

( smtg missing due to I dunno if I can post links, you can afford this! ), even if there are not HAL specifications in the release.

Hope this helps

Regards

Alessandro

Edited by Alexzandro
Link to comment
Share on other sites

Guest ejtagle

Goodl luck .. seems the current kernel needs additions to use these new libs .. or maybe android does .. cant say right now .. all i know is the new libs dont work as is .. the other libs i had access to did with android changes ... we have missing dev nodes with the new libs .. the ones pershoot mentioned ...

Well, i got the asus kernel booting properly on Vega, now i have ti figure out why r14-3 does not properly initialize video ... ;)

Link to comment
Share on other sites

Well, i got the asus kernel booting properly on Vega, now i have ti figure out why r14-3 does not properly initialize video ... ;)

I trawled through the extra 600 or so commits on this revision and found that the frame buffer console doesnt get inited properly once the 'global gamma table' gets introduced to fb.c. The particular commit occured on the 28th of oct last year - so that should help you track it down. For us Adam folk it also caused nasty rendering issues. It should be noted that android did continue to load up for us even with the commit, but indeed the fb console was not displayed. (Just a black screen).

Im typing on my phone atm. Ill get a commit url tomorrow if you cant find it.

Link to comment
Share on other sites

Guest brucelee666

I trawled through the extra 600 or so commits on this revision and found that the frame buffer console doesnt get inited properly once the 'global gamma table' gets introduced to fb.c. The particular commit occured on the 28th of oct last year - so that should help you track it down. For us Adam folk it also caused nasty rendering issues. It should be noted that android did continue to load up for us even with the commit, but indeed the fb console was not displayed. (Just a black screen).

Im typing on my phone atm. Ill get a commit url tomorrow if you cant find it.

To save time here is the commit ref (I think you mean this one):- video: tegra: dc: support global fbdev gamma table

Link to comment
Share on other sites

Guest ejtagle

I trawled through the extra 600 or so commits on this revision and found that the frame buffer console doesnt get inited properly once the 'global gamma table' gets introduced to fb.c. The particular commit occured on the 28th of oct last year - so that should help you track it down. For us Adam folk it also caused nasty rendering issues. It should be noted that android did continue to load up for us even with the commit, but indeed the fb console was not displayed. (Just a black screen).

Im typing on my phone atm. Ill get a commit url tomorrow if you cant find it.

This could be the problem, as everything seems to be wroking, except the blank framebuffer... I-ll add code to dump the gamma tables...

Link to comment
Share on other sites

Has anyone noticed transparency issues with overlays using this set of Nvidia libraries? Our popup windows appear to be blending with the windows behind them which normally wouldn't be an issue - but the alpha is far too high. This makes viewing the text in those windows rather difficult...

EDIT: Update! Turns out the two were related!

Seems CONFIG_FRAMEBUFFER_CONSOLE conflicts with the gamma table - probably because fbcon and another entity fights over the proper entries. The gamma table is also needed because it dims the content behind the dialogue boxes which allows them to be readable. I'm not sure if it's possible to integrate the two - I'm just happy to have figured out the issue itself.

Edited by DrMon
Link to comment
Share on other sites

Guest ejtagle

Has anyone noticed transparency issues with overlays using this set of Nvidia libraries? Our popup windows appear to be blending with the windows behind them which normally wouldn't be an issue - but the alpha is far too high. This makes viewing the text in those windows rather difficult...

EDIT: Update! Turns out the two were related!

Seems CONFIG_FRAMEBUFFER_CONSOLE conflicts with the gamma table - probably because fbcon and another entity fights over the proper entries. The gamma table is also needed because it dims the content behind the dialogue boxes which allows them to be readable. I'm not sure if it's possible to integrate the two - I'm just happy to have figured out the issue itself.

Seems NVidia is using FBIOPUTCMAP in a custom way (or fbcon misusing it) ... As this api, as far as i know should be used to set the colour palette OR used to set the global gamma map. Problem is that fbcon is using it to set the palette for the 16 colors used in console text, and NVidia video interprets it as a way to alter the gamma curves ... in a incompatible way....

Link to comment
Share on other sites

Guest ejtagle

Attached my patches against rel14r7 ... as stated previously, the framebuffer console does not work, but, the framebuffer itself seems to be working. I was able to log into the system by using serial communications thru USB ....Also, seems the kernel does resume from suspend properly... I will continue investigation on the fb issues ... I know that using an older fb version, the framebuffer displays properly...

rel14r7 shuttle support.rar

Link to comment
Share on other sites

Attached my patches against rel14r7 ... as stated previously, the framebuffer console does not work, but, the framebuffer itself seems to be working. I was able to log into the system by using serial communications thru USB ....Also, seems the kernel does resume from suspend properly... I will continue investigation on the fb issues ... I know that using an older fb version, the framebuffer displays properly...

HI,

Im patching against this ??

http://nv-tegra.nvid.../heads/rel-14r7

Or the asus variant of it ?

Using this i cant boot, sticks at black screen,no adb output or compiling without fb console it has white lines across no adb ....

not tried the asus update yet ..

Suppose i ll try a basic ramdisk meanwhile :)

edit .. nah ramdisk is the same ... kernels hung .. guess this is not correct or im missing something else ...

Cheers

Cass

Edited by Cass67
Link to comment
Share on other sites

Guest brucelee666

Cass,

Re. adb have you looked at board-shuttle-usb.c, Eduardo has added and if statement "#if 0" under the "#ifdef CONFIG_USB_SUPPORT" - maybe this should be removed.

Link to comment
Share on other sites

Guest ejtagle

HI,

Im patching against this ??

http://nv-tegra.nvid.../heads/rel-14r7

Or the asus variant of it ?

Using this i cant boot, sticks at black screen,no adb output or compiling without fb console it has white lines across no adb ....

not tried the asus update yet ..

Suppose i ll try a basic ramdisk meanwhile :)

edit .. nah ramdisk is the same ... kernels hung .. guess this is not correct or im missing something else ...

Cheers

Cass

Let's go piece by piece (who said that? :o) ---

Attached are 3 patchsets...

1) rel-14r7-shuttle support.rar applies over the nvidia git kernel tagged as r14r7 ... But adb won't start ... The cause is google changed the USB android gadget subsystem... Look here what the adam people had to do to enable this new stack: https://github.com/rrathi/adamICS/blob/master/files/init.harmony.usb.rc We have to do exactly the same.

2) rel-14r7-usbold-shuttle support.rar applies over the nvidia git kernel tagged as r14r7, but replaces the new android gadget stack by the old one ... the one we were used to in android-tegra-nv-2.6.39 and also 2.6.36 kernels ... I'd prefer to use the new one...

3) android-tegra-nv-2.6.39-to-asus-shuttle support.rar applies over android-tegra-nv-2.6.39, brings the kernel to the asus state, including the video subsystem... This kernel also works, and the console framebuffer works with it...

There are other possibilities i had not tried yet... We can port the android-tegra-nv-2.6.39 video subsystem to the rel-14r7, for example... as far as i see, the only problems with r14r7 are the console framebuffer ( that we suspect that the ventana libs will use without trouble), or the new usb gadget stack supplied by google, but i think that this new usb stack is working, as the Adam people are using it. Note that the new android usb stack is not a driver, rather than , a protocol. It needs no porting to our hw ;)

I will continue working on this ... To be honest, all those patchesets were created while working on the different versions of the kernel, should work, but, perhaps, i forgot something ... I am trying them right now, but recompiling the kernel from scratch 3 times will take some time :S

android-tegra-nv-2.6.39-to-asus-shuttle support.rar

rel-14r7-shuttle support.rar

rel-14r7-usbold-shuttle support.rar

Link to comment
Share on other sites

Guest DerArtem

Hi,

we got almost everything working with the new .39 r14 kernel on the Folio 100.

USB Host and gadget are working just fine for us. To get usb gadget working we used the "Re-add IRQ setup for PMU so PMU IRQ's work " patch from the adam guys.

One really annoying thing is that the tablet gets freezes from time to time.

Adb and so on is still working fine while the UI is frozen.

What I get in logcat is:

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

[...]

Why idea what might cause this?

There are no other errors in dmesg.

Thanks, Artem

Link to comment
Share on other sites

Guest ejtagle

Hi,

we got almost everything working with the new .39 r14 kernel on the Folio 100.

USB Host and gadget are working just fine for us. To get usb gadget working we used the "Re-add IRQ setup for PMU so PMU IRQ's work " patch from the adam guys.

One really annoying thing is that the tablet gets freezes from time to time.

Adb and so on is still working fine while the UI is frozen.

What I get in logcat is:

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

[...]

Why idea what might cause this?

There are no other errors in dmesg.

Thanks, Artem

Perhaps an out of GPU memory issue ? -- The video subsystem of tegra has a limitastion in the amount of mappable memory for graphics purposes. Even if you reserve a given amount, not all memory can be mapped into the GPU accessible area... Prehaps gralloc is waiting for some memory to stop being used to unmap from GART and map another block ... It's just an idea...

Link to comment
Share on other sites

Hi,

we got almost everything working with the new .39 r14 kernel on the Folio 100.

USB Host and gadget are working just fine for us. To get usb gadget working we used the "Re-add IRQ setup for PMU so PMU IRQ's work " patch from the adam guys.

One really annoying thing is that the tablet gets freezes from time to time.

Adb and so on is still working fine while the UI is frozen.

What I get in logcat is:

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

[...]

Why idea what might cause this?

There are no other errors in dmesg.

Thanks, Artem

We are getting this too - the tablet becomes virtually unusable after this occurs. Not good news...

Link to comment
Share on other sites

Guest ejtagle

We are getting this too - the tablet becomes virtually unusable after this occurs. Not good news...

We could try to compile without the "Virtualize IOVMM memory in nvmap" ... and using a bit more of memory... for example, Asus was using 160MBytes as GPU memory... The other possibility is something that is being stuck .. a buffer that is not being rendered on time...

Link to comment
Share on other sites

Guest BillyBobJoe

Hi,

we got almost everything working with the new .39 r14 kernel on the Folio 100.

USB Host and gadget are working just fine for us. To get usb gadget working we used the "Re-add IRQ setup for PMU so PMU IRQ's work " patch from the adam guys.

One really annoying thing is that the tablet gets freezes from time to time.

Adb and so on is still working fine while the UI is frozen.

What I get in logcat is:

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

[...]

Why idea what might cause this?

There are no other errors in dmesg.

Thanks, Artem

Hi Artem,

I find that the Alpha version when not connected to the PC via USB will too freeze from time to time, but as it is not connected to the computer I have no logs. I see if left over night if I get a lock up when attached to the PC and maybe a log file.

Billy..

Link to comment
Share on other sites

Hi,

we got almost everything working with the new .39 r14 kernel on the Folio 100.

USB Host and gadget are working just fine for us. To get usb gadget working we used the "Re-add IRQ setup for PMU so PMU IRQ's work " patch from the adam guys.

One really annoying thing is that the tablet gets freezes from time to time.

Adb and so on is still working fine while the UI is frozen.

What I get in logcat is:

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

E/gralloc ( 2342): GetBufferLock timed out for thread 2342 buffer 0x54 usage 0x33 LockState 1

[...]

Why idea what might cause this?

There are no other errors in dmesg.

Thanks, Artem

Knowing what that thread id belongs to may help narrow it down, when this occurs try

adb shell top -t |grep 2342 (or whatever)

depending on your setup obviously you may have to use toolbox top and busybox grep .. second column should be the TID

Cass

Edited by Cass67
Link to comment
Share on other sites

Guest DerArtem

Knowing what that thread id belongs to may help narrow it down, when this occurs try

adb shell top -t |grep 2342 (or whatever)

depending on your setup obviously you may have to use toolbox top and busybox grep .. second column should be the TID

Cass

top -t |grep 1486

1486 1486 0 1% S 464444K 53492K fg system ndroid.systemui com.android.systemui

ps | grep 1486

system 1486 1389 464444 53524 ffffffff 40087394 S com.android.systemui

Update: I have just tried out the stock ventana system.img and I have exactly the same problem there but one more error:

E/gralloc ( 1418): GetBufferLock timed out for thread 1472 buffer 0xea usage 0x33 LockState 1

W/NvCpuClient( 1418): Failed to bind to service

Edited by DerArtem
Link to comment
Share on other sites

Guest ejtagle

top -t |grep 1486

1486 1486 0 1% S 464444K 53492K fg system ndroid.systemui com.android.systemui

ps | grep 1486

system 1486 1389 464444 53524 ffffffff 40087394 S com.android.systemui

More information could be gathered by mounting the debugfs and then checking the files under nvhost and tegradc.0 ... ;) -- The problem, as expected , is in the systemui application ...

Link to comment
Share on other sites

top -t |grep 1486

1486 1486 0 1% S 464444K 53492K fg system ndroid.systemui com.android.systemui

ps | grep 1486

system 1486 1389 464444 53524 ffffffff 40087394 S com.android.systemui

Probably unrelated .. but the only reference to buffers in systemui code i can see is relating to the wallpaper (ImageWallpaper.java)

http://pastebin.com/swKcRTTL

Just noticed the edit .. what happens if you kill systemui process .. does it respawn and work again ?

Edited by Cass67
Link to comment
Share on other sites

Guest DerArtem

More information could be gathered by mounting the debugfs and then checking the files under nvhost and tegradc.0 ... ;) -- The problem, as expected , is in the systemui application ...

I have just installed the stock system.img from ventana and boot.img from ventana with my own kernel. I am also using tegra_android_defconfig with some minor changes.

So I guess that the problem is not in the .config or the system.img ...

Do you have this problem on the vega too?

And what is the "W/NvCpuClient( 139): Failed to bind to service"

Edited by DerArtem
Link to comment
Share on other sites

I have just installed the stock system.img from ventana and boot.img from ventana with my own kernel. I am also using tegra_android_defconfig with some minor changes.

So I guess that the problem is not in the .config or the system.img ...

Do you have this problem on the vega too?

And what is the "W/NvCpuClient( 139): Failed to bind to service"

Not got this far yet on the Vega .. had not time to look to the issues i had with the latest kernel, no usb, black screen.. about to look at it now ...

The NvCpuClient log entry probably is not critical as its flagged as W (warning) .. saying that ive no idea what it does at this point ....

Link to comment
Share on other sites

Guest DerArtem

Not got this far yet on the Vega .. had not time to look to the issues i had with the latest kernel, no usb, black screen.. about to look at it now ...

Have go got USB working?

I have just reverted a .config change: https://github.com/DerArtem/android-tegra-nv-2.6.39/commit/abe760825e2b184be9589632e816230cd6842a8f

The kernel was crashing when try to enable usb gadget using cyanogenmod - but this configuration was working on ventana system.img

In the currect kernel config usb is working just fine for us with cyanogenmod. So you can take our stuff as a reference to get usb working...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.