DMA from SCSI controller to PCI frame buffer memory.
Hello All,
I am wondering if the functionality exists in the Linux kernel to DMA from a SCSI controller directly into frame buffer memory of a PCI video card? Is there a standard method for this (similar to sendfile) or will it require some hacking?
Jason
Signature · 10 lines
Jason Howard Professional: SpectSoft, LLC http://www.spectsoft.com [email protected] Phone: +1.209.847.7812 Fax: +1.209.847.7859 Personal: http://www.psinux.org [email protected] Cell: +1.209.968.1289 Text Message: [email protected]
Quoted 6 lines · Jason Howard
Hello All,
I am wondering if the functionality exists in the Linux kernel to DMA from a SCSI controller directly into frame buffer memory of a PCI video card? Is there a standard method for this (similar to sendfile) or will it require some hacking?
In theory you can mmap the frame buffer memory, then do O_DIRECT I/O into it. In practice it will buffer (I hope it still does). One of the problems is that there are huge lists of PCI->AGP DMA errata in chipsets.
Quoted 11 lines · Alan Cox
Quoted 6 lines · Jason Howard
Hello All,
I am wondering if the functionality exists in the Linux kernel to DMA from a SCSI controller directly into frame buffer memory of a PCI video card? Is there a standard method for this (similar to sendfile) or will it require some hacking?
In theory you can mmap the frame buffer memory, then do
O_DIRECTI/O into it. In practice it will buffer (I hope it still does).
An O_DIRECT disk read into a mmapped device region will fail (if it doesn't, it'll oops ;)). O_DIRECT requires valid pages inside mem_map[].
See the `vma->vm_flags & VM_IO' test in get_user_pages(), and the VALID_PAGE() test in get_page_map().
Hacking is required to do this.
Quoted 4 lines
In theory you can mmap the frame buffer memory, then do
O_DIRECTI/O into it. In practice it will buffer (I hope it still does). One of the problems is that there are huge lists ofPCI->AGPDMA errata in chipsets.
I am not accessing the AGP bus as my frame buffer is located on the PCI bus.
00:08.0 Multimedia video controller: Unknown device f1d0:efac
Subsystem: Unknown device f1d0:efac Flags: bus master, stepping, medium devsel, latency 64, IRQ 10 Memory at f4000000 (32-bit, non-prefetchable) [size=4K] Memory at f6000000 (32-bit, prefetchable) [size=16M]
(I am working with the second memory address)
Any recommendations on where to start hacking? Would it be a good idea to add O_DIRECT to a mmaped PCI space? The kernel should not be doing any buffering whatsoever, as we will be coming close to filling the pci bus up with transfers from direct disk->fb already. (We are already doing buffering on the FB card as well)
Jason
Signature · 10 lines
Jason Howard Professional: SpectSoft, LLC http://www.spectsoft.com [email protected] Phone: +1.209.847.7812 Fax: +1.209.847.7859 Personal: http://www.psinux.org [email protected] Cell: +1.209.968.1289 Text Message: [email protected]