All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/r128: make ATI PCI GART part of its only user, r128
@ 2019-11-19 10:05 Jani Nikula
  2019-11-19 10:08 ` Daniel Vetter
  2019-11-19 13:37 ` Deucher, Alexander
  0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2019-11-19 10:05 UTC (permalink / raw)
  To: dri-devel; +Cc: Jani Nikula, Alex Deucher, Dave Airlie, Daniel Vetter

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>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 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%)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 76db8bc0dd1f..6d55a73d5d2b 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -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
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 9f1c7c486f88..d9bcc9f2a0a4 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -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
diff --git a/drivers/gpu/drm/r128/Makefile b/drivers/gpu/drm/r128/Makefile
index ae8a1860c6b8..c07a069533ef 100644
--- a/drivers/gpu/drm/r128/Makefile
+++ b/drivers/gpu/drm/r128/Makefile
@@ -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
 
diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/r128/ati_pcigart.c
similarity index 98%
rename from drivers/gpu/drm/ati_pcigart.c
rename to drivers/gpu/drm/r128/ati_pcigart.c
index 580aa2676358..9b4072f97215 100644
--- a/drivers/gpu/drm/ati_pcigart.c
+++ b/drivers/gpu/drm/r128/ati_pcigart.c
@@ -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_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);
diff --git a/include/drm/ati_pcigart.h b/drivers/gpu/drm/r128/ati_pcigart.h
similarity index 100%
rename from include/drm/ati_pcigart.h
rename to drivers/gpu/drm/r128/ati_pcigart.h
diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
index ba8c30ed91d1..8b256123cf2b 100644
--- a/drivers/gpu/drm/r128/r128_drv.h
+++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/r128: make ATI PCI GART part of its only user, r128
  2019-11-19 10:05 [PATCH] drm/r128: make ATI PCI GART part of its only user, r128 Jani Nikula
@ 2019-11-19 10:08 ` Daniel Vetter
  2019-11-19 13:37 ` Deucher, Alexander
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2019-11-19 10:08 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Alex Deucher, Dave Airlie, dri-devel

On Tue, Nov 19, 2019 at 11:05 AM Jani Nikula <jani.nikula@intel.com> wrote:
>
> 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>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

NIce.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  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%)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 76db8bc0dd1f..6d55a73d5d2b 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -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
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 9f1c7c486f88..d9bcc9f2a0a4 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -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
> diff --git a/drivers/gpu/drm/r128/Makefile b/drivers/gpu/drm/r128/Makefile
> index ae8a1860c6b8..c07a069533ef 100644
> --- a/drivers/gpu/drm/r128/Makefile
> +++ b/drivers/gpu/drm/r128/Makefile
> @@ -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
>
> diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/r128/ati_pcigart.c
> similarity index 98%
> rename from drivers/gpu/drm/ati_pcigart.c
> rename to drivers/gpu/drm/r128/ati_pcigart.c
> index 580aa2676358..9b4072f97215 100644
> --- a/drivers/gpu/drm/ati_pcigart.c
> +++ b/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -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_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);
> diff --git a/include/drm/ati_pcigart.h b/drivers/gpu/drm/r128/ati_pcigart.h
> similarity index 100%
> rename from include/drm/ati_pcigart.h
> rename to drivers/gpu/drm/r128/ati_pcigart.h
> diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
> index ba8c30ed91d1..8b256123cf2b 100644
> --- a/drivers/gpu/drm/r128/r128_drv.h
> +++ b/drivers/gpu/drm/r128/r128_drv.h
> @@ -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
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] drm/r128: make ATI PCI GART part of its only user, r128
  2019-11-19 10:05 [PATCH] drm/r128: make ATI PCI GART part of its only user, r128 Jani Nikula
  2019-11-19 10:08 ` Daniel Vetter
@ 2019-11-19 13:37 ` Deucher, Alexander
  2019-11-20  9:27     ` Jani Nikula
  1 sibling, 1 reply; 5+ messages in thread
From: Deucher, Alexander @ 2019-11-19 13:37 UTC (permalink / raw)
  To: Jani Nikula, dri-devel; +Cc: Daniel Vetter, Dave Airlie

> -----Original Message-----
> From: Jani Nikula <jani.nikula@intel.com>
> Sent: Tuesday, November 19, 2019 5:06 AM
> To: dri-devel@lists.freedesktop.org
> Cc: Jani Nikula <jani.nikula@intel.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>;
> Dave Airlie <airlied@redhat.com>
> Subject: [PATCH] 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.
> 
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  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%)
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index
> 76db8bc0dd1f..6d55a73d5d2b 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -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 diff --git
> a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index
> 9f1c7c486f88..d9bcc9f2a0a4 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -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
> diff --git a/drivers/gpu/drm/r128/Makefile b/drivers/gpu/drm/r128/Makefile
> index ae8a1860c6b8..c07a069533ef 100644
> --- a/drivers/gpu/drm/r128/Makefile
> +++ b/drivers/gpu/drm/r128/Makefile
> @@ -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
> 
> diff --git a/drivers/gpu/drm/ati_pcigart.c
> b/drivers/gpu/drm/r128/ati_pcigart.c
> similarity index 98%
> rename from drivers/gpu/drm/ati_pcigart.c rename to
> drivers/gpu/drm/r128/ati_pcigart.c
> index 580aa2676358..9b4072f97215 100644
> --- a/drivers/gpu/drm/ati_pcigart.c
> +++ b/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -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_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);
> diff --git a/include/drm/ati_pcigart.h b/drivers/gpu/drm/r128/ati_pcigart.h
> similarity index 100%
> rename from include/drm/ati_pcigart.h
> rename to drivers/gpu/drm/r128/ati_pcigart.h
> diff --git a/drivers/gpu/drm/r128/r128_drv.h
> b/drivers/gpu/drm/r128/r128_drv.h index ba8c30ed91d1..8b256123cf2b
> 100644
> --- a/drivers/gpu/drm/r128/r128_drv.h
> +++ b/drivers/gpu/drm/r128/r128_drv.h
> @@ -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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] drm/r128: make ATI PCI GART part of its only user, r128
@ 2019-11-20  9:27     ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2019-11-20  9:27 UTC (permalink / raw)
  To: Deucher, Alexander, dri-devel; +Cc: Daniel Vetter, Dave Airlie

On Tue, 19 Nov 2019, "Deucher, Alexander" <Alexander.Deucher@amd.com> wrote:
>> -----Original Message-----
>> From: Jani Nikula <jani.nikula@intel.com>
>> Sent: Tuesday, November 19, 2019 5:06 AM
>> To: dri-devel@lists.freedesktop.org
>> Cc: Jani Nikula <jani.nikula@intel.com>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>;
>> Dave Airlie <airlied@redhat.com>
>> Subject: [PATCH] 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.
>> 
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Dave Airlie <airlied@redhat.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Thanks for the reviews, pushed to drm-misc-next.

BR,
Jani.


>
>> ---
>>  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%)
>> 
>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index
>> 76db8bc0dd1f..6d55a73d5d2b 100644
>> --- a/drivers/gpu/drm/Kconfig
>> +++ b/drivers/gpu/drm/Kconfig
>> @@ -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 diff --git
>> a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index
>> 9f1c7c486f88..d9bcc9f2a0a4 100644
>> --- a/drivers/gpu/drm/Makefile
>> +++ b/drivers/gpu/drm/Makefile
>> @@ -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
>> diff --git a/drivers/gpu/drm/r128/Makefile b/drivers/gpu/drm/r128/Makefile
>> index ae8a1860c6b8..c07a069533ef 100644
>> --- a/drivers/gpu/drm/r128/Makefile
>> +++ b/drivers/gpu/drm/r128/Makefile
>> @@ -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
>> 
>> diff --git a/drivers/gpu/drm/ati_pcigart.c
>> b/drivers/gpu/drm/r128/ati_pcigart.c
>> similarity index 98%
>> rename from drivers/gpu/drm/ati_pcigart.c rename to
>> drivers/gpu/drm/r128/ati_pcigart.c
>> index 580aa2676358..9b4072f97215 100644
>> --- a/drivers/gpu/drm/ati_pcigart.c
>> +++ b/drivers/gpu/drm/r128/ati_pcigart.c
>> @@ -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_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);
>> diff --git a/include/drm/ati_pcigart.h b/drivers/gpu/drm/r128/ati_pcigart.h
>> similarity index 100%
>> rename from include/drm/ati_pcigart.h
>> rename to drivers/gpu/drm/r128/ati_pcigart.h
>> diff --git a/drivers/gpu/drm/r128/r128_drv.h
>> b/drivers/gpu/drm/r128/r128_drv.h index ba8c30ed91d1..8b256123cf2b
>> 100644
>> --- a/drivers/gpu/drm/r128/r128_drv.h
>> +++ b/drivers/gpu/drm/r128/r128_drv.h
>> @@ -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
>

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] drm/r128: make ATI PCI GART part of its only user, r128
@ 2019-11-20  9:27     ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2019-11-20  9:27 UTC (permalink / raw)
  To: Deucher, Alexander, dri-devel; +Cc: Daniel Vetter, Dave Airlie

On Tue, 19 Nov 2019, "Deucher, Alexander" <Alexander.Deucher@amd.com> wrote:
>> -----Original Message-----
>> From: Jani Nikula <jani.nikula@intel.com>
>> Sent: Tuesday, November 19, 2019 5:06 AM
>> To: dri-devel@lists.freedesktop.org
>> Cc: Jani Nikula <jani.nikula@intel.com>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>;
>> Dave Airlie <airlied@redhat.com>
>> Subject: [PATCH] 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.
>> 
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Dave Airlie <airlied@redhat.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Thanks for the reviews, pushed to drm-misc-next.

BR,
Jani.


>
>> ---
>>  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%)
>> 
>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index
>> 76db8bc0dd1f..6d55a73d5d2b 100644
>> --- a/drivers/gpu/drm/Kconfig
>> +++ b/drivers/gpu/drm/Kconfig
>> @@ -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 diff --git
>> a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index
>> 9f1c7c486f88..d9bcc9f2a0a4 100644
>> --- a/drivers/gpu/drm/Makefile
>> +++ b/drivers/gpu/drm/Makefile
>> @@ -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
>> diff --git a/drivers/gpu/drm/r128/Makefile b/drivers/gpu/drm/r128/Makefile
>> index ae8a1860c6b8..c07a069533ef 100644
>> --- a/drivers/gpu/drm/r128/Makefile
>> +++ b/drivers/gpu/drm/r128/Makefile
>> @@ -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
>> 
>> diff --git a/drivers/gpu/drm/ati_pcigart.c
>> b/drivers/gpu/drm/r128/ati_pcigart.c
>> similarity index 98%
>> rename from drivers/gpu/drm/ati_pcigart.c rename to
>> drivers/gpu/drm/r128/ati_pcigart.c
>> index 580aa2676358..9b4072f97215 100644
>> --- a/drivers/gpu/drm/ati_pcigart.c
>> +++ b/drivers/gpu/drm/r128/ati_pcigart.c
>> @@ -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_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);
>> diff --git a/include/drm/ati_pcigart.h b/drivers/gpu/drm/r128/ati_pcigart.h
>> similarity index 100%
>> rename from include/drm/ati_pcigart.h
>> rename to drivers/gpu/drm/r128/ati_pcigart.h
>> diff --git a/drivers/gpu/drm/r128/r128_drv.h
>> b/drivers/gpu/drm/r128/r128_drv.h index ba8c30ed91d1..8b256123cf2b
>> 100644
>> --- a/drivers/gpu/drm/r128/r128_drv.h
>> +++ b/drivers/gpu/drm/r128/r128_drv.h
>> @@ -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
>

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-20  9:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 10:05 [PATCH] drm/r128: make ATI PCI GART part of its only user, r128 Jani Nikula
2019-11-19 10:08 ` Daniel Vetter
2019-11-19 13:37 ` Deucher, Alexander
2019-11-20  9:27   ` Jani Nikula
2019-11-20  9:27     ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.