← Back to team overview

hybrid-graphics-linux team mailing list archive

Re: RadeonHD+IntelGMA switchable

 


On Sun, 27 Jun 2010, Ruslan N. Marchenko wrote:
Using this advice http://ubuntuforums.org/showthread.php?t=1510376 I've
managed to build and install fglrx for 2.6.34, however now I have
following error when starting discrete gfx:

(II) fglrx(0): Bad V_BIOS checksum
(II) fglrx(0): Primary V_BIOS segment is: 0xc000
(II) fglrx(0): Invalid ATI BIOS from int10, the adapter is not VGA-enabled
(EE) fglrx(0): Invalid video BIOS signature!
(EE) fglrx(0): GetBIOSParameter failed
(EE) fglrx(0): PreInitAdapter failed
(EE) fglrx(0): PreInit failed
(II) fglrx(0): === [atiddxPreInit] === end
(II) UnloadModule: "fglrx"
(II) UnloadModule: "fglrxdrm"
(II) UnloadModule: "vgahw"
(II) Unloading /usr/lib/xorg/modules/libvgahw.so
(II) UnloadModule: "fglrxdrm"

Can it be caused by loaded radeon.ko? I've tried with both, igd pwr on and
off. I can't try and remove module radeon since it is used and I haven't
enabled forced rmmod in kernel.


Using this modified fglrx driver I've noticed that it behaves much more stable with device switching (though of course not workng in DIS mode).
First issue is that atombios deadlock I've already mentioned
(atombios stuck executing CAE2 (len 62, WS 0, PS 0) @ 0xCAFE) - trying to dig it out deeper.

Second issue is when ATI is off, and you're trying to turn it off again (using rmmod/modprobe radeon.ko or that test acpi_call module) - write to debugfs hangs, resulting kernel oops with following info (from radeon):
[14972.621464] Call Trace:
[14972.621476]  [<ffffffff814fcfd6>] __mutex_lock_slowpath+0xf6/0x190
[14972.621483]  [<ffffffff81119b00>] ? mem_cgroup_charge_common+0x70/0x90
[14972.621488]  [<ffffffff814fcebb>] mutex_lock+0x2b/0x50
[14972.621494]  [<ffffffff812dd326>] vga_switcheroo_show+0x36/0xe0
[14972.621500]  [<ffffffff8113b965>] seq_read+0xe5/0x410
[14972.621504]  [<ffffffff8111e5c5>] vfs_read+0xb5/0x180
[14972.621509]  [<ffffffff8102f277>] ? do_page_fault+0x147/0x2a0
[14972.621512]  [<ffffffff8111e6e1>] sys_read+0x51/0x80
[14972.621518]  [<ffffffff810027db>] system_call_fastpath+0x16/0x1b
[14981.450146] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.P0P2.PEGP._OFF] (Node ffff8801b4c7cac0), AE_AML_INFINITE_LOOP
[14981.450263] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.GFX0.ATPX] (Node ffff8801b4c7c0c0), AE_AML_INFINITE_LOOP
[14981.450379] radeon_atpx_execute: failed to call ATPX: AE_AML_INFINITE_LOOP

it works ok with fglrx though. In fglrx I've used fglrx_pci_suspend funtion to turn the card off, this method also checks whether card is on or not:
...
    privdev = (struct drm_device*)firegl_query_pcidev((KCL_PCI_DevHandle)pdev);

    if(privdev == NULL)
    {
        KCL_DEBUG_ERROR("fglrx_pci_suspend. Can not get drm device context .\n");
        return -EIO;
    }
    state = PMSG_EVENT(pm_event);

    if (state == PMSG_EVENT(pdev->dev.power.power_state)) return 0;
...
funcion firegl_query_pcidev sems to be from closed code part:

root@BOX:~/fglrx-install.tRzyWe/common/lib/modules/fglrx/build_mod# nm ../../../../../arch/x86_64/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 | grep firegl_query_pcidev
0000000000009d80 T firegl_query_pcidev

but I wonder if you guys know some open analog of it so it could be implemented in the same way in radeon driver.


---
 Looking forward to reading yours.
   Ruslan N. Marchenko



Follow ups

References