diff options
author | Christian König <christian.koenig@amd.com> | 2015-09-02 20:25:48 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-09-03 14:30:49 -0400 |
commit | 270e869d846af143f60b7404e01e785d18420007 (patch) | |
tree | 711237ca9c0f6c2f00c2098313c6fea496402a73 /drivers/gpu | |
parent | 362eda04ba0638af1c41dcc1e594dcbff80346c1 (diff) |
drm/amdgpu: fix buffer placement under memory pressure
Some buffers (UVD/VM page tables) must be placed in VRAM,
but the byte restriction for moving buffers didn't took this
into account.
Port of radeon commit 4b09556660bfe1b43d72ca858524c6baf2c6cb1d.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 6a206f15635f..3b355aeb62fd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -354,7 +354,7 @@ int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p) * into account. We don't want to disallow buffer moves * completely. */ - if (current_domain != AMDGPU_GEM_DOMAIN_CPU && + if ((lobj->allowed_domains & current_domain) != 0 && (domain & current_domain) == 0 && /* will be moved */ bytes_moved > bytes_moved_threshold) { /* don't move it */ |