diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-09 13:07:11 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-09 13:07:11 +0000 |
commit | 0edf19010294cdde1f1f17375d558fa6b658323d (patch) | |
tree | f49678688957a03c7f5ce168c12479dc7ff8f739 /sys | |
parent | 1f8a628d4c2568c6475a6fcfd76248d9b134d044 (diff) |
drm/radeon: do not try to uselessly update virtual memory pagetable
From Jerome Glisse
015a02ea12ac2be3e53431b763a531c54b277c71 in ubuntu 3.8
3813f5ca9ab7a00e80a17aab34f155453c66c78a in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_gart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_gart.c b/sys/dev/pci/drm/radeon/radeon_gart.c index 4ccb562a5dc..1f2a20d9729 100644 --- a/sys/dev/pci/drm/radeon/radeon_gart.c +++ b/sys/dev/pci/drm/radeon/radeon_gart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_gart.c,v 1.2 2014/02/09 11:03:31 jsg Exp $ */ +/* $OpenBSD: radeon_gart.c,v 1.3 2014/02/09 13:07:10 jsg Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -1206,11 +1206,13 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, int radeon_vm_bo_rmv(struct radeon_device *rdev, struct radeon_bo_va *bo_va) { - int r; + int r = 0; rw_enter_write(&rdev->vm_manager.lock); rw_enter_write(&bo_va->vm->rwlock); - r = radeon_vm_bo_update_pte(rdev, bo_va->vm, bo_va->bo, NULL); + if (bo_va->soffset) { + r = radeon_vm_bo_update_pte(rdev, bo_va->vm, bo_va->bo, NULL); + } rw_exit_write(&rdev->vm_manager.lock); list_del(&bo_va->vm_list); rw_exit_write(&bo_va->vm->rwlock); |