diff options
author | Christian König <christian.koenig@amd.com> | 2014-11-19 16:01:24 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-11-20 21:00:17 +0300 |
commit | ad1a58a45ae9a35aaf68b27d21600889360680f3 (patch) | |
tree | bd9f4d69d9f228f89e0bdac4cff725ebecaf7dae /drivers/gpu/drm/radeon/radeon_sync.c | |
parent | 587cdda8f739f4c57c91d3f73a1d5b2851a86cb8 (diff) | |
download | linux-ad1a58a45ae9a35aaf68b27d21600889360680f3.tar.xz |
drm/radeon: track VM update fences separately
Note for each fence if it's a VM page table update or not. This allows
us to determine the last VM update in a sync object and so to figure
out if we need to flush the TLB or not.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_sync.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_sync.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_sync.c b/drivers/gpu/drm/radeon/radeon_sync.c index ddd88fb28d99..02ac8a1de4ff 100644 --- a/drivers/gpu/drm/radeon/radeon_sync.c +++ b/drivers/gpu/drm/radeon/radeon_sync.c @@ -48,6 +48,8 @@ void radeon_sync_create(struct radeon_sync *sync) for (i = 0; i < RADEON_NUM_RINGS; ++i) sync->sync_to[i] = NULL; + + sync->last_vm_update = NULL; } /** @@ -68,6 +70,11 @@ void radeon_sync_fence(struct radeon_sync *sync, other = sync->sync_to[fence->ring]; sync->sync_to[fence->ring] = radeon_fence_later(fence, other); + + if (fence->is_vm_update) { + other = sync->last_vm_update; + sync->last_vm_update = radeon_fence_later(fence, other); + } } /** |