[PATCH] add EXA relocation function

Eric Anholt eric at anholt.net
Fri Dec 7 16:32:31 PST 2007


On Fri, 2007-12-07 at 13:33 -0800, Jesse Barnes wrote:
> In order to avoid having a fixed offset for the EXA offscreen area (which is 
> nice if the driver is using TTM) drivers need to update the base offset of 
> EXA memory in EnterVT, and may need to update any private pointers they've 
> allocated as well (e.g. for the cursor or scanout buffers, etc.).
> 
> Since the server already kicks out all the pixmaps at VT switch time, the 
> relocation is trivial and will typically just involve the one, big free area 
> and any locked driver allocations; this function reflects that.
> 
> One possible enhancement would be to call back into a driver provided function 
> to update the private allocations, but it wouldn't really save any code...
> 
> Any thoughts on this?

area->base_offset is the non-aligned offset of the allocation, i.e. it
should equal prev->base_offset + prev->size.  I think you want to be
incrementing both base_offset and offset by a delta of (new_base -
pExaScr->info->offScreenBase) and then update
pExaScr->info->offScreenBase.  You might want to run once with
DEBUG_OFFSCREEN set to make sure you're not violating any invariants.

-- 
Eric Anholt                             anholt at FreeBSD.org
eric at anholt.net                         eric.anholt at intel.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20071207/f8e436f5/attachment.pgp>


More information about the xorg mailing list