l4linux GPU direct access
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Mon Jul 23 22:48:33 CEST 2012
Hi,
On Fri Jul 20, 2012 at 11:00:32 +0200, Abhishek Gupta wrote:
> >What do you mean there's no message from fbdrv? Because the screen is
> >switching modes, or because there's some issue? Are you using a serial
> >console to not suffer from that (for kvm/QEMU: -serial stdio)?
>
> When I am using fb-drv config(without mag) with framebuffer driver enabled
> in l4linux. I can see the messages in console that
> .....
> io | ASSIGNED: request_resource
> io | HERE1: request_resource
> io | HERE2: request_resource
> io | ASSIGNED: request_resource
> fb | Trying execution of ``set VBE mode'' using x86emu
> fb | Found VESA BIOS version 2.0
> fb | OEM VGABIOS Cirrus extension
> l4linux | PH 1 (t: 1) offs=003dd000 vaddr=007dc000 vend=008fa000
> l4linux | phys=007dc000 ephys=008fa000
> l4linux | f_sz=00071000 memsz=0011e000 flgs=rw-
> ........
> ........
> l4linux | section-with-init: virt: 0x7dc000 to 0x8f9fff [1144 KiB]
> l4linux | section-with-init: Phys: 0x00a03000 to 0x00b21000, Size: 1171456
> fb | VBE mode 0x117 successfully set.
> fb | Framebuffer memory: phys: fc000000 - fc400000
> fb | virt: 400000 - 800000
> fb | Starting server loop
> l4linux | l4x_linux_startup: thread 417.
> l4linux | Main thread running, waiting...
> ..........
> ..........
>
> But When I combine PCI direct access config with fd-drv config there was
> no message from fb in console like before such as
> Trying execution of ``set VBE mode'' using x86emu
> VBE mode 0x117 successfully set
> etc..
>
> But today I tried it again and it worked(there was a minor mistake in
> previous config).
> Now I can see fb log messages Successfully setting VBE mode.
> I enabled fb console and disabled vga console and then
> tried to run X with driver cirrus. But it didn't work.
>
> fb-drv (the l4 process) and the cirrus driver are both contending for the
> same chunk of memory
> "0xa0000"!
>
> But I can see that
>
> cirrusfb 0000:00:01.0: No interrupt pin configured for device 0000:00:01.0
> __l4x_ioremap: Mapping physaddr f2000000 [0x1000 Bytes,
> f2000000+001000] to 21c00000+000000
> cirrusfb 0000:00:01.0: cannot reserve region 0xa0000, abort
> cirrusfb: probe of 0000:00:01.0 failed with error -16
>
> We are assigning the device named "PNP0900" three times, initially to the
> fb-drv then two
> times to l4linux. (these two lines are actually the same: "vgadev =>
> wrap(hw-root.VGA)"
> and "x2 => wrap(hw-root.match("PNP0900"))" ). The problem I think is that
> the device is really assigned only to fb-drv. I don't get how cirrus and
> fb-dev can both have access to that chunk of memory.
Looking at the L4Linux output it seems that all the IO memory is mapped
during device scan. That might not be a good thing to add. The cirrus
driver probably wants to have the IO memory at 0xa0000 in the same
location so this does not work anymore because it's already there.
Either you remove the check in the cirrus driver or the mapping in the
device scanner. (If CONFIG_VGA_CONSOLE is enabled the generic code will
also map 0xa0000 (see arch/l4/kernel/main.c)). Giving the same memory to
multiple client can be done, if it makes sense.
> io |
> io | HERE1: request_resource
> io | HERE2: request_resource
> io | ASSIGNED: request_resource
> l4linux | MEM: 000a0000 - 000bffff
> l4linux | requesting IOMEM: 0xa0000
> io | map mem: p=a0000 v=4a0000 s=20000: done
> l4linux | IRQ: 00000001 - 00000001
> l4linux | IRQ: 0000000c - 0000000c
> l4linux | Device: BIOS
> l4linux | MEM: 00000000 - 00000fff
> l4linux | requesting IOMEM: 0x0
> l4linux | MEM: 0009f000 - 0009ffff
> l4linux | requesting IOMEM: 0x9f000
> l4linux | MEM: 000c0000 - 000fffff
> l4linux | requesting IOMEM: 0xc0000
> l4linux | Device:
> l4linux | MEM: fc000000 - fdffffff
> l4linux | requesting IOMEM: 0xfc000000
> l4linux | Cannot attach iomem to virtual address fc000000 with size
> 1ffffff: Address not available(-99).
> l4linux | MEM: febf0000 - febf0fff
> l4linux | requesting IOMEM: 0xfebf0000
> l4linux | Cannot attach iomem to virtual address febf0000 with size fff:
> Address not available(-99).
> io | NOT ASSIGNED, NON CONTAINED: request_resource
> l4linux | MEM: febf1000 - febf10ff
> l4linux | requesting IOMEM: 0xfebf1000
> l4linux | Cannot attach iomem to virtual address febf1000 with size ff:
> Address not available(-99).
Identify mapping those cannot work.
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list