diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-12 14:38:58 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-13 09:22:02 +0100 |
commit | cf8698df3a7d7f46975b9d8bf79d310e17afbf4f (patch) | |
tree | 0aea6eea74e62558e0c09a7410c01ad70bda68d2 /drivers/gpu/drm/drm_bufs.c | |
parent | drm/vkms: reintroduce prepare_fb and cleanup_fb functions (diff) | |
download | linux-cf8698df3a7d7f46975b9d8bf79d310e17afbf4f.tar.xz linux-cf8698df3a7d7f46975b9d8bf79d310e17afbf4f.zip |
drm/nouveau: Remove support for legacy contexts/buffers
Remove nouveau's support for legacy contexts and buffers. It was
required by libdrm earlier than 2.4.33, released in March 2012. A
previous attempt in 2013 to remove the functionality [1] had to be
reverted [2] as there were still users left. Libdrm 2.4.33 is now
almost 11 years old and it is time for userspace to move on.
With the nouveau code gone, we can also remove the driver-feature
bit DRIVER_KMS_LEGACY_CONTEXT.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c510133d93dd6f15ca040733ba7b2891ed61fd1 # 1
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095 # 2
Link: https://patchwork.freedesktop.org/patch/msgid/20230112133858.17087-1-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/drm_bufs.c')
-rw-r--r-- | drivers/gpu/drm/drm_bufs.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index fcca21e8efac..86700560fea2 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -423,8 +423,7 @@ int drm_legacy_addmap_ioctl(struct drm_device *dev, void *data, if (!(capable(CAP_SYS_ADMIN) || map->type == _DRM_AGP || map->type == _DRM_SHM)) return -EPERM; - if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && - !drm_core_check_feature(dev, DRIVER_LEGACY)) + if (!drm_core_check_feature(dev, DRIVER_LEGACY)) return -EOPNOTSUPP; err = drm_addmap_core(dev, map->offset, map->size, map->type, @@ -469,8 +468,7 @@ int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data, int idx; int i; - if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && - !drm_core_check_feature(dev, DRIVER_LEGACY)) + if (!drm_core_check_feature(dev, DRIVER_LEGACY)) return -EOPNOTSUPP; idx = map->offset; @@ -570,8 +568,7 @@ EXPORT_SYMBOL(drm_legacy_rmmap_locked); void drm_legacy_rmmap(struct drm_device *dev, struct drm_local_map *map) { - if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && - !drm_core_check_feature(dev, DRIVER_LEGACY)) + if (!drm_core_check_feature(dev, DRIVER_LEGACY)) return; mutex_lock(&dev->struct_mutex); @@ -628,8 +625,7 @@ int drm_legacy_rmmap_ioctl(struct drm_device *dev, void *data, struct drm_map_list *r_list; int ret; - if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && - !drm_core_check_feature(dev, DRIVER_LEGACY)) + if (!drm_core_check_feature(dev, DRIVER_LEGACY)) return -EOPNOTSUPP; mutex_lock(&dev->struct_mutex); |