]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/r128: make ATI PCI GART part of its only user, r128
authorJani Nikula <jani.nikula@intel.com>
Tue, 19 Nov 2019 10:05:36 +0000 (12:05 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 20 Nov 2019 09:09:05 +0000 (11:09 +0200)
The ATI Rage 128 driver has been the only user of ATI PCI GART code
since Radeon dropped UMS support in commit 8333f607a631 ("drm/radeon:
remove UMS support"). Clean up the drm top level directory, Kconfig and
Makefile by making ati_pcigart.[ch] part of r128. Drop the
CONFIG_DRM_ATI_PCIGART config option made redundant by the change.

This reduces drm.ko module size slightly when legacy drivers are
enabled, and moves the baggage to r128.ko instead.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191119100536.12024-1-jani.nikula@intel.com
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/r128/Makefile
drivers/gpu/drm/r128/ati_pcigart.c [moved from drivers/gpu/drm/ati_pcigart.c with 98% similarity]
drivers/gpu/drm/r128/ati_pcigart.h [moved from include/drm/ati_pcigart.h with 100% similarity]
drivers/gpu/drm/r128/r128_drv.h

index 36357a36a28107bd62057e60b16508eaf58bd2be..7e089c47a58e6406eaaea8a4fd4c437a315005c6 100644 (file)
@@ -272,9 +272,6 @@ config DRM_VKMS
 
          If M is selected the module will be called vkms.
 
-config DRM_ATI_PCIGART
-        bool
-
 source "drivers/gpu/drm/exynos/Kconfig"
 
 source "drivers/gpu/drm/rockchip/Kconfig"
@@ -371,7 +368,6 @@ menuconfig DRM_LEGACY
        bool "Enable legacy drivers (DANGEROUS)"
        depends on DRM && MMU
        select DRM_VM
-       select DRM_ATI_PCIGART if PCI
        help
          Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
          APIs to user-space, which can be used to circumvent access
index 9f1c7c486f88b500e0eae0f28e31f83d1bba7f3b..d9bcc9f2a0a402cfa8991cc8ef4de63218013d10 100644 (file)
@@ -25,7 +25,6 @@ drm-$(CONFIG_DRM_VM) += drm_vm.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
 drm-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_gem_shmem_helper.o
-drm-$(CONFIG_DRM_ATI_PCIGART) += ati_pcigart.o
 drm-$(CONFIG_DRM_PANEL) += drm_panel.o
 drm-$(CONFIG_OF) += drm_of.o
 drm-$(CONFIG_AGP) += drm_agpsupport.o
index ae8a1860c6b864da5107baf01c79132ef8c7968e..c07a069533efe88b2dbb563506b8b8f3407e36fc 100644 (file)
@@ -3,7 +3,7 @@
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
-r128-y   := r128_drv.o r128_cce.o r128_state.o r128_irq.o
+r128-y   := r128_drv.o r128_cce.o r128_state.o r128_irq.o ati_pcigart.o
 
 r128-$(CONFIG_COMPAT)   += r128_ioc32.o
 
similarity index 98%
rename from drivers/gpu/drm/ati_pcigart.c
rename to drivers/gpu/drm/r128/ati_pcigart.c
index 580aa2676358e56ab410a15b9b0c6c0b09c10522..9b4072f97215edca4630cb16ed68fb6a641b96ee 100644 (file)
 
 #include <linux/export.h>
 
-#include <drm/ati_pcigart.h>
 #include <drm/drm_device.h>
 #include <drm/drm_pci.h>
 #include <drm/drm_print.h>
 
+#include "ati_pcigart.h"
+
 # define ATI_PCIGART_PAGE_SIZE         4096    /**< PCI GART page size */
 
 static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
@@ -95,7 +96,6 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
 
        return 1;
 }
-EXPORT_SYMBOL(drm_ati_pcigart_cleanup);
 
 int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
 {
@@ -207,4 +207,3 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
        gart_info->bus_addr = bus_address;
        return ret;
 }
-EXPORT_SYMBOL(drm_ati_pcigart_init);
index ba8c30ed91d14292ba7bac8869d8dd10993b4ac2..8b256123cf2b1d7674572e95b7b152e30bca27d5 100644 (file)
 #include <linux/io.h>
 #include <linux/irqreturn.h>
 
-#include <drm/ati_pcigart.h>
 #include <drm/drm_ioctl.h>
 #include <drm/drm_legacy.h>
 #include <drm/r128_drm.h>
 
+#include "ati_pcigart.h"
+
 /* General customization:
  */
 #define DRIVER_AUTHOR          "Gareth Hughes, VA Linux Systems Inc."