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>
This commit is contained in:
Rob Clark
2015-01-21 17:49:59 -05:00
committed by Alex Deucher
parent 308de41ba3
commit 5a1aa4b447
3 changed files with 11 additions and 2 deletions

View File

@@ -1780,8 +1780,16 @@ void radeon_test_syncing(struct radeon_device *rdev);
/*
* MMU Notifier
*/
#if defined(CONFIG_MMU_NOTIFIER)
int radeon_mn_register(struct radeon_bo *bo, unsigned long addr);
void radeon_mn_unregister(struct radeon_bo *bo);
#else
static inline int radeon_mn_register(struct radeon_bo *bo, unsigned long addr)
{
return -ENODEV;
}
static inline void radeon_mn_unregister(struct radeon_bo *bo) {}
#endif
/*
* Debugfs