Chac, you give me hope, that is hope that I am just doing something
wrong. Did you build your kernel with modesetting enabled by default,
and did dmesg indicate that the microcode loaded properly? I don't
have any problem if I don't use modesetting by default and if it is
enabled then KMS will work, but acceleration is disabled and
everything is extremely slow at the high resolution.
> May be you should look at a Ubuntu functionnal distribution (or any
> other one which has this firmware) to see what and where the firmware
> is ?
The standard place for firmware is /lib/firmware. I have placed it in
out/system/lib/firmware as per instructions.
> I guess you'd simply need to copy it from a Linux disro to the
> appropriate Android source code directory. Somewhere in /kernel/
> firmware...
I don't believe the build process looks at firmware when building, at
lease this wasn't necessary on Gentoo. I chose gentoo because one,
that is what I use, and two, it allows me to use the stock linux
kernel from git. I am using vanilla-sources-2.6.37.
Chih-Whei, after you mentioned about timeout I remember something
about this in the kernel documentation. I changed the timeout to 600s
to make sure I wasn't missing my window. What I found is that the boot
process hangs while trying to load the firmware. It doesn't continue
until the timeout has passed. This means that init never gets a
chance. Plugging and prodding I found /sys/class/firmware/radeon_cl.0/
loading was "0" and as soon as I echo 1 > loading, KMS would
immediately kick in with dmesg showing failure to load firmware. I
don't know if this is a driver bug, or the kernel claiming that this
video module is too important to continue without. I'm not sure what
triggers the init, but if it is not triggered until all kernel modules
are loaded then this would present a definite problem. I could not
test increasing the timeout in normal mode.
In Gentoo, I realize that KMS is not enabled until after init starts
( by init I mean * Starting ... [ok]"). I see there is no break in
"drm" section of dmesg over there either. Also, I am not using any
ramdisk.
snippet of the dmesg for android
...
[ 398.480975] [drm] Loading RS780 Microcode
[ 600.860040] INFO: task modprobe:989 blocked for more than 120
seconds.
[ 600.860101] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 600.860171] modprobe D f5c05bc0 0 989 950
0x00000000
[ 600.860315] f58f1ccc 00000082 c12e9200 f5c05bc0 00000000 f58f1c40
c1026fc2 c1483bc0
[ 600.860703] c1483bc0 c1044944 f58e1b20 f5884960 f58e1d98 f5d05bc0
00000001 f58f1cdc
[ 600.861089] f58e1b20 f58f1c94 c12deae7 f58e1d9c f58e1d98 c14b8a40
f58f1c74 c1030b77
[ 600.861476] Call Trace:
[ 600.861539] [<c1026fc2>] ? check_preempt_curr+0x2c/0x69
[ 600.861602] [<c1044944>] ? wq_worker_waking_up+0xb/0x2f
[ 600.861664] [<c12deae7>] ? schedule_timeout+0x18/0x169
[ 600.861725] [<c1030b77>] ? wake_up_process+0xf/0x11
[ 600.861784] [<c10422a8>] ? wake_up_worker+0x19/0x1b
[ 600.861843] [<c1042318>] ? insert_work+0x6e/0x73
[ 600.861904] [<c102802d>] ? __wake_up+0x31/0x3b
[ 600.861962] [<c12deae7>] schedule_timeout+0x18/0x169
[ 600.862026] [<c12dde86>] wait_for_common+0x98/0xee
[ 600.862085] [<c1030b4f>] ? default_wake_function+0x0/0xd
[ 600.862146] [<c12ddf5d>] wait_for_completion+0x12/0x14
[ 600.862207] [<c11d52ce>] _request_firmware+0x221/0x2c8
[ 600.862270] [<c11d53e1>] request_firmware+0xc/0xf
[ 600.862414] [<f83ecd35>] r600_init_microcode+0x1c5/0x2d7 [radeon]
[ 600.862582] [<f83ef202>] r600_startup+0x36/0x8dc [radeon]
[ 600.862742] [<f83bb8c4>] ? radeon_gart_table_vram_alloc+0x30/0x38
[radeon]
[ 600.862909] [<f83efd16>] r600_init+0x1ac/0x232 [radeon]
[ 600.863063] [<f83a9b5f>] radeon_device_init+0x337/0x3ad [radeon]
[ 600.863217] [<f83a91df>] ? radeon_vga_set_decode+0x0/0x20 [radeon]
[ 600.863375] [<f83aae19>] radeon_driver_load_kms+0xb4/0xff [radeon]
[ 600.863484] [<f82526b2>] drm_get_pci_dev+0x126/0x208 [drm]
[ 600.863613] [<f8414a7a>] radeon_pci_probe+0x7b/0x191 [radeon]
[ 600.863709] [<c1162188>] local_pci_probe+0xe/0x10
[ 600.863768] [<c11627e8>] pci_device_probe+0x43/0x66
[ 600.863829] [<c11cfebb>] driver_probe_device+0x81/0x115
[ 600.863890] [<c11cff92>] __driver_attach+0x43/0x5f
[ 600.863949] [<c11cf8b0>] bus_for_each_dev+0x3d/0x67
[ 600.864009] [<c11cfd73>] driver_attach+0x14/0x16
[ 600.864068] [<c11cff4f>] ? __driver_attach+0x0/0x5f
[ 600.864128] [<c11cf30f>] bus_add_driver+0xa2/0x1d4
[ 600.864188] [<c11d01d7>] driver_register+0x8b/0xeb
[ 600.864247] [<c11629bb>] __pci_register_driver+0x38/0x91
[ 600.864319] [<f82527c4>] drm_pci_init+0x30/0x88 [drm]
[ 600.864388] [<f824d3e3>] drm_init+0x4a/0x4f [drm]
[ 600.864510] [<f84430ac>] radeon_init+0xac/0xae [radeon]
[ 600.864604] [<c100115e>] do_one_initcall+0x71/0x113
[ 600.864724] [<f8443000>] ? radeon_init+0x0/0xae [radeon]
[ 600.864821] [<c10596a4>] sys_init_module+0x77/0x197
[ 600.864881] [<c10028d0>] sysenter_do_call+0x12/0x26
[ 1042.400631] r600_cp: Failed to load firmware "radeon/RS780_me.bin"
[ 1042.400708] [drm:r600_startup] *ERROR* Failed to load firmware!
[ 1042.400771] radeon 0000:01:05.0: disabling GPU acceleration
[ 1042.401856] radeon 0000:01:05.0: f5881200 unpin not necessary
[ 1042.401952] radeon 0000:01:05.0: f5881200 unpin not necessary
...