diff options
author | Christian König <christian.koenig@amd.com> | 2014-05-10 18:17:09 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2014-05-20 14:42:02 +0200 |
commit | 4b09556660bfe1b43d72ca858524c6baf2c6cb1d (patch) | |
tree | b3a1f63178192d7098eafd06042d49b46898eae1 | |
parent | 4906f6891ef987637b766dfaef1c6fc95804253a (diff) | |
download | linux-4b09556660bfe1b43d72ca858524c6baf2c6cb1d.tar.bz2 |
drm/radeon: fix buffer placement under memory pressure v2
Some buffers (UVD/VM page tables) must be placed in VRAM,
but the byte restriction for moving buffers didn't took this
into account.
v2: keep closer to the original code
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 72705fb40d55..4faa4d6f9bb4 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -458,7 +458,7 @@ int radeon_bo_list_validate(struct radeon_device *rdev, * into account. We don't want to disallow buffer moves * completely. */ - if (current_domain != RADEON_GEM_DOMAIN_CPU && + if ((lobj->alt_domain & current_domain) != 0 && (domain & current_domain) == 0 && /* will be moved */ bytes_moved > bytes_moved_threshold) { /* don't move it */ |