Skip to content
Commit e2d7dfb6 authored by Jesse Barnes's avatar Jesse Barnes
Browse files

libdrm/intel: support GTT maps correctly



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).

Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent c9cfeaa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment