drm/r128: make ATI PCI GART part of its only user, r128
Subsystems (2)
PATCH 1/1 drm/r128: make ATI PCI GART part of its only user, r128
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.
---
drivers/gpu/drm/Kconfig | 4 ----
drivers/gpu/drm/Makefile | 1 -
drivers/gpu/drm/r128/Makefile | 2 +-
drivers/gpu/drm/{ => r128}/ati_pcigart.c | 5 ++---
{include/drm => drivers/gpu/drm/r128}/ati_pcigart.h | 0
drivers/gpu/drm/r128/r128_drv.h | 3 ++-
6 files changed, 5 insertions(+), 10 deletions(-)
rename drivers/gpu/drm/{ => r128}/ati_pcigart.c (98%)
rename {include/drm => drivers/gpu/drm/r128}/ati_pcigart.h (100%)drivers/gpu/drm/Kconfig +0 -4
@@ -297,9 +297,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"
@@ -396,7 +393,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
drivers/gpu/drm/Makefile +0 -1
@@ -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
drivers/gpu/drm/r128/Makefile +1 -1
@@ -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
drivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +2 -3
@@ -33,11 +33,12 @@#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_inforeturn 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);
drivers/gpu/drm/r128/ati_pcigart.h renamed from include/drm/ati_pcigart.h +0 -0
drivers/gpu/drm/r128/r128_drv.h +2 -1
@@ -39,11 +39,12 @@#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."
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Jani Nikula
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,KconfigandMakefileby making ati_pcigart.[ch] part of r128. Drop theCONFIG_DRM_ATI_PCIGARTconfig option made redundant by the change.
Quoted 7 lines
This reduces drm.ko module size slightly when legacy drivers are enabled, and moves the baggage to r128.ko instead.
Cc Alex Deucher <[email protected]>Cc Daniel Vetter <[email protected]>Cc Dave Airlie <[email protected]>Signed-off-by Jani Nikula <[email protected]>
NIce.
Quoted 117 lines
--- drivers/gpu/drm/Kconfig | 4 ---- drivers/gpu/drm/Makefile | 1 - drivers/gpu/drm/r128/Makefile | 2 +- drivers/gpu/drm/{ => r128}/ati_pcigart.c | 5 ++--- {include/drm => drivers/gpu/drm/r128}/ati_pcigart.h | 0 drivers/gpu/drm/r128/r128_drv.h | 3 ++- 6 files changed, 5 insertions(+), 10 deletions(-) rename drivers/gpu/drm/{ => r128}/ati_pcigart.c (98%) rename {include/drm => drivers/gpu/drm/r128}/ati_pcigart.h (100%)drivers/gpu/drm/Kconfig +0
-4@@ -297,9 +297,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"@@ -396,7 +393,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 accessdrivers/gpu/drm/Makefile +0
-1@@ -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.odrivers/gpu/drm/r128/Makefile +1
-1@@ -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.odrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +2
-3@@ -33,11 +33,12 @@#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_inforeturn 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);drivers/gpu/drm/r128/ati_pcigart.h renamed from include/drm/ati_pcigart.h +0
-0drivers/gpu/drm/r128/r128_drv.h +2
-2@@ -39,11 +39,12 @@#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." --2.20.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 15 lines
-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Tuesday, November 19, 2019 5:06 AM
To: [email protected]
Cc: Jani Nikula <[email protected]>; Deucher, Alexander <[email protected]>; Daniel Vetter <[email protected]>; Dave Airlie <[email protected]>
Subject: [PATCH] drm/r128: make ATI PCI GART part of its only user, r128The 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,KconfigandMakefileby making ati_pcigart.[ch] part of r128. Drop theCONFIG_DRM_ATI_PCIGARTconfig option made redundant by the change.
Quoted 7 lines
This reduces drm.ko module size slightly when legacy drivers are enabled, and moves the baggage to r128.ko instead.
Cc Alex Deucher <[email protected]>Cc Daniel Vetter <[email protected]>Cc Dave Airlie <[email protected]>Signed-off-by Jani Nikula <[email protected]>
Quoted 120 lines
--- drivers/gpu/drm/Kconfig | 4 ---- drivers/gpu/drm/Makefile | 1 - drivers/gpu/drm/r128/Makefile | 2 +- drivers/gpu/drm/{ => r128}/ati_pcigart.c | 5 ++--- {include/drm => drivers/gpu/drm/r128}/ati_pcigart.h | 0 drivers/gpu/drm/r128/r128_drv.h | 3 ++- 6 files changed, 5 insertions(+), 10 deletions(-) rename drivers/gpu/drm/{=>
r128}/ati_pcigart.c(98%) rename {include/drm=>drivers/gpu/drm/r128}/ati_pcigart.h(100%)drivers/gpu/drm/Kconfig index renamed from drivers/gpu/drm/Kconfig +0
-0
76db8bc0dd1f..6d55a73d5d2b100644drivers/gpu/drm/Kconfig +0
-4@@ -297,9 +297,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"@@ -396,7 +393,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 anddangerous
APIs to user-space, which can be used to circumvent access diff --git
a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index9f1c7c486f88..d9bcc9f2a0a4100644drivers/gpu/drm/Makefile +0
-0@@ -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
drivers/gpu/drm/Makefile +0
-1-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.odrivers/gpu/drm/r128/Makefile +0
-0@@ -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.
drivers/gpu/drm/r128/Makefile +1
-1-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.odrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c rename to +0
-0
drivers/gpu/drm/r128/ati_pcigart.c
index580aa2676358..9b4072f97215100644drivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +2
-1@@ -33,11 +33,12 @@#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(structdrm_device*dev, structdrm_ati_pcigart_infodrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +0
-1return 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(structdrm_device*dev, structdrm_ati_pcigart_info*gadrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +0
-1gart_info->bus_addr = bus_address;return ret; } -EXPORT_SYMBOL (drm_ati_pcigart_init);drivers/gpu/drm/r128/ati_pcigart.h renamed from include/drm/ati_pcigart.h +0
-0(quoted diff) +0
-0
b/drivers/gpu/drm/r128/r128_drv.hindexba8c30ed91d1..8b256123cf2b100644drivers/gpu/drm/r128/r128_drv.h +2
-1@@ -39,11 +39,12 @@#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
Quoted 3 lines
Inc."
--
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 18 lines · Alexander
Quoted 18 lines
-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Tuesday, November 19, 2019 5:06 AM
To: [email protected]
Cc: Jani Nikula <[email protected]>; Deucher, Alexander <[email protected]>; Daniel Vetter <[email protected]>; Dave Airlie <[email protected]>
Subject: [PATCH] drm/r128: make ATI PCI GART part of its only user, r128The 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,KconfigandMakefileby making ati_pcigart.[ch] part of r128. Drop theCONFIG_DRM_ATI_PCIGARTconfig 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.
Quoted 6 lines
Quoted 4 lines
Cc Alex Deucher <[email protected]>Cc Daniel Vetter <[email protected]>Cc Dave Airlie <[email protected]>Signed-off-by Jani Nikula <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Thanks for the reviews, pushed to drm-misc-next.
BR,
Jani.
Quoted 125 lines
Quoted 124 lines
--- drivers/gpu/drm/Kconfig | 4 ---- drivers/gpu/drm/Makefile | 1 - drivers/gpu/drm/r128/Makefile | 2 +- drivers/gpu/drm/{ => r128}/ati_pcigart.c | 5 ++--- {include/drm => drivers/gpu/drm/r128}/ati_pcigart.h | 0 drivers/gpu/drm/r128/r128_drv.h | 3 ++- 6 files changed, 5 insertions(+), 10 deletions(-) rename drivers/gpu/drm/{=>
r128}/ati_pcigart.c(98%) rename {include/drm=>drivers/gpu/drm/r128}/ati_pcigart.h(100%)drivers/gpu/drm/Kconfig index renamed from drivers/gpu/drm/Kconfig +0
-0
76db8bc0dd1f..6d55a73d5d2b100644drivers/gpu/drm/Kconfig +0
-4@@ -297,9 +297,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"@@ -396,7 +393,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 anddangerous
APIs to user-space, which can be used to circumvent access diff --git
a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index9f1c7c486f88..d9bcc9f2a0a4100644drivers/gpu/drm/Makefile +0
-0@@ -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
drivers/gpu/drm/Makefile +0
-1-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.odrivers/gpu/drm/r128/Makefile +0
-0@@ -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.
drivers/gpu/drm/r128/Makefile +1
-1-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.odrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c rename to +0
-0
drivers/gpu/drm/r128/ati_pcigart.c
index580aa2676358..9b4072f97215100644drivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +2
-1@@ -33,11 +33,12 @@#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(structdrm_device*dev, structdrm_ati_pcigart_infodrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +0
-1return 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(structdrm_device*dev, structdrm_ati_pcigart_info*gadrivers/gpu/drm/r128/ati_pcigart.c renamed from drivers/gpu/drm/ati_pcigart.c +0
-1gart_info->bus_addr = bus_address;return ret; } -EXPORT_SYMBOL (drm_ati_pcigart_init);drivers/gpu/drm/r128/ati_pcigart.h renamed from include/drm/ati_pcigart.h +0
-0(quoted diff) +0
-0
b/drivers/gpu/drm/r128/r128_drv.hindexba8c30ed91d1..8b256123cf2b100644drivers/gpu/drm/r128/r128_drv.h +2
-1@@ -39,11 +39,12 @@#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 SystemsInc."
--
2.20.1
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel