diff options
author | Christian König <christian.koenig@amd.com> | 2014-01-23 14:24:15 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-01-29 21:23:01 +0100 |
commit | 593b26353f1965682db955d0d2af8bc564aabdf8 (patch) | |
tree | dc24b66b42f54aa23d73d58fad5be7c02ee19d93 /drivers/gpu/drm/radeon/radeon_gart.c | |
parent | Merge tag 'drm/for-3.14-rc1-20140123' of git://anongit.freedesktop.org/tegra/... (diff) | |
download | linux-593b26353f1965682db955d0d2af8bc564aabdf8.tar.xz linux-593b26353f1965682db955d0d2af8bc564aabdf8.zip |
drm/radeon: fix VMID use tracking
Otherwise we allocate a new VMID on nearly every submit.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gart.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 96e440061bdb..0e9143bd35e3 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -713,7 +713,7 @@ struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev, unsigned i; /* check if the id is still valid */ - if (vm->fence && vm->fence == rdev->vm_manager.active[vm->id]) + if (vm->last_id_use && vm->last_id_use == rdev->vm_manager.active[vm->id]) return NULL; /* we definately need to flush */ @@ -769,6 +769,9 @@ void radeon_vm_fence(struct radeon_device *rdev, radeon_fence_unref(&vm->fence); vm->fence = radeon_fence_ref(fence); + + radeon_fence_unref(&vm->last_id_use); + vm->last_id_use = radeon_fence_ref(fence); } /** @@ -1303,6 +1306,8 @@ void radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) { vm->id = 0; vm->fence = NULL; + vm->last_flush = NULL; + vm->last_id_use = NULL; mutex_init(&vm->mutex); INIT_LIST_HEAD(&vm->list); INIT_LIST_HEAD(&vm->va); @@ -1341,5 +1346,6 @@ void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm) } radeon_fence_unref(&vm->fence); radeon_fence_unref(&vm->last_flush); + radeon_fence_unref(&vm->last_id_use); mutex_unlock(&vm->mutex); } |