diff options
author | 2015-02-22 13:50:15 +0000 | |
---|---|---|
committer | 2015-02-22 13:50:15 +0000 | |
commit | 6cd6f75c510932b5e0e361875b819bdefde70e79 (patch) | |
tree | c9f66d87d48b74dcc359442db50945bad5a8a123 | |
parent | Give RS* IGP radeons a better chance of working thanks to Imre Vadasz (diff) | |
download | wireguard-openbsd-6cd6f75c510932b5e0e361875b819bdefde70e79.tar.xz wireguard-openbsd-6cd6f75c510932b5e0e361875b819bdefde70e79.zip |
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.c | 4 |
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; } |