Re: [PATCH] drm/radeon: make MMU_NOTIFIER optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 21, 2015 at 5:49 PM, Rob Clark <robdclark@xxxxxxxxx> wrote:
> 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@xxxxxxxxx>

Applied to my -next tree.  thanks!

Alex

> ---
>  drivers/gpu/drm/Kconfig         | 1 -
>  drivers/gpu/drm/radeon/Makefile | 5 +++--
>  drivers/gpu/drm/radeon/radeon.h | 8 ++++++++
>  3 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index c3413b6..75e6a88 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -110,7 +110,6 @@ config DRM_RADEON
>         select HWMON
>         select BACKLIGHT_CLASS_DEVICE
>         select INTERVAL_TREE
> -       select MMU_NOTIFIER
>         help
>           Choose this option if you have an ATI Radeon graphics card.  There
>           are both PCI and AGP versions.  You don't need to choose this to
> diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile
> index 12bc212..5e7a38b 100644
> --- a/drivers/gpu/drm/radeon/Makefile
> +++ b/drivers/gpu/drm/radeon/Makefile
> @@ -80,8 +80,9 @@ radeon-y += radeon_device.o radeon_asic.o radeon_kms.o \
>         r600_dpm.o rs780_dpm.o rv6xx_dpm.o rv770_dpm.o rv730_dpm.o rv740_dpm.o \
>         rv770_smc.o cypress_dpm.o btc_dpm.o sumo_dpm.o sumo_smc.o trinity_dpm.o \
>         trinity_smc.o ni_dpm.o si_smc.o si_dpm.o kv_smc.o kv_dpm.o ci_smc.o \
> -       ci_dpm.o dce6_afmt.o radeon_vm.o radeon_ucode.o radeon_ib.o radeon_mn.o \
> -       radeon_sync.o
> +       ci_dpm.o dce6_afmt.o radeon_vm.o radeon_ucode.o radeon_ib.o radeon_sync.o
> +
> +radeon-$(CONFIG_MMU_NOTIFIER) += radeon_mn.o
>
>  # add async DMA block
>  radeon-y += \
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 54529b8..52611d2 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1777,8 +1777,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
> --
> 2.1.0
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux