Jump to content

Advent Vega kernel source code now available!


Guest PaulOBrien

Recommended Posts

Guest BillyBobJoe

OK, for anyone who wants to see where I'm at, this is a VERY ROUGH test build. Needs a lot of work (including sorting out busybox and toolbox properly). This is based on a fresh TF image and has a chunk of VegaComb applied (but not working correctly yet).

Use the STANDARD 1.10 partition tables to boot this for now, I plan to change this in cmdline later to work with the moddedstock tables, but that's not so important for now. This may well change at any time, this isn't neccesarily what I'm planning on using, just what I'm playing with right now :)

Have fun, grab it here, and in the interests of community, if you fix something, PLEASE POST IT!

newbe5

Fantastic, I am obviously no where near as quick as you guys but I am try to catch up. So this should be a help me tons.

Thanks newbe5, Ed and Rebel1 (and anyone else I forgot to mention)

Billy..

Link to comment
Share on other sites

Guest rebel1

Regarding ALSA, it either supports 48000hz as sampling rate, or 44100hz. The kernel, as compiled, will only support 48000. There are 2 possiblities here. Either we reconfigure the kernel for the other frecuency, or we reconfigure Android to use 48000 ... It was imossible to perform autoswitching between frecuencies, as the tegra2 chip also uses the audio clock to driver other peripherals, so, we can't change the SYSCLK frequency at runtime. Either we use the SYSCLK apropiate for 48000 sampling rate, or we use the SYSCLK for 44100. But the frequency can be changed only at boot time... In fact, i have tried both configurations, and it is not a problem to reconfigure the kernel... but.. 48000 hz seems to give higher audio fidelity :) -- If no other choice, i can reconfigure the kernel :)

When you can do that , it would be fantastic, because we didn´t have any hc source and so we doesn´t need any ugly hacks.

rebel1

P.S.: I hope it is ok for you, that i pushed your work to github. I think that it makes it much easier to share work.

Link to comment
Share on other sites

Guest a_appleby

OK, for anyone who wants to see where I'm at, this is a VERY ROUGH test build. Needs a lot of work (including sorting out busybox and toolbox properly). This is based on a fresh TF image and has a chunk of VegaComb applied (but not working correctly yet).

Use the STANDARD 1.10 partition tables to boot this for now, I plan to change this in cmdline later to work with the moddedstock tables, but that's not so important for now. This may well change at any time, this isn't neccesarily what I'm planning on using, just what I'm playing with right now :)

Have fun, grab it here, and in the interests of community, if you fix something, PLEASE POST IT!

newbe5

I'll switch to it and let you know as soon as I get anything fixed.

Regarding wifi, the firmware that there is in the NVidia git should be used and should work. I think that i added to the wifi module source code package the instructions related to where the fw must be stored ... Otherwise, give me some time, and i'll find that document and post it here :)

Would that be: /system/lib/hw/wlan?

Hi,

the problem is not to compile the module or hack it into the load libarys.

It looks like that the device cannot registered to the sdio.

It outputs : <1>[ 359.657022] AR6000: HIFInit registering

and nothing more, after that it should load the atheros blobs and set up the interface.

greetings. rebel1

P.S.: I personally didn´t make any hc image.

You are right, but wouldn't an insmod for that driver while having the firmware in the right place be enough to bring the wlan interface online?

This is what I get when I try to play sounds on the A500 ROM with a fixed sound test kernel, when I try to open the camera and when I try to open terminal emulator:

<6>[ 86.441957] avp_init: read firmware from 'nvrm_avp.bin' (36316 bytes)

<6>[ 86.460041] avp_init: avp init done

<6>[ 86.465397] avp_svc_thread: got remote peer

<6>[ 86.466153] avp_lib: Successfully loaded library nvmm_manager.axf (lib_id=115cd8)

<3>[ 86.475014] avp_node_try_connect: can't connect to 'NVMM_MANAGER_SRV'

<6>[ 86.585204] avp_lib: Successfully unloaded 'nvmm_manager.axf'

<6>[ 257.357047] avp_lib: Successfully loaded library nvmm_manager.axf (lib_id=115cd8)

<3>[ 257.365329] avp_node_try_connect: can't connect to 'NVMM_MANAGER_SRV'

<6>[ 257.435035] avp_lib: Successfully unloaded 'nvmm_manager.axf'

Link to comment
Share on other sites

Guest rebel1

Would that be: /system/lib/hw/wlan?

You are right, but wouldn't an insmod for that driver while having the firmware in the right place be enough to bring the wlan interface online?

Yes, the blobs are in /system/lib/hw/wlan/ and the driver should load it from this path, but it don´t load anything.

That camera is not working from default is not surprising. ;-)

I didn´t look at this issue, because wlan and sound have a higher priority for me.

Do you have sound with the changed clocktable?

Edited by rebel1
Link to comment
Share on other sites

Guest a_appleby

Yes, the blobs are in /system/lib/hw/wlan/ and the driver should load it from this path, but it don´t load anything.

That camera is not working from default is not surprising. ;-)

I didn´t look at this issue, because wlan and sound have a higher priority for me.

Do you have sound with the changed clocktable?

I am testing it now on the vegatest ROM and will provide the changes afterwards if they work.

EDIT: no sound, settings crashes, no SD

Edited by a_appleby
Link to comment
Share on other sites

Guest brucelee666

Here is what ejtagle wrote about wlan on page 6:-

start/"

Update: I successfully compiled the Wifi driver. A minor modification is required. Replace #include <linux/autoconf.h> by #include <generated/autoconf.h>, make sure to follow the instructions in drv.txt and you will finally end with the required working module.

Attached the source code of the driver, already modified

And a precompiled kernel image with ramdisk including the wifi driver and firmware (do cp /bin/cp /bin/insmod, then cd /lib/modules then insmod ar6000.ko)"/end

Maybe the ar6000.ko file should be in lib/modules ? that is where the bcm4329.ko file is on normal transformer image files.

Link to comment
Share on other sites

Guest ejtagle

Well, managed to get a little time for this. Attached the modified files to support 44100hz as default sampling rate and the required SYSCLK so we can get audio working. I compiled it, but didn't test it (though i think it will work!) .. I haven't removed the 48khz code. Just #ifdefd it. Take a look at SHUTTLE_48KHZ_AUDIO in board-shuttle.h, if you need the 48khz for anything.

Sorry for not pushing this to the git repo. right now, i am running out of time, and just dont have enough time to clone the repo and the push the mods. Feel free to push them into the repo for me ;)

Eduardo

PS: the 44.rar contains the modified files, and the zImage.rar contains a precompiled kernel image

Regarding camera... Should work if powered up (need to write a 1 into a file that controls the power in the sysfs)

Regarding wifi, as soon as i can get a little bit of extra time. ill check it

44.rar

zImage.rar

Link to comment
Share on other sites

Guest a_appleby

Well, managed to get a little time for this. Attached the modified files to support 44100hz as default sampling rate and the required SYSCLK so we can get audio working. I compiled it, but didn't test it (though i think it will work!) .. I haven't removed the 48khz code. Just #ifdefd it. Take a look at SHUTTLE_48KHZ_AUDIO in board-shuttle.h, if you need the 48khz for anything.

Sorry for not pushing this to the git repo. right now, i am running out of time, and just dont have enough time to clone the repo and the push the mods. Feel free to push them into the repo for me ;)

Eduardo

PS: the 44.rar contains the modified files, and the zImage.rar contains a precompiled kernel image

Regarding camera... Should work if powered up (need to write a 1 into a file that controls the power in the sysfs)

Regarding wifi, as soon as i can get a little bit of extra time. ill check it

I've changed the following variables in board-shuttle.c: rate to 44100, i2s_master_clk to 44100 and i2s_clk_rate to 11289600. I didn't know changes were required in board-shuttle-clocks.c as well.

I will try it out and let everyone know how it went.

Link to comment
Share on other sites

Guest ejtagle

I've changed the following variables in board-shuttle.c: rate to 44100, i2s_master_clk to 44100 and i2s_clk_rate to 11289600. I didn't know changes were required in board-shuttle-clocks.c as well.

I will try it out and let everyone know how it went.

Unfortunately, the clock generation and distribution inside tegra2 has lots of restrictions and interdependencies. We need to modify the clock tables to make it work. I studied this for a lot of time... just to make all peripherals work, and i think i did all the adjustments required. Let me know if it doesn't work, but i assume it will work :)

Link to comment
Share on other sites

Guest rebel1

Unfortunately, the clock generation and distribution inside tegra2 has lots of restrictions and interdependencies. We need to modify the clock tables to make it work. I studied this for a lot of time... just to make all peripherals work, and i think i did all the adjustments required. Let me know if it doesn't work, but i assume it will work :)

Hello Eduardo,

big thanks for you patch. Sound is now working perfect and it didn't was so loud before . ;)

rebel1

Link to comment
Share on other sites

Guest ejtagle

Regarding wifi, first make sure there is a

"WLAN adapter enabled" in the kernel log ...

... If you find ...

"WLAN adapter disabled" in the kernel log, then it means the wlan adapter is disabled (unpowered!).

To control the wlan power, there is an entry (mount the sysfs) for the "shuttle-pm-wlan" driver (check that it loads... when loaded, you should get an message "WLAN RFKill driver loaded" in the kernel log

And also, you shuld be able to control the WLAN power using the RFkill tools... This thing about the WLAN power perhaps is not properly implemented... Perhaps RFKill should not unpower the wlan module... Just let me know. In any case, this is very easy to fix/rework if needed. But we need to know if the module dose not recognize the wlan card because it is unpowered :)

Link to comment
Share on other sites

Guest rebel1

Ok,

report about wifi:

at boot i have :

shuttle-pm-wlan shuttle-pm-wlan: WLAN RFKill driver loaded
Then I activated it with rfkill Interface:
<6>[ 2670.096583] shuttle-pm-wlan shuttle-pm-wlan: WLAN adapter enabled

<6>[ 2670.356266] shuttle_wifi_set_cd: Nobody to notify
But the ar6000 driver prints only :
Normal WIFI mode.

ar6000_pwr_on --enter

Edited by rebel1
Link to comment
Share on other sites

Guest the_corvus

Regarding wifi, first make sure there is a

"WLAN adapter enabled" in the kernel log ...

... If you find ...

"WLAN adapter disabled" in the kernel log, then it means the wlan adapter is disabled (unpowered!).

To control the wlan power, there is an entry (mount the sysfs) for the "shuttle-pm-wlan" driver (check that it loads... when loaded, you should get an message "WLAN RFKill driver loaded" in the kernel log

And also, you shuld be able to control the WLAN power using the RFkill tools... This thing about the WLAN power perhaps is not properly implemented... Perhaps RFKill should not unpower the wlan module... Just let me know. In any case, this is very easy to fix/rework if needed. But we need to know if the module dose not recognize the wlan card because it is unpowered :)

Hi eduardo...

The only reference to wlan in all dmesg is:

shuttle-pm-wlan shuttle-pm-wlan: WLAN RFKill driver loaded

Nothing about adapter.

Corvus

Link to comment
Share on other sites

Guest rebel1

hi Eduardo,

here is a feature more that I have found:

This is caused by disabling touchscreen and try to bring it back with the power key.

Have you ever seen this before ?

<6>[  334.548139] request_suspend_state: sleep (0->3) at 329082040002 (1970-01-02 00:05:14.736787000 UTC)

<6>[  334.550746] Disabling touchscreen

<4>[  334.576765] ------------[ cut here ]------------

<4>[  334.576806] WARNING: at drivers/char/tty_mutex.c:42 tty_unlock+0x30/0x54()

<4>[  334.576822] Modules linked in:

<4>[  334.576882] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068018>] (warn_slowpath_common+0x4c/0x64)

<4>[  334.576919] [<c0068018>] (warn_slowpath_common+0x4c/0x64) from [<c0068048>] (warn_slowpath_null+0x18/0x1c)

<4>[  334.576953] [<c0068048>] (warn_slowpath_null+0x18/0x1c) from [<c0429ce0>] (tty_unlock+0x30/0x54)

<4>[  334.576996] [<c0429ce0>] (tty_unlock+0x30/0x54) from [<c01dfbd8>] (vt_event_wait+0xc4/0x130)

<4>[  334.577030] [<c01dfbd8>] (vt_event_wait+0xc4/0x130) from [<c01dfc78>] (vt_waitactive+0x34/0x60)

<4>[  334.577072] [<c01dfc78>] (vt_waitactive+0x34/0x60) from [<c0099698>] (console_early_suspend+0x44/0x78)

<4>[  334.577107] [<c0099698>] (console_early_suspend+0x44/0x78) from [<c0099574>] (early_suspend+0xa0/0x12c)

<4>[  334.577146] [<c0099574>] (early_suspend+0xa0/0x12c) from [<c007a2f4>] (process_one_work+0x24c/0x3b8)

<4>[  334.577183] [<c007a2f4>] (process_one_work+0x24c/0x3b8) from [<c007a83c>] (worker_thread+0x220/0x3d8)

<4>[  334.577233] [<c007a83c>] (worker_thread+0x220/0x3d8) from [<c007f918>] (kthread+0x80/0x88)

<4>[  334.577292] [<c007f918>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[  334.577318] ---[ end trace f5684d1f40c1f8ff ]---

<4>[  334.586996] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  334.989002] PM: Syncing filesystems ... done.

<4>[  334.990461] ------------[ cut here ]------------

<4>[  334.990486] WARNING: at drivers/char/tty_mutex.c:31 tty_lock+0x30/0x50()

<4>[  334.990493] Modules linked in:

<4>[  334.990530] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068018>] (warn_slowpath_common+0x4c/0x64)

<4>[  334.990547] [<c0068018>] (warn_slowpath_common+0x4c/0x64) from [<c0068048>] (warn_slowpath_null+0x18/0x1c)

<4>[  334.990563] [<c0068048>] (warn_slowpath_null+0x18/0x1c) from [<c0429d34>] (tty_lock+0x30/0x50)

<4>[  334.990586] [<c0429d34>] (tty_lock+0x30/0x50) from [<c01dfd20>] (vt_move_to_console+0x7c/0xac)

<4>[  334.990609] [<c01dfd20>] (vt_move_to_console+0x7c/0xac) from [<c0096f24>] (pm_prepare_console+0x14/0x40)

<4>[  334.990628] [<c0096f24>] (pm_prepare_console+0x14/0x40) from [<c00976ac>] (enter_state+0x60/0xd4)

<4>[  334.990648] [<c00976ac>] (enter_state+0x60/0xd4) from [<c0098b80>] (suspend+0x60/0x124)

<4>[  334.990673] [<c0098b80>] (suspend+0x60/0x124) from [<c007a2f4>] (process_one_work+0x24c/0x3b8)

<4>[  334.990690] [<c007a2f4>] (process_one_work+0x24c/0x3b8) from [<c007a83c>] (worker_thread+0x220/0x3d8)

<4>[  334.990718] [<c007a83c>] (worker_thread+0x220/0x3d8) from [<c007f918>] (kthread+0x80/0x88)

<4>[  334.990759] [<c007f918>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[  334.990772] ---[ end trace f5684d1f40c1f900 ]---

<6>[  339.431826] request_suspend_state: wakeup (3->0) at 333965724002 (1970-01-02 00:05:19.620470000 UTC)

<4>[  339.433705] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.449761] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.467952] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.484227] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.500516] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.516769] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.532995] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.548216] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.564437] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.581510] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.598359] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.614978] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.630517] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.647002] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.662648] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.679120] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.506821] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.523189] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.539478] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.555791] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.572092] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.587946] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.603365] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.619776] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.636172] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.651512] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.667927] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.683228] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.699518] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.716181] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.732299] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  341.732547] request_suspend_state: sleep (0->3) at 336266473003 (1970-01-02 00:05:21.921223001 UTC)

<6>[  345.112976] request_suspend_state: wakeup (3->0) at 339646875003 (1970-01-02 00:05:25.301622001 UTC)

<4>[  345.115161] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.132346] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.149079] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.164466] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.180778] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.197026] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.212264] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.228493] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.244801] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.261457] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.278270] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.294472] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.311330] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.327133] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.343058] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.358895] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.497103] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.512472] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.528753] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.545089] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.560964] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.577421] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.593870] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.610212] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.626469] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.642718] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.659021] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.674305] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.690645] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.707450] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.725003] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  347.725266] request_suspend_state: sleep (0->3) at 342259191002 (1970-01-02 00:05:27.913941000 UTC)

Link to comment
Share on other sites

Guest ejtagle

hi Eduardo,

here is a feature more that I have found:

This is caused by disabling touchscreen and try to bring it back with the power key.

Have you ever seen this before ?

<6>[  334.548139] request_suspend_state: sleep (0->3) at 329082040002 (1970-01-02 00:05:14.736787000 UTC)

<6>[  334.550746] Disabling touchscreen

<4>[  334.576765] ------------[ cut here ]------------

<4>[  334.576806] WARNING: at drivers/char/tty_mutex.c:42 tty_unlock+0x30/0x54()

<4>[  334.576822] Modules linked in:

<4>[  334.576882] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068018>] (warn_slowpath_common+0x4c/0x64)

<4>[  334.576919] [<c0068018>] (warn_slowpath_common+0x4c/0x64) from [<c0068048>] (warn_slowpath_null+0x18/0x1c)

<4>[  334.576953] [<c0068048>] (warn_slowpath_null+0x18/0x1c) from [<c0429ce0>] (tty_unlock+0x30/0x54)

<4>[  334.576996] [<c0429ce0>] (tty_unlock+0x30/0x54) from [<c01dfbd8>] (vt_event_wait+0xc4/0x130)

<4>[  334.577030] [<c01dfbd8>] (vt_event_wait+0xc4/0x130) from [<c01dfc78>] (vt_waitactive+0x34/0x60)

<4>[  334.577072] [<c01dfc78>] (vt_waitactive+0x34/0x60) from [<c0099698>] (console_early_suspend+0x44/0x78)

<4>[  334.577107] [<c0099698>] (console_early_suspend+0x44/0x78) from [<c0099574>] (early_suspend+0xa0/0x12c)

<4>[  334.577146] [<c0099574>] (early_suspend+0xa0/0x12c) from [<c007a2f4>] (process_one_work+0x24c/0x3b8)

<4>[  334.577183] [<c007a2f4>] (process_one_work+0x24c/0x3b8) from [<c007a83c>] (worker_thread+0x220/0x3d8)

<4>[  334.577233] [<c007a83c>] (worker_thread+0x220/0x3d8) from [<c007f918>] (kthread+0x80/0x88)

<4>[  334.577292] [<c007f918>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[  334.577318] ---[ end trace f5684d1f40c1f8ff ]---

<4>[  334.586996] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  334.989002] PM: Syncing filesystems ... done.

<4>[  334.990461] ------------[ cut here ]------------

<4>[  334.990486] WARNING: at drivers/char/tty_mutex.c:31 tty_lock+0x30/0x50()

<4>[  334.990493] Modules linked in:

<4>[  334.990530] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068018>] (warn_slowpath_common+0x4c/0x64)

<4>[  334.990547] [<c0068018>] (warn_slowpath_common+0x4c/0x64) from [<c0068048>] (warn_slowpath_null+0x18/0x1c)

<4>[  334.990563] [<c0068048>] (warn_slowpath_null+0x18/0x1c) from [<c0429d34>] (tty_lock+0x30/0x50)

<4>[  334.990586] [<c0429d34>] (tty_lock+0x30/0x50) from [<c01dfd20>] (vt_move_to_console+0x7c/0xac)

<4>[  334.990609] [<c01dfd20>] (vt_move_to_console+0x7c/0xac) from [<c0096f24>] (pm_prepare_console+0x14/0x40)

<4>[  334.990628] [<c0096f24>] (pm_prepare_console+0x14/0x40) from [<c00976ac>] (enter_state+0x60/0xd4)

<4>[  334.990648] [<c00976ac>] (enter_state+0x60/0xd4) from [<c0098b80>] (suspend+0x60/0x124)

<4>[  334.990673] [<c0098b80>] (suspend+0x60/0x124) from [<c007a2f4>] (process_one_work+0x24c/0x3b8)

<4>[  334.990690] [<c007a2f4>] (process_one_work+0x24c/0x3b8) from [<c007a83c>] (worker_thread+0x220/0x3d8)

<4>[  334.990718] [<c007a83c>] (worker_thread+0x220/0x3d8) from [<c007f918>] (kthread+0x80/0x88)

<4>[  334.990759] [<c007f918>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[  334.990772] ---[ end trace f5684d1f40c1f900 ]---

<6>[  339.431826] request_suspend_state: wakeup (3->0) at 333965724002 (1970-01-02 00:05:19.620470000 UTC)

<4>[  339.433705] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.449761] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.467952] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.484227] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.500516] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.516769] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.532995] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.548216] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.564437] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.581510] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.598359] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.614978] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.630517] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.647002] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.662648] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  339.679120] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.506821] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.523189] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.539478] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.555791] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.572092] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.587946] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.603365] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.619776] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.636172] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.651512] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.667927] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.683228] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.699518] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.716181] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  341.732299] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  341.732547] request_suspend_state: sleep (0->3) at 336266473003 (1970-01-02 00:05:21.921223001 UTC)

<6>[  345.112976] request_suspend_state: wakeup (3->0) at 339646875003 (1970-01-02 00:05:25.301622001 UTC)

<4>[  345.115161] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.132346] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.149079] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.164466] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.180778] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.197026] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.212264] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.228493] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.244801] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.261457] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.278270] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.294472] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.311330] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.327133] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.343058] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  345.358895] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.497103] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.512472] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.528753] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.545089] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.560964] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.577421] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.593870] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.610212] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.626469] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.642718] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.659021] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.674305] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.690645] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.707450] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  347.725003] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  347.725266] request_suspend_state: sleep (0->3) at 342259191002 (1970-01-02 00:05:27.913941000 UTC)

Well, seems you managed to find an actual kernel bug ;) ... Or not...

By reading those logs, this seems to happen when the system tries to turn off the backlight twice in a row... This shouldn't happen, so the kernel is complaining about it. That never happened to me, as i never tried Android with this kernel... But that is what you are doing ;) ... Android has an EarlySuspend feature that tries to save power turning off the backlight and touchscreen without turning off the device. That Earlysuspend code was untested, I do suspect where is the problem ... Just for the curious, as you should know, tegra2 has 2 framebuffers... The main one (used for the LCD) and an auxiliary one (used for HDMI output). I do suspect that Android thinks that both framebuffers use the same backlight (of course, that is not true!) ... And so tries to turn off 2 times ... and when resuming, tries to turn it on 2 times... The most curious thing is that i wrote the code to protect against that situation, and associate the backlight with just the main framebuffer.. But, i disabled that code (probably, during one the experiments i was doing at that time). I reenabled the code, and the kernel compiles properly, though i didn't have time to test it. Please, if you could try it... ;) -- And also feel free to push into git if it works... Otherwise, just let me know and i will try to debug the issue on the weekend. Patch attached as gpu.rar. Just overwrite the file with the one inside the rar (the file to be overwritten can be found at /arch/arm/mach-tegra)

Regarding Wifi, seems the wifi adapter is unpowered. It is that easy. You can power it up by using a tool to manipulate RFkill switches.... Here i will ask you something i am not sure about... Wifi adapters / GPS / GSM / camera should be left powered up when the kernel boots, and Android should them power them down ... or those devices should be left powered down until an app actually tries to use them ?

In the file "wifi.rar" i am providing a patch that, by default will leave the wifi adapter powered on (until sw powers it down), but i am not sure if this is the right thing to do... Opinions?

Well, again, running out of time... Please, try each patch separately. I will try to address any issues with them, but, i have little time right now...

Eduardo

PS: If you want a proper description for git,

gpu.rar -> Enabling code to associate backlight (pwm0) with main framebuffer (LCD)

wifi.rar -> Adding virtual card detect callback for wifi card powerup/down and powering it up as default

gpu.rar

wifi.rar

Edited by ejtagle
Link to comment
Share on other sites

Guest the_corvus

Well, seems you managed to find an actual kernel bug ;) ... Or not...

By reading those logs, this seems to happen when the system tries to turn off the backlight twice in a row... This shouldn't happen, so the kernel is complaining about it. That never happened to me, as i never tried Android with this kernel... But that is what you are doing ;) ... Android has an EarlySuspend feature that tries to save power turning off the backlight and touchscreen without turning off the device. That Earlysuspend code was untested, I do suspect where is the problem ... Just for the curious, as you should know, tegra2 has 2 framebuffers... The main one (used for the LCD) and an auxiliary one (used for HDMI output). I do suspect that Android thinks that both framebuffers use the same backlight (of course, that is not true!) ... And so tries to turn off 2 times ... and when resuming, tries to turn it on 2 times... The most curious thing is that i wrote the code to protect against that situation, and associate the backlight with just the main framebuffer.. But, i disabled that code (probably, during one the experiments i was doing at that time). I reenabled the code, and the kernel compiles properly, though i didn't have time to test it. Please, if you could try it... ;) -- And also feel free to push into git if it works... Otherwise, just let me know and i will try to debug the issue on the weekend. Patch attached as gpu.rar. Just overwrite the file with the one inside the rar (the file to be overwritten can be found at /arch/arm/mach-tegra)

Regarding Wifi, seems the wifi adapter is unpowered. It is that easy. You can power it up by using a tool to manipulate RFkill switches.... Here i will ask you something i am not sure about... Wifi adapters / GPS / GSM / camera should be left powered up when the kernel boots, and Android should them power them down ... or those devices should be left powered down until an app actually tries to use them ?

In the file "wifi.rar" i am providing a patch that, by default will leave the wifi adapter powered on (until sw powers it down), but i am not sure if this is the right thing to do... Opinions?

Well, again, running out of time... Please, try each patch separately. I will try to address any issues with them, but, i have little time right now...

Eduardo

PS: If you want a proper description for git,

gpu.rar -> Enabling code to associate backlight (pwm0) with main framebuffer (LCD)

wifi.rar -> Adding virtual card detect callback for wifi card powerup/down and powering it up as default

Thanks Eduardo.

I will try them asap, and report...

I really dont know how android starts/stops devices... i know that module cant be inside kernel, but nothing more.

Corvus

Link to comment
Share on other sites

Guest rebel1

Hello Eduardo,

thanks for your hard work.

Now i report to the gpu patch.

Unfortunately dmesg shows me when i try to disable and enable the TS, and it comes not back to life until i reboot:


<6>[  125.010838] request_suspend_state: sleep (0->3) at 119550778002 (1970-01-02 00:01:43.599858001 UTC)

<6>[  125.012800] Disabling touchscreen

<4>[  125.040573] ------------[ cut here ]------------

<4>[  125.040605] WARNING: at drivers/char/tty_mutex.c:42 tty_unlock+0x30/0x54()

<4>[  125.040617] Modules linked in: [last unloaded: ar6000]

<4>[  125.040670] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068074>] (warn_slowpath_common+0x4c/0x64)

<4>[  125.040737] [<c0068074>] (warn_slowpath_common+0x4c/0x64) from [<c00680a4>] (warn_slowpath_null+0x18/0x1c)

<4>[  125.040810] [<c00680a4>] (warn_slowpath_null+0x18/0x1c) from [<c0429d40>] (tty_unlock+0x30/0x54)

<4>[  125.040894] [<c0429d40>] (tty_unlock+0x30/0x54) from [<c01dfc38>] (vt_event_wait+0xc4/0x130)

<4>[  125.040964] [<c01dfc38>] (vt_event_wait+0xc4/0x130) from [<c01dfcd8>] (vt_waitactive+0x34/0x60)

<4>[  125.041015] [<c01dfcd8>] (vt_waitactive+0x34/0x60) from [<c00996f4>] (console_early_suspend+0x44/0x78)

<4>[  125.041032] [<c00996f4>] (console_early_suspend+0x44/0x78) from [<c00995d0>] (early_suspend+0xa0/0x12c)

<4>[  125.041052] [<c00995d0>] (early_suspend+0xa0/0x12c) from [<c007a350>] (process_one_work+0x24c/0x3b8)

<4>[  125.041069] [<c007a350>] (process_one_work+0x24c/0x3b8) from [<c007a898>] (worker_thread+0x220/0x3d8)

<4>[  125.041090] [<c007a898>] (worker_thread+0x220/0x3d8) from [<c007f974>] (kthread+0x80/0x88)

<4>[  125.041118] [<c007f974>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[  125.041128] ---[ end trace 47ae24e302e5c8d6 ]---

<4>[  125.053116] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  125.293743] PM: Syncing filesystems ... done.

<4>[  125.294354] ------------[ cut here ]------------

<4>[  125.294376] WARNING: at drivers/char/tty_mutex.c:31 tty_lock+0x30/0x50()

<4>[  125.294383] Modules linked in: [last unloaded: ar6000]

<4>[  125.294421] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068074>] (warn_slowpath_common+0x4c/0x64)

<4>[  125.294439] [<c0068074>] (warn_slowpath_common+0x4c/0x64) from [<c00680a4>] (warn_slowpath_null+0x18/0x1c)

<4>[  125.294455] [<c00680a4>] (warn_slowpath_null+0x18/0x1c) from [<c0429d94>] (tty_lock+0x30/0x50)

<4>[  125.294477] [<c0429d94>] (tty_lock+0x30/0x50) from [<c01dfd80>] (vt_move_to_console+0x7c/0xac)

<4>[  125.294497] [<c01dfd80>] (vt_move_to_console+0x7c/0xac) from [<c0096f80>] (pm_prepare_console+0x14/0x40)

<4>[  125.294514] [<c0096f80>] (pm_prepare_console+0x14/0x40) from [<c0097708>] (enter_state+0x60/0xd4)

<4>[  125.294529] [<c0097708>] (enter_state+0x60/0xd4) from [<c0098bdc>] (suspend+0x60/0x124)

<4>[  125.294549] [<c0098bdc>] (suspend+0x60/0x124) from [<c007a350>] (process_one_work+0x24c/0x3b8)

<4>[  125.294564] [<c007a350>] (process_one_work+0x24c/0x3b8) from [<c007a898>] (worker_thread+0x220/0x3d8)

<4>[  125.294594] [<c007a898>] (worker_thread+0x220/0x3d8) from [<c007f974>] (kthread+0x80/0x88)

<4>[  125.294625] [<c007f974>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[  125.294635] ---[ end trace 47ae24e302e5c8d7 ]---

<6>[  125.376720] request_suspend_state: wakeup (3->0) at 119916707001 (1970-01-02 00:01:43.965792000 UTC)

<4>[  125.377119] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.395145] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.413121] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.431136] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.446604] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.462972] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.478317] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.481142] Normal WIFI mode.

<4>[  125.481889] ar6000_pwr_on --enter

<4>[  125.494741] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.511063] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.526354] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.542632] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.558902] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.575173] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.591433] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.607705] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  125.623983] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.103916] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.119932] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.135892] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.151893] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.167897] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.183837] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.199985] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.216028] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.231958] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.247679] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.263785] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.280223] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.296484] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.312535] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  127.323158] request_suspend_state: wakeup (0->0) at 121863115001 (1970-01-02 00:01:45.912197000 UTC)

<4>[  127.324251] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.339829] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.361977] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.371398] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.387696] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.403949] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.419184] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.435414] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.451653] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.468016] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.483757] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.500437] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.516776] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  127.533114] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.131703] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.147654] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.164766] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  128.167627] request_suspend_state: wakeup (0->0) at 122707585001 (1970-01-02 00:01:46.756667000 UTC)

<4>[  128.168646] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.185839] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.201368] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.852035] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.867896] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.883635] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.900447] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.917163] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.932845] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.948641] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.965242] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.981827] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  128.997842] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  129.013682] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  129.029589] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  129.046660] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  129.062767] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  129.078760] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  129.079233] request_suspend_state: sleep (0->3) at 123619192000 (1970-01-02 00:01:47.668273999 UTC)

<6>[  133.372615] request_suspend_state: wakeup (3->0) at 127912570001 (1970-01-02 00:01:51.961651000 UTC)

<4>[  133.374015] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.389874] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.406423] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.422691] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.438923] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.455137] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.471360] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.487574] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.504769] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.521063] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.537510] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.553670] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.569885] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.586073] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.602181] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  133.618230] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  134.921975] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  134.938304] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  134.955624] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  134.972096] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  134.988401] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.004681] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.021108] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.037387] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.053651] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.070326] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.085662] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.101732] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.117926] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.134828] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<4>[  135.151106] tegra_pwm tegra_pwm.0: pwm_disable called on disabled PWM

<6>[  135.151913] request_suspend_state: sleep (0->3) at 129691872001 (1970-01-02 00:01:53.740954000 UTC)


Edited by rebel1
Link to comment
Share on other sites

Guest rebel1

And here the status to your wifi patch:

Dmesg output:

6>[	5.567481] shuttle-pm-bt shuttle-pm-bt: Enabling Bluetooth

<6>[	5.790517] shuttle-pm-bt shuttle-pm-bt: Bluetooth RFKill driver registered

<6>[	5.790627] shuttle-pm-camera shuttle-pm-camera: Camera power management driver registered

<6>[	5.790729] shuttle-pm-gps shuttle-pm-gps: GPS power management driver loaded

<6>[	5.791061] Enabling 3G/GPS module

<6>[	5.810510] shuttle-pm-gsm shuttle-pm-gsm: GSM/UMTS RFKill driver loaded

<6>[	5.810621] shuttle-pm-wlan shuttle-pm-wlan: WLAN adapter enabled

<6>[	5.870488] shuttle_wifi_set_cd: Nobody to notify

<6>[	5.870513] shuttle-pm-wlan shuttle-pm-wlan: WLAN RFKill driver loaded

and then a little bit later:
<4>[	6.872245] ------------[ cut here ]------------

<4>[	6.872275] WARNING: at drivers/mmc/core/core.c:640 mmc_set_clock+0x24/0x50()

<4>[	6.872284] Modules linked in:

<4>[	6.872321] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068074>] (warn_slowpath_common+0x4c/0x64)

<4>[	6.872341] [<c0068074>] (warn_slowpath_common+0x4c/0x64) from [<c00680a4>] (warn_slowpath_null+0x18/0x1c)

<4>[	6.872360] [<c00680a4>] (warn_slowpath_null+0x18/0x1c) from [<c02bf2f4>] (mmc_set_clock+0x24/0x50)

<4>[	6.872384] [<c02bf2f4>] (mmc_set_clock+0x24/0x50) from [<c02c3f90>] (mmc_sdio_init_card+0x4e4/0x554)

<4>[	6.872402] [<c02c3f90>] (mmc_sdio_init_card+0x4e4/0x554) from [<c02c427c>] (mmc_attach_sdio+0x8c/0x328)

<4>[	6.872420] [<c02c427c>] (mmc_attach_sdio+0x8c/0x328) from [<c02bfdd0>] (mmc_rescan+0x230/0x310)

<4>[	6.872442] [<c02bfdd0>] (mmc_rescan+0x230/0x310) from [<c007a350>] (process_one_work+0x24c/0x3b8)

<4>[	6.872460] [<c007a350>] (process_one_work+0x24c/0x3b8) from [<c007a898>] (worker_thread+0x220/0x3d8)

<4>[	6.872483] [<c007a898>] (worker_thread+0x220/0x3d8) from [<c007f974>] (kthread+0x80/0x88)

<4>[	6.872512] [<c007f974>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[	6.872534] ---[ end trace f59970bbbe6a7e97 ]---

<3>[	6.872576] mmc0: error -123 whilst initialising SDIO card

Complete dmesg output

Edited by rebel1
Link to comment
Share on other sites

Guest ejtagle

And here the status to your wifi patch:

Dmesg output:

6>[	5.567481] shuttle-pm-bt shuttle-pm-bt: Enabling Bluetooth

<6>[	5.790517] shuttle-pm-bt shuttle-pm-bt: Bluetooth RFKill driver registered

<6>[	5.790627] shuttle-pm-camera shuttle-pm-camera: Camera power management driver registered

<6>[	5.790729] shuttle-pm-gps shuttle-pm-gps: GPS power management driver loaded

<6>[	5.791061] Enabling 3G/GPS module

<6>[	5.810510] shuttle-pm-gsm shuttle-pm-gsm: GSM/UMTS RFKill driver loaded

<6>[	5.810621] shuttle-pm-wlan shuttle-pm-wlan: WLAN adapter enabled

<6>[	5.870488] shuttle_wifi_set_cd: Nobody to notify

<6>[	5.870513] shuttle-pm-wlan shuttle-pm-wlan: WLAN RFKill driver loaded

and then a little bit later:
<4>[	6.872245] ------------[ cut here ]------------

<4>[	6.872275] WARNING: at drivers/mmc/core/core.c:640 mmc_set_clock+0x24/0x50()

<4>[	6.872284] Modules linked in:

<4>[	6.872321] [<c0038688>] (unwind_backtrace+0x0/0xf0) from [<c0068074>] (warn_slowpath_common+0x4c/0x64)

<4>[	6.872341] [<c0068074>] (warn_slowpath_common+0x4c/0x64) from [<c00680a4>] (warn_slowpath_null+0x18/0x1c)

<4>[	6.872360] [<c00680a4>] (warn_slowpath_null+0x18/0x1c) from [<c02bf2f4>] (mmc_set_clock+0x24/0x50)

<4>[	6.872384] [<c02bf2f4>] (mmc_set_clock+0x24/0x50) from [<c02c3f90>] (mmc_sdio_init_card+0x4e4/0x554)

<4>[	6.872402] [<c02c3f90>] (mmc_sdio_init_card+0x4e4/0x554) from [<c02c427c>] (mmc_attach_sdio+0x8c/0x328)

<4>[	6.872420] [<c02c427c>] (mmc_attach_sdio+0x8c/0x328) from [<c02bfdd0>] (mmc_rescan+0x230/0x310)

<4>[	6.872442] [<c02bfdd0>] (mmc_rescan+0x230/0x310) from [<c007a350>] (process_one_work+0x24c/0x3b8)

<4>[	6.872460] [<c007a350>] (process_one_work+0x24c/0x3b8) from [<c007a898>] (worker_thread+0x220/0x3d8)

<4>[	6.872483] [<c007a898>] (worker_thread+0x220/0x3d8) from [<c007f974>] (kthread+0x80/0x88)

<4>[	6.872512] [<c007f974>] (kthread+0x80/0x88) from [<c0033ba4>] (kernel_thread_exit+0x0/0x8)

<4>[	6.872534] ---[ end trace f59970bbbe6a7e97 ]---

<3>[	6.872576] mmc0: error -123 whilst initialising SDIO card

Complete dmesg output

For both errors, those seem to be actual kernel bugs. Perfectly fixable. The Wifi related bug... after the latest patch, seems to try to wake up :), but fails setting the clock speed ... That is why you see mmc_set_clock() in the trace, and then 'error -123 whilst initialising SDIO card' ... Ill patch a little bit the mmc stack to round clocks to the available ones (remember, not all clock speed can be used with tegra2 peripherals... there are several limitations here, and the ar6000 seems to be requesting one of the unsupported clocks. Using the lower available one should work perfectly.

Regarding the backlight issue error, seems there is a check in the pwm tegra driver that does not like turning off the backlight twice in a row... Do me a favor.. in board-shuttle-gpu.c, comment out the calls to the fb_blank(() function.. and check if the problem continues...

I'll do a proper fix as soon as i have a little more time!

Eduardo

Link to comment
Share on other sites

Guest rebel1

Regarding the backlight issue error, seems there is a check in the pwm tegra driver that does not like turning off the backlight twice in a row... Do me a favor.. in board-shuttle-gpu.c, comment out the calls to the fb_blank(() function.. and check if the problem continues...

I'll do a proper fix as soon as i have a little more time!

Eduardo

Ok,

comment out these calls makes definitely a difference. It gives me a black screen as expected,but i can now turn the backlight on and off.

Edited by rebel1
Link to comment
Share on other sites

Guest BillyBobJoe

Guys,

The work you are doing is better than fantastic, you would not believe how much I enjoy getting home from work to see what has been happening. And it is amazing how far you guys are moving the Kernel a long.

Big thanks to eduardo, rebel1, a_appleby, brucelee666, corvus, etc...

I think that my input to the kernel is not going to be much help at this stage and I'll focus on building the ROM to support the work you are doing. So when you guys are happy to post up a zImage and Boot.img I will happily apply it to my work in progress and give you feedback.

Billy..

PS. I have jokingly give this group the title of the ".36Guys". I am kind of hoping it sticks.......

Link to comment
Share on other sites

Guest ejtagle

Ok,

comment out these calls makes definitely a difference. It gives me a black screen as expected,but i can now turn the backlight on and off.

But, so the backlight and screen properly turn on and off, or theres still something to do about it ? huh.gif

Link to comment
Share on other sites

Guest rebel1

But, so the backlight and screen properly turn on and off, or theres still something to do about it ? huh.gif

Yes the screen and backlight turn now on and off, but i don´t see a graphical output, only a black screen.

What i see also is that the gpio keys repeating very fast, maybe it is a part of the problem, so that it try to switch on the screen directly after it switched off.

Link to comment
Share on other sites

Guest ejtagle

Yes the screen and backlight turn now on and off, but i don´t see a graphical output, only a black screen.

What i see also is that the gpio keys repeating very fast, maybe it is a part of the problem, so that it try to switch on the screen directly after it switched off.

No, i think the gpio repeat rate is not the problem (it can be configured...) ... the problem seems to be a bug in the pwm controller driver of tegra. By commenting those lines in the shuttle-*-gpu.c, the fb console is never enabled again, so we need those lines (the calls to fb_blank()). But, enabling those lines triggers the pwm bug. I think the best approach will be to fix the tegra pwm driver to accept that multiple enabling/disabling... And i also think this bug should be fixed in later versions of the .36 kernel... will also check that. I will take a deeper look into this and the wifi problem in a few hours. Thanks for your patience! :D

Regards,

Eduardo

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.