summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_mn.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-04-12 15:24:39 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 20:48:01 +0300
commit19be5570107108fba772bc2e3a1eb22ec32fb021 (patch)
tree86b971706ea8fce92b58cac4ea73e8799564a6ef /drivers/gpu/drm/radeon/radeon_mn.c
parent750a25037cac56afeb48ab807ce80fa2cd518b8d (diff)
downloadlinux-19be5570107108fba772bc2e3a1eb22ec32fb021.tar.xz
drm/ttm: add operation ctx to ttm_bo_validate v2
Give moving a BO into place an operation context to work with. v2: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_mn.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_mn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_mn.c b/drivers/gpu/drm/radeon/radeon_mn.c
index 1d62288b7ee3..abd24975c9b1 100644
--- a/drivers/gpu/drm/radeon/radeon_mn.c
+++ b/drivers/gpu/drm/radeon/radeon_mn.c
@@ -124,6 +124,7 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,
unsigned long end)
{
struct radeon_mn *rmn = container_of(mn, struct radeon_mn, mn);
+ struct ttm_operation_ctx ctx = { false, false };
struct interval_tree_node *it;
/* notification is exclusive, but interval is inclusive */
@@ -157,7 +158,7 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,
DRM_ERROR("(%ld) failed to wait for user bo\n", r);
radeon_ttm_placement_from_domain(bo, RADEON_GEM_DOMAIN_CPU);
- r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false);
+ r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
if (r)
DRM_ERROR("(%ld) failed to validate user bo\n", r);