diff options
author | Jerome Glisse | 2012-08-06 18:32:21 +0200 |
---|---|---|
committer | Alex Deucher | 2012-08-13 16:50:55 +0200 |
commit | e43b5ec05afdc232be25aa481315035c1888d389 (patch) | |
tree | 540dcc594d4392675bb1fc91fdebf3d09a068e9d /drivers/gpu/drm/radeon/radeon_object.c | |
parent | drm/radeon: fix some missing parens in asic macros (diff) | |
download | kernel-qcow2-linux-e43b5ec05afdc232be25aa481315035c1888d389.tar.gz kernel-qcow2-linux-e43b5ec05afdc232be25aa481315035c1888d389.tar.xz kernel-qcow2-linux-e43b5ec05afdc232be25aa481315035c1888d389.zip |
drm/radeon: fence virtual address and free it once idle v4
Virtual address need to be fenced to know when we can safely remove it.
This patch also properly clear the pagetable. Previously it was
serouisly broken.
Kernel 3.5/3.4 need a similar patch but adapted for difference in mutex locking.
v2: For to update pagetable when unbinding bo (don't bailout if
bo_va->valid is true).
v3: Add kernel 3.5/3.4 comment.
v4: Fix compilation warnings.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 1f1a4c803c1d..1cb014b571ab 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -52,11 +52,7 @@ void radeon_bo_clear_va(struct radeon_bo *bo) list_for_each_entry_safe(bo_va, tmp, &bo->va, bo_list) { /* remove from all vm address space */ - mutex_lock(&bo_va->vm->mutex); - list_del(&bo_va->vm_list); - mutex_unlock(&bo_va->vm->mutex); - list_del(&bo_va->bo_list); - kfree(bo_va); + radeon_vm_bo_rmv(bo->rdev, bo_va->vm, bo); } } |