From 61ae227032e7f9278cc7d7224045e77e0dedb33e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 18 Apr 2019 17:10:40 +1000 Subject: drm: allow removal of legacy codepaths (v4.1) If you don't want the legacy drivers, then lets get rid of all the legacy codepaths from the core module. This drop the size of drm.ko for me by about 10%. 380515 7422 4192 392129 5fbc1 ../../drm-next-build/drivers/gpu/drm/drm.ko 351736 7298 4192 363226 58ada ../../drm-next-build/drivers/gpu/drm/drm.ko v2: drop drm_lock as well, fix some DMA->DRM typos v3: avoid ifdefs in mainline code v4: rework ioctl defs v4.1: fix nouveau Kconfig Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_vm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/drm/drm_vm.c') diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 8987501f53b2..10cf83d569e1 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -646,6 +646,7 @@ int drm_legacy_mmap(struct file *filp, struct vm_area_struct *vma) } EXPORT_SYMBOL(drm_legacy_mmap); +#if IS_ENABLED(CONFIG_DRM_LEGACY) void drm_legacy_vma_flush(struct drm_device *dev) { struct drm_vma_entry *vma, *vma_temp; @@ -656,3 +657,4 @@ void drm_legacy_vma_flush(struct drm_device *dev) kfree(vma); } } +#endif -- cgit v1.2.3