diff options
author | Rob Clark <robdclark@gmail.com> | 2015-01-21 17:49:59 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-01-22 10:42:21 -0500 |
commit | 5a1aa4b447868b0ea66d2903df479b3b94c34151 (patch) | |
tree | 62f7456d9e6f121646c390e7a20cd3adc55fe624 /drivers/gpu/drm/radeon/radeon.h | |
parent | 308de41ba3bde80d50833718a2e37e49be868f5a (diff) |
drm/radeon: make MMU_NOTIFIER optional
In cases where MMU_NOTIFIER is not available, userptr will not be
available. Similar to i915, although not making an exception for
CAP_SYS_ADMIN.
The proposed userspace patches for userptr seem to handle the fall-
back properly, so a userptr-less kernel should not be a problem.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index d15e3c0c09f5..93e407b7e7a7 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1780,8 +1780,16 @@ void radeon_test_syncing(struct radeon_device *rdev); | |||
1780 | /* | 1780 | /* |
1781 | * MMU Notifier | 1781 | * MMU Notifier |
1782 | */ | 1782 | */ |
1783 | #if defined(CONFIG_MMU_NOTIFIER) | ||
1783 | int radeon_mn_register(struct radeon_bo *bo, unsigned long addr); | 1784 | int radeon_mn_register(struct radeon_bo *bo, unsigned long addr); |
1784 | void radeon_mn_unregister(struct radeon_bo *bo); | 1785 | void radeon_mn_unregister(struct radeon_bo *bo); |
1786 | #else | ||
1787 | static inline int radeon_mn_register(struct radeon_bo *bo, unsigned long addr) | ||
1788 | { | ||
1789 | return -ENODEV; | ||
1790 | } | ||
1791 | static inline void radeon_mn_unregister(struct radeon_bo *bo) {} | ||
1792 | #endif | ||
1785 | 1793 | ||
1786 | /* | 1794 | /* |
1787 | * Debugfs | 1795 | * Debugfs |