winsys/amdgpu: sparse buffer creation / destruction / commitment
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 7 Feb 2017 16:04:49 +0000 (17:04 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Apr 2017 08:37:18 +0000 (10:37 +0200)
commit667da4eaed37de143681711344aba19373bee1d0
treeca6dc84317cec0da58410c50e4049e4847f43796
parente3482486473a471b4da80b2db2c7c3f3b6445d02
winsys/amdgpu: sparse buffer creation / destruction / commitment

This is the bulk of the buffer allocation logic. It is fairly simple and
stupid. We'll probably want to use e.g. interval trees at some point to
keep track of commitments, but Mesa doesn't have an implementation of those
yet.

v2:
- remove pipe_mutex_*
- fix total_backing_pages accounting
- simplify by using the new VA_OP_CLEAR/REPLACE kernel interface

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c