summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-02-22 13:50:16 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-02-22 13:50:16 +0000
commit6c22a7b3a71e3a9b8d27c9165cfa295d2193df66 (patch)
tree279fc82f6f664f8b2641a5a3dfcf8b385412280a
parent96a4369304fc8de3568611bc033bd67d9d3a0f45 (diff)
Correct PAGE_MASK usage in radeon_vm_map_gart(). Linux defines
PAGE_MASK to be (~(PAGE_SIZE - 1)) where as our kernel defines it as (PAGE_SIZE - 1). It is possible to flag a CS as wanting to use GPU VM for cayman/aruba hardware though in practice Mesa won't submit a CS flagged with GPU VM for these unless overriden via RADEON_VA=true in the environment. For Southern Islands radeons on the other hand GPU VM is required and flagged by default.
-rw-r--r--sys/dev/pci/drm/radeon/radeon_gart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_gart.c b/sys/dev/pci/drm/radeon/radeon_gart.c
index d17b676ae09..0e29b658277 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.7 2015/02/22 13:09:46 jsg Exp $ */
+/* $OpenBSD: radeon_gart.c,v 1.8 2015/02/22 13:50:15 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -906,7 +906,7 @@ uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr)
result = rdev->gart.pages_addr[addr >> PAGE_SHIFT];
/* in case cpu page size != gpu page size*/
- result |= addr & (~PAGE_MASK);
+ result |= addr & (PAGE_MASK);
return result;
}