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:
@@ -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
|
||||
|
Reference in New Issue
Block a user