drm/radeon: add a way to get and set initial buffer domains v2
When passing buffers between processes, the receiving process needs to know the original buffer domain, so that it doesn't accidentally move the buffer. v2: reserve the buffer Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
14a9579ddb
commit
bda72d58a2
6 changed files with 57 additions and 1 deletions
|
@ -145,6 +145,9 @@ int radeon_bo_create(struct radeon_device *rdev,
|
|||
bo->surface_reg = -1;
|
||||
INIT_LIST_HEAD(&bo->list);
|
||||
INIT_LIST_HEAD(&bo->va);
|
||||
bo->initial_domain = domain & (RADEON_GEM_DOMAIN_VRAM |
|
||||
RADEON_GEM_DOMAIN_GTT |
|
||||
RADEON_GEM_DOMAIN_CPU);
|
||||
radeon_ttm_placement_from_domain(bo, domain);
|
||||
/* Kernel allocation are uninterruptible */
|
||||
down_read(&rdev->pm.mclk_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue