[Intel-gfx] [PATCH] libdrm/intel: support GTT maps correctly

Eric Anholt eric at anholt.net
Fri Mar 27 00:38:52 CET 2009


On Thu, 2009-03-26 at 12:08 -0700, Jesse Barnes wrote:
> libdrm has some support for GTT mapping already, but there are bugs
> with it (no surprise since it hasn't been used much).
> 
> In fixing 20803, I found that sharing bo_gem->virtual was a bad idea,
> since a previously mapped object might not end up getting GTT mapped,
> leading to corruption.  So this patch splits the fields according to
> use, taking care to unmap both at free time (but preserving the map
> caching).
> 
> There's still a risk we might run out of mappings (there's a sysctl
> tunable for max number of mappings per process, defaulted to 64k or so
> it looks like) but at least GTT maps will work with these changes (and
> some others for fixing PAT breakage in the kernel).

Looks great to me.

Reviewed-by: Eric Anholt <eric at anholt.net>

-- 
Eric Anholt
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: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090326/b73f3cc3/attachment.pgp>


More information about the Intel-gfx mailing list