Index: [thread] [date] [subject] [author]
  From: Steffen Seeger <seeger@physik.tu-chemnitz.de>
  To  : ggi-develop@eskimo.com
  Date: Mon, 20 Jul 1998 12:01:22 +0200 (MEST)

Re: DMA BLTs

> I got my BLT engine working (on a bumpy bus ride no less) so sometime
> soon I'll probably get the overwhelming desire to play with DMA;
> If I recall right the current situation with DMA on Linux is as
> follows:
> 
> 1) ISA cards cannot DMA above physical address 16M, VESA not above 64M.
> If no method can lock down and return a region in this range a smaller
> dedicated bounce-buffer and copy to/from user must be used rather than 
> a shared page.
> 
> 2) Linus has told a developer what to do to his proposed DMA page
> request functions to get them included, so there is hope for getting
> a page for ISA/VLB.
> 
> 3) The new kernels have a programmable PCI memory hole manager called
> mtrr.
> 
> Could any guru answer the following questions or point to
> code that would provide samples:

Well, I am not a guru, but try it anyway.

> 1) If a userspace process passes a pointer to blit from/to,
> /dev/graphN can tell whether access to the card is focused on
> that app, but can/how can the kernel identify the calling process and
> verify the physical region is valid and all permissions are kosher?

Using the verify_area() call. 

> 2) What's the procedure for translating a processes's userspace address
> into physical address so it can be decided whether bounce buffers
> are needed?

You need to find the vm_area_struct that contains the address, then
look up the mm_struct in there. (Basically). Dunno if virt_to_phys does this
already.

> 3) Is there any proposed GGI API for this?  Request a directbuffer
> for DMA?  Get, then put a box with a GC flag set?  Both would
> have to use shared segments, the former of large size, or opt to be
> not very efficient and use bounce buffers.

No. There isn't even KGI support for DMA buffers except the ping-pong
buffers. However, non-ping-pong DMA buffers are planned once we have working
drivers again.

> 4) Anyone thought of direct DMA of swapped out user pages to the display
> memory via a DMA capable controller on the swap device?  Worth it?

No. Maybe. Some video frame grabbers use this technique...

> --
> Brian S. Julin

			Steffen

----------------- e-mail: seeger@physik.tu-chemnitz.de -----------------

Index: [thread] [date] [subject] [author]