Maarten Maathuis wrote:
> Let me rephrase that, could you pinpoint the place where the
> translation from vm to real memory happens?
>
> Maarten.
>   
Hi!

When a bo is created, a slot is allocated in the device file address 
space. This slot size corresponds to the size of the bo. The offset in 
the file address space is then handed back to user-space.
When user-space tries to mmap, read or write to the bo, it uses this 
offset in the mmap() read() or write() system call. This all happens in 
ttm_bo_vm.c The code either sets up the CPU page tables to point to the 
bo, wherever it's currently located,  ttm_bo_mmap(), ttm_bo_fault(), or 
just writes to or read from it. ttm_bo_io(), although I don't think any 
drivers use ttm_bo_io() yet.

When, otoh, the bo is moved to either VRAM or AGP, the code should honor 
the page alignment.

/Thomas







------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to