Skip to contentSkip to conversation

Clean up drm_pci.{c,h}

PATCH In review Thomas Zimmermann 5 participants 21 messages Dec 3, 2019

Subsystems (5)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

cover Clean up drm_pci.{c,h}

This patchset cleans up drm_pci.{c,h}. Patch 1 removes drm_pci.c from non-PCI builds. Declarations of legacy functions are hidden in drm_legacy.h and their implementation is protected by CONFIG_PCI in patch 2. The rest of the patches replace unnecessary include statements for drm_pci.h. Most of the source files only require <linux/pci.h>.

The pathset was built on x86-64 and aarch64 with PCI support and arm without PCI support.

Thomas Zimmermann (12):
drm/pci: Only build drm_pci.c if CONFIG_PCI is set drm/pci: Hide legacy PCI functions from non-legacy code drm/ast: Don't include <drm/drm_pci.h> drm/i810: Don't include <drm/drm_pci.h> drm/mga: Don't include <drm/drm_pci.h> drm/mgag200: Don't include <drm/drm_pci.h> drm/r128: Don't include <drm/drm_pci.h> drm/radeon: Don't include <drm/drm_pci.h> drm/savage: Don't include <drm/drm_pci.h> drm/sis: Don't include <drm/drm_pci.h> drm/tdfx: Don't include <drm/drm_pci.h> drm/via: Don't include <drm/drm_pci.h>

 drivers/gpu/drm/Makefile                      |  3 +-
 drivers/gpu/drm/ast/ast_drv.c                 |  1 -
 drivers/gpu/drm/drm_internal.h                | 22 ++++++++++++++
 drivers/gpu/drm/drm_pci.c                     | 17 +++--------
 drivers/gpu/drm/i810/i810_dma.c               |  2 +-
 drivers/gpu/drm/i810/i810_drv.c               |  3 +-
 drivers/gpu/drm/mga/mga_drv.h                 |  2 +-
 drivers/gpu/drm/mgag200/mgag200_cursor.c      |  2 +-
 drivers/gpu/drm/mgag200/mgag200_i2c.c         |  3 +-
 drivers/gpu/drm/mgag200/mgag200_main.c        |  3 +-
 drivers/gpu/drm/mgag200/mgag200_mode.c        |  2 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c         |  2 +-
 drivers/gpu/drm/r128/r128_drv.c               |  2 +-
 drivers/gpu/drm/radeon/atom.h                 |  1 +
 drivers/gpu/drm/radeon/atombios_encoders.c    |  2 +-
 drivers/gpu/drm/radeon/btc_dpm.c              |  3 +-
 drivers/gpu/drm/radeon/ci_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/cik.c                  |  4 +--
 drivers/gpu/drm/radeon/cypress_dpm.c          |  2 +-
 drivers/gpu/drm/radeon/evergreen.c            |  2 +-
 drivers/gpu/drm/radeon/kv_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/ni.c                   |  4 +--
 drivers/gpu/drm/radeon/ni_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/r100.c                 |  6 ++--
 drivers/gpu/drm/radeon/r300.c                 |  2 +-
 drivers/gpu/drm/radeon/r420.c                 |  2 +-
 drivers/gpu/drm/radeon/r600.c                 |  6 ++--
 drivers/gpu/drm/radeon/radeon_agp.c           |  3 +-
 drivers/gpu/drm/radeon/radeon_asic.c          |  2 +-
 drivers/gpu/drm/radeon/radeon_atombios.c      |  3 +-
 drivers/gpu/drm/radeon/radeon_bios.c          |  4 +--
 drivers/gpu/drm/radeon/radeon_clocks.c        |  3 +-
 drivers/gpu/drm/radeon/radeon_combios.c       |  3 +-
 drivers/gpu/drm/radeon/radeon_cs.c            |  2 +-
 drivers/gpu/drm/radeon/radeon_device.c        |  2 +-
 drivers/gpu/drm/radeon/radeon_display.c       |  2 +-
 drivers/gpu/drm/radeon/radeon_encoders.c      |  3 +-
 drivers/gpu/drm/radeon/radeon_fb.c            |  2 +-
 drivers/gpu/drm/radeon/radeon_gart.c          |  2 +-
 drivers/gpu/drm/radeon/radeon_gem.c           |  3 +-
 drivers/gpu/drm/radeon/radeon_i2c.c           |  2 +-
 drivers/gpu/drm/radeon/radeon_irq_kms.c       |  2 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  2 +-
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  2 +-
 drivers/gpu/drm/radeon/radeon_pm.c            |  2 +-
 drivers/gpu/drm/radeon/radeon_ttm.c           |  2 +-
 drivers/gpu/drm/radeon/rs600.c                |  2 +-
 drivers/gpu/drm/radeon/rs690.c                |  2 +-
 drivers/gpu/drm/radeon/rs780_dpm.c            |  3 +-
 drivers/gpu/drm/radeon/rv770.c                |  2 +-
 drivers/gpu/drm/radeon/si.c                   |  4 +--
 drivers/gpu/drm/radeon/si_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/trinity_dpm.c          |  3 +-
 drivers/gpu/drm/savage/savage_drv.c           |  2 +-
 drivers/gpu/drm/sis/sis_drv.c                 |  2 +-
 drivers/gpu/drm/tdfx/tdfx_drv.c               |  2 +-
 drivers/gpu/drm/via/via_dmablit.c             |  2 +-
 drivers/gpu/drm/via/via_drv.c                 |  2 +-
 drivers/gpu/drm/via/via_map.c                 |  3 +-
 include/drm/drm_legacy.h                      | 29 ++++++++++++++++++-
 include/drm/drm_pci.h                         | 19 ++++++++++--
 61 files changed, 144 insertions(+), 89 deletions(-)

--
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#1 lore raw

PATCH 1/12 drm/pci: Only build drm_pci.c if CONFIG_PCI is set

Non-PCI systems should not build PCI helpers. Set up source code, header file and Makefile accordingly.

---
 drivers/gpu/drm/Makefile       |  3 ++-
 drivers/gpu/drm/drm_internal.h | 22 ++++++++++++++++++++++
 drivers/gpu/drm/drm_pci.c      | 13 -------------
 include/drm/drm_pci.h          | 34 +++++++++++++++++++++++++++++++---
 4 files changed, 55 insertions(+), 17 deletions(-)
drivers/gpu/drm/Makefile +2 -1
index d9bcc9f2a0a4..6493088a0fdd 100644
@@ -5,7 +5,7 @@
 
 drm-y       :=	drm_auth.o drm_cache.o \
 		drm_file.o drm_gem.o drm_ioctl.o drm_irq.o \
-		drm_memory.o drm_drv.o drm_pci.o \
+		drm_memory.o drm_drv.o \
 		drm_sysfs.o drm_hashtab.o drm_mm.o \
 		drm_crtc.o drm_fourcc.o drm_modes.o drm_edid.o \
 		drm_encoder_slave.o \
@@ -28,6 +28,7 @@ drm-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_gem_shmem_helper.o
 drm-$(CONFIG_DRM_PANEL) += drm_panel.o
 drm-$(CONFIG_OF) += drm_of.o
 drm-$(CONFIG_AGP) += drm_agpsupport.o
+drm-$(CONFIG_PCI) += drm_pci.o
 drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o
 drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
 
drivers/gpu/drm/drm_internal.h +22 -0
index 51a2055c8f18..6937bf923f05 100644
@@ -45,12 +45,34 @@ struct drm_file *drm_file_alloc(struct drm_minor *minor);
 void drm_file_free(struct drm_file *file);
 void drm_lastclose(struct drm_device *dev);
 
+#ifdef CONFIG_PCI
+
 /* drm_pci.c */
 int drm_irq_by_busid(struct drm_device *dev, void *data,
 		     struct drm_file *file_priv);
 void drm_pci_agp_destroy(struct drm_device *dev);
 int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
 
+#else
+
+static inline int drm_irq_by_busid(struct drm_device *dev, void *data,
+				   struct drm_file *file_priv)
+{
+	return -EINVAL;
+}
+
+static inline void drm_pci_agp_destroy(struct drm_device *dev)
+{
+}
+
+static inline int drm_pci_set_busid(struct drm_device *dev,
+				    struct drm_master *master)
+{
+	return -EINVAL;
+}
+
+#endif
+
 /* drm_prime.c */
 int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
 				 struct drm_file *file_priv);
drivers/gpu/drm/drm_pci.c +0 -13
index a86a3ab2771c..40a2015abc77 100644
@@ -125,8 +125,6 @@ void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
 
 EXPORT_SYMBOL(drm_pci_free);
 
-#ifdef CONFIG_PCI
-
 static int drm_get_pci_domain(struct drm_device *dev)
 {
 #ifndef __alpha__
@@ -331,17 +329,6 @@ int drm_legacy_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)
 }
 EXPORT_SYMBOL(drm_legacy_pci_init);
 
-#else
-
-void drm_pci_agp_destroy(struct drm_device *dev) {}
-
-int drm_irq_by_busid(struct drm_device *dev, void *data,
-		     struct drm_file *file_priv)
-{
-	return -EINVAL;
-}
-#endif
-
 /**
  * drm_legacy_pci_exit - unregister shadow-attach legacy DRM driver
  * @driver: DRM device driver
include/drm/drm_pci.h +31 -3
index 8181e9e7cf1d..029352f8c583 100644
@@ -38,24 +38,52 @@ struct drm_dma_handle;
 struct drm_device;
 struct drm_driver;
 struct drm_master;
+struct pci_device;
+
+#ifdef CONFIG_PCI
 
 struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size,
 				     size_t align);
 void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);
 
-int drm_legacy_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
-void drm_legacy_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
-#ifdef CONFIG_PCI
 int drm_get_pci_dev(struct pci_dev *pdev,
 		    const struct pci_device_id *ent,
 		    struct drm_driver *driver);
+
+int drm_legacy_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
+void drm_legacy_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
+
 #else
+
+static inline struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev,
+						   size_t size, size_t align)
+{
+	return NULL;
+}
+
+static inline void drm_pci_free(struct drm_device *dev,
+				struct drm_dma_handle *dmah)
+{
+}
+
 static inline int drm_get_pci_dev(struct pci_dev *pdev,
 				  const struct pci_device_id *ent,
 				  struct drm_driver *driver)
 {
 	return -ENOSYS;
 }
+
+static inline int drm_legacy_pci_init(struct drm_driver *driver,
+				      struct pci_driver *pdriver)
+{
+	return -EINVAL;
+}
+
+static inline void drm_legacy_pci_exit(struct drm_driver *driver,
+				       struct pci_driver *pdriver)
+{
+}
+
 #endif
 
 #endif /* _DRM_PCI_H_ */
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#2 lore raw

PATCH 2/12 drm/pci: Hide legacy PCI functions from non-legacy code

In reply to Thomas Zimmermann

Declarations of drm_legacy_pci_{init,exit}() are being moved to drm_legacy.h. CONFIG_DRM_LEGACY protects the implementation.

---
 drivers/gpu/drm/drm_pci.c |  4 ++++
 include/drm/drm_legacy.h  | 29 ++++++++++++++++++++++++++++-
 include/drm/drm_pci.h     | 15 ---------------
 3 files changed, 32 insertions(+), 16 deletions(-)
drivers/gpu/drm/drm_pci.c +4 -0
index 40a2015abc77..f2e43d341980 100644
@@ -282,6 +282,8 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
 }
 EXPORT_SYMBOL(drm_get_pci_dev);
 
+#ifdef CONFIG_DRM_LEGACY
+
 /**
  * drm_legacy_pci_init - shadow-attach a legacy DRM PCI driver
  * @driver: DRM device driver
@@ -354,3 +356,5 @@ void drm_legacy_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
 	DRM_INFO("Module unloaded\n");
 }
 EXPORT_SYMBOL(drm_legacy_pci_exit);
+
+#endif
include/drm/drm_legacy.h +28 -1
index 58dc0c04bf99..5745710453c8 100644
@@ -38,7 +38,9 @@
 #include <drm/drm_hashtab.h>
 
 struct drm_device;
+struct drm_driver;
 struct file;
+struct pci_driver;
 
 /*
  * Legacy Support for palateontologic DRM drivers
@@ -188,8 +190,33 @@ do {										\
 void drm_legacy_idlelock_take(struct drm_lock_data *lock);
 void drm_legacy_idlelock_release(struct drm_lock_data *lock);
 
-/* drm_pci.c dma alloc wrappers */
+/* drm_pci.c */
+
+#ifdef CONFIG_PCI
+
 void __drm_legacy_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
+int drm_legacy_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
+void drm_legacy_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
+
+#else
+
+static inline void __drm_legacy_pci_free(struct drm_device *dev,
+					 drm_dma_handle_t *dmah)
+{
+}
+
+static inline int drm_legacy_pci_init(struct drm_driver *driver,
+				      struct pci_driver *pdriver)
+{
+	return -EINVAL;
+}
+
+static inline void drm_legacy_pci_exit(struct drm_driver *driver,
+				       struct pci_driver *pdriver)
+{
+}
+
+#endif
 
 /* drm_memory.c */
 void drm_legacy_ioremap(struct drm_local_map *map, struct drm_device *dev);
include/drm/drm_pci.h +0 -15
index 029352f8c583..9031e217b506 100644
@@ -38,7 +38,6 @@ struct drm_dma_handle;
 struct drm_device;
 struct drm_driver;
 struct drm_master;
-struct pci_device;
 
 #ifdef CONFIG_PCI
 
@@ -50,9 +49,6 @@ int drm_get_pci_dev(struct pci_dev *pdev,
 		    const struct pci_device_id *ent,
 		    struct drm_driver *driver);
 
-int drm_legacy_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
-void drm_legacy_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
-
 #else
 
 static inline struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev,
@@ -73,17 +69,6 @@ static inline int drm_get_pci_dev(struct pci_dev *pdev,
 	return -ENOSYS;
 }
 
-static inline int drm_legacy_pci_init(struct drm_driver *driver,
-				      struct pci_driver *pdriver)
-{
-	return -EINVAL;
-}
-
-static inline void drm_legacy_pci_exit(struct drm_driver *driver,
-				       struct pci_driver *pdriver)
-{
-}
-
 #endif
 
 #endif /* _DRM_PCI_H_ */
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

Re: [PATCH 02/12] drm/pci: Hide legacy PCI functions from non-legacy code

Hi Thomas,

Quoted 11 lines · Thomas Zimmermann

Declarations of drm_legacy_pci_{init,exit}() are being moved to drm_legacy.h. CONFIG_DRM_LEGACY protects the implementation.

---
 drivers/gpu/drm/drm_pci.c |  4 ++++
 include/drm/drm_legacy.h  | 29 ++++++++++++++++++++++++++++-
 include/drm/drm_pci.h     | 15 ---------------
 3 files changed, 32 insertions(+), 16 deletions(-)

How about we make this patch 01/12, this way we can avoid the current case of - add code only to be moved in next patch.

As always - couple of ideas for follow-up cleanups.
- drm_irq_by_busid() is legacy codebase (see the DRIVER_LEGACY check
at the top). How about we give it a _legacy_ name?
- WE HAVE A FEW driver_features
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [PATCH 02/12] drm/pci: Hide legacy PCI functions from non-legacy code

Quoted 15 lines · Emil Velikov

Hi Thomas,

Quoted 11 lines · Thomas Zimmermann

Declarations of drm_legacy_pci_{init,exit}() are being moved to drm_legacy.h. CONFIG_DRM_LEGACY protects the implementation.

---
 drivers/gpu/drm/drm_pci.c |  4 ++++
 include/drm/drm_legacy.h  | 29 ++++++++++++++++++++++++++++-
 include/drm/drm_pci.h     | 15 ---------------
 3 files changed, 32 insertions(+), 16 deletions(-)
Quoted 7 lines

How about we make this patch 01/12, this way we can avoid the current case of - add code only to be moved in next patch.

As always - couple of ideas for follow-up cleanups.
- drm_irq_by_busid() is legacy codebase (see the DRIVER_LEGACY check
at the top). How about we give it a _legacy_ name?
- WE HAVE A FEW driver_features

Pardon there, the last one should read:
- We have a few instances that read driver_features directly, instead of using the drm_core_check_feature() helper.
Might be a good idea to address those.

Just some nitpicks noticed while skimming through. It's not a requirement by any means.

HTH
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#5 lore raw

Re: [PATCH 02/12] drm/pci: Hide legacy PCI functions from non-legacy code

Hi Emil

Am 03.12.19 um 12:09 schrieb Emil Velikov:

Quoted 16 lines · Emil Velikov
Quoted 15 lines

Hi Thomas,

Quoted 11 lines · Thomas Zimmermann

Declarations of drm_legacy_pci_{init,exit}() are being moved to drm_legacy.h. CONFIG_DRM_LEGACY protects the implementation.

---
 drivers/gpu/drm/drm_pci.c |  4 ++++
 include/drm/drm_legacy.h  | 29 ++++++++++++++++++++++++++++-
 include/drm/drm_pci.h     | 15 ---------------
 3 files changed, 32 insertions(+), 16 deletions(-)
Quoted 2 lines
Quoted 2 lines

How about we make this patch 01/12, this way we can avoid the current case of - add code only to be moved in next patch.

I tried. But before patch [01/12] drm_legacy_pci_init() in drm_pci.c is protected by CONFIG_PCI, while drm_legacy_pci_exit() isn't. So moving patch [02/12] first, makes things even more ugly.

Quoted 10 lines
Quoted 5 lines

As always - couple of ideas for follow-up cleanups.
- drm_irq_by_busid() is legacy codebase (see the DRIVER_LEGACY check
at the top). How about we give it a _legacy_ name?
- WE HAVE A FEW driver_features

Pardon there, the last one should read:
- We have a few instances that read driver_features directly, instead of using the drm_core_check_feature() helper.
Might be a good idea to address those.

This specific patchset isn't about legacy, but PCI functions. But, yeah, these things are good follow-up changes. If I need something quick and simple to do before Christmas holidays... :)

Best regards
Thomas

Quoted 7 lines

Just some nitpicks noticed while skimming through. It's not a requirement by any means.

HTH
Emil

Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#6 lore raw

PATCH 3/12 drm/ast: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/ast/ast_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ast/ast_drv.c +0 -1
index 9da26750a22d..30aa73a5d9b7 100644
@@ -33,7 +33,6 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_gem_vram_helper.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_probe_helper.h>
 
 #include "ast_drv.h"
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

Re: [PATCH 03/12] drm/ast: Don't include <drm/drm_pci.h>

Thank you for the patch! Yet something to improve:

Hi Thomas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.4 v5.4-rc8 v5.4-rc7 next-20191203 v5.4 next-20191203] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/Clean-up-drm_pci-c-h/20191203-181838
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 76bb8b05960c3d1668e6bee7624ed886cbd135ba
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.5.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sparc64

If you fix the issue, kindly add following tag

All errors (new ones prefixed by >>):

drivers/gpu/drm/ast/ast_drv.c: In function 'ast_pci_probe':

>> drivers/gpu/drm/ast/ast_drv.c:90:9: error: implicit declaration of function 'drm_get_pci_dev'; did you mean 'drm_get_edid'? [-Werror=implicit-function-declaration]
     return drm_get_pci_dev(pdev, ent, &driver);
            ^~~~~~~~~~~~~~~
            drm_get_edid

cc1: some warnings being treated as errors

vim +90 drivers/gpu/drm/ast/ast_drv.c

5478ad10e7850c Thomas Zimmermann  2018-11-15  85  
56550d94cbaeaa Greg Kroah-Hartman 2012-12-21  86  static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
312fec1405dd54 Dave Airlie        2012-02-29  87  {
5478ad10e7850c Thomas Zimmermann  2018-11-15  88  	ast_kick_out_firmware_fb(pdev);
5478ad10e7850c Thomas Zimmermann  2018-11-15  89  
312fec1405dd54 Dave Airlie        2012-02-29 @90  	return drm_get_pci_dev(pdev, ent, &driver);
312fec1405dd54 Dave Airlie        2012-02-29  91  }
312fec1405dd54 Dave Airlie        2012-02-29  92  

:::::: The code at line 90 was first introduced by commit
:::::: 312fec1405dd546ddb3fa6387d54e78f604dd8f8 drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2)

:::::: TO: Dave Airlie <[email protected]>
:::::: CC: Dave Airlie <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

author maintainer
#8 lore raw

PATCH 4/12 drm/i810: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/i810/i810_dma.c | 2 +-
 drivers/gpu/drm/i810/i810_drv.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i810/i810_dma.c +1 -1
index e66c38332df4..b88c3d5f92b4 100644
@@ -32,6 +32,7 @@
 
 #include <linux/delay.h>
 #include <linux/mman.h>
+#include <linux/pci.h>
 
 #include <drm/drm_agpsupport.h>
 #include <drm/drm_device.h>
@@ -39,7 +40,6 @@
 #include <drm/drm_file.h>
 #include <drm/drm_ioctl.h>
 #include <drm/drm_irq.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_print.h>
 #include <drm/i810_drm.h>
 
drivers/gpu/drm/i810/i810_drv.c +2 -1
index 5dd26a06ee0e..0e53a066d4db 100644
@@ -31,11 +31,12 @@
  */
 
 #include "i810_drv.h"
+
 #include <linux/module.h>
+#include <linux/pci.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_pciids.h>
 #include <drm/i810_drm.h>
 
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#9 lore raw

PATCH 5/12 drm/mga: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/mga/mga_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mga/mga_drv.h +1 -1
index d5deecb93975..66df51607896 100644
@@ -32,6 +32,7 @@
 #define __MGA_DRV_H__
 
 #include <linux/irqreturn.h>
+#include <linux/pci.h>
 #include <linux/slab.h>
 
 #include <drm/drm_agpsupport.h>
@@ -40,7 +41,6 @@
 #include <drm/drm_ioctl.h>
 #include <drm/drm_irq.h>
 #include <drm/drm_legacy.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_print.h>
 #include <drm/drm_sarea.h>
 #include <drm/drm_vblank.h>
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#10 lore raw

PATCH 6/12 drm/mgag200: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/mgag200/mgag200_cursor.c | 2 +-
 drivers/gpu/drm/mgag200/mgag200_i2c.c    | 3 +--
 drivers/gpu/drm/mgag200/mgag200_main.c   | 3 ++-
 drivers/gpu/drm/mgag200/mgag200_mode.c   | 2 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/mgag200/mgag200_cursor.c +1 -1
index 79711dbb5b03..5444cf1573a3 100644
@@ -5,7 +5,7 @@
  * Author: Christopher Harvey <[email protected]>
  */
 
-#include <drm/drm_pci.h>
+#include <linux/pci.h>
 
 #include "mgag200_drv.h"
 
drivers/gpu/drm/mgag200/mgag200_i2c.c +1 -2
index 51d4037f00d4..9f4635916d32 100644
@@ -29,8 +29,7 @@
 #include <linux/export.h>
 #include <linux/i2c-algo-bit.h>
 #include <linux/i2c.h>
-
-#include <drm/drm_pci.h>
+#include <linux/pci.h>
 
 #include "mgag200_drv.h"
 
drivers/gpu/drm/mgag200/mgag200_main.c +2 -1
index e1bc5b0aa774..b1dd569b8c80 100644
@@ -8,9 +8,10 @@
  *          Dave Airlie
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
-#include <drm/drm_pci.h>
 
 #include "mgag200_drv.h"
 
drivers/gpu/drm/mgag200/mgag200_mode.c +1 -1
index 5ec697148fc1..62a8e9ccb16d 100644
@@ -9,10 +9,10 @@
  */
 
 #include <linux/delay.h>
+#include <linux/pci.h>
 
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fourcc.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
 
drivers/gpu/drm/mgag200/mgag200_ttm.c +1 -1
index 99997d737362..e89657630ea7 100644
@@ -26,7 +26,7 @@
  * Authors: Dave Airlie <[email protected]>
  */
 
-#include <drm/drm_pci.h>
+#include <linux/pci.h>
 
 #include "mgag200_drv.h"
 
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#11 lore raw

PATCH 7/12 drm/r128: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/r128/r128_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/r128/r128_drv.c +1 -1
index fd74f744604f..b7a5f162ebae 100644
@@ -30,10 +30,10 @@
  */
 
 #include <linux/module.h>
+#include <linux/pci.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_pciids.h>
 #include <drm/drm_vblank.h>
 #include <drm/r128_drm.h>
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#12 lore raw

PATCH 8/12 drm/radeon: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/radeon/atom.h                   | 1 +
 drivers/gpu/drm/radeon/atombios_encoders.c      | 2 +-
 drivers/gpu/drm/radeon/btc_dpm.c                | 3 +--
 drivers/gpu/drm/radeon/ci_dpm.c                 | 3 +--
 drivers/gpu/drm/radeon/cik.c                    | 4 ++--
 drivers/gpu/drm/radeon/cypress_dpm.c            | 2 +-
 drivers/gpu/drm/radeon/evergreen.c              | 2 +-
 drivers/gpu/drm/radeon/kv_dpm.c                 | 3 +--
 drivers/gpu/drm/radeon/ni.c                     | 4 ++--
 drivers/gpu/drm/radeon/ni_dpm.c                 | 3 +--
 drivers/gpu/drm/radeon/r100.c                   | 6 +++---
 drivers/gpu/drm/radeon/r300.c                   | 2 +-
 drivers/gpu/drm/radeon/r420.c                   | 2 +-
 drivers/gpu/drm/radeon/r600.c                   | 6 +++---
 drivers/gpu/drm/radeon/radeon_agp.c             | 3 ++-
 drivers/gpu/drm/radeon/radeon_asic.c            | 2 +-
 drivers/gpu/drm/radeon/radeon_atombios.c        | 3 ++-
 drivers/gpu/drm/radeon/radeon_bios.c            | 4 ++--
 drivers/gpu/drm/radeon/radeon_clocks.c          | 3 ++-
 drivers/gpu/drm/radeon/radeon_combios.c         | 3 ++-
 drivers/gpu/drm/radeon/radeon_cs.c              | 2 +-
 drivers/gpu/drm/radeon/radeon_device.c          | 2 +-
 drivers/gpu/drm/radeon/radeon_display.c         | 2 +-
 drivers/gpu/drm/radeon/radeon_encoders.c        | 3 ++-
 drivers/gpu/drm/radeon/radeon_fb.c              | 2 +-
 drivers/gpu/drm/radeon/radeon_gart.c            | 2 +-
 drivers/gpu/drm/radeon/radeon_gem.c             | 3 ++-
 drivers/gpu/drm/radeon/radeon_i2c.c             | 2 +-
 drivers/gpu/drm/radeon/radeon_irq_kms.c         | 2 +-
 drivers/gpu/drm/radeon/radeon_kms.c             | 2 +-
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 2 +-
 drivers/gpu/drm/radeon/radeon_pm.c              | 2 +-
 drivers/gpu/drm/radeon/radeon_ttm.c             | 2 +-
 drivers/gpu/drm/radeon/rs600.c                  | 2 +-
 drivers/gpu/drm/radeon/rs690.c                  | 2 +-
 drivers/gpu/drm/radeon/rs780_dpm.c              | 3 +--
 drivers/gpu/drm/radeon/rv770.c                  | 2 +-
 drivers/gpu/drm/radeon/si.c                     | 4 ++--
 drivers/gpu/drm/radeon/si_dpm.c                 | 3 +--
 drivers/gpu/drm/radeon/trinity_dpm.c            | 3 +--
 40 files changed, 54 insertions(+), 54 deletions(-)
drivers/gpu/drm/radeon/atom.h +1 -0
index 364b895e7ebb..1bf06c91cd95 100644
@@ -25,6 +25,7 @@
 #ifndef ATOM_H
 #define ATOM_H
 
+#include <linux/mutex.h>
 #include <linux/types.h>
 
 #define ATOM_BIOS_MAGIC		0xAA55
drivers/gpu/drm/radeon/atombios_encoders.c +1 -1
index cc8f32a1b03c..2a7be5d5e7e6 100644
@@ -26,10 +26,10 @@
 
 #include <linux/backlight.h>
 #include <linux/dmi.h>
+#include <linux/pci.h>
 
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/btc_dpm.c +1 -2
index ce37de020b91..d1d8aaf8323c 100644
@@ -22,10 +22,9 @@
  * Authors: Alex Deucher
  */
 
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "atom.h"
 #include "btc_dpm.h"
 #include "btcd.h"
drivers/gpu/drm/radeon/ci_dpm.c +1 -2
index c6fd123f60b5..a9257bed3484 100644
@@ -22,10 +22,9 @@
  */
 
 #include <linux/firmware.h>
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "atom.h"
 #include "ci_dpm.h"
 #include "cikd.h"
drivers/gpu/drm/radeon/cik.c +2 -2
index acabeaf28732..4b6f014f1746 100644
@@ -23,10 +23,10 @@
  */
 
 #include <linux/firmware.h>
-#include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
 
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/cypress_dpm.c +1 -1
index 32ed60f1048b..35b177d77791 100644
@@ -22,7 +22,7 @@
  * Authors: Alex Deucher
  */
 
-#include <drm/drm_pci.h>
+#include <linux/pci.h>
 
 #include "atom.h"
 #include "cypress_dpm.h"
drivers/gpu/drm/radeon/evergreen.c +1 -1
index 44d767ffa4b9..f6123a21dbbb 100644
@@ -23,9 +23,9 @@
  */
 
 #include <linux/firmware.h>
+#include <linux/pci.h>
 #include <linux/slab.h>
 
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 #include <drm/radeon_drm.h>
 
drivers/gpu/drm/radeon/kv_dpm.c +1 -2
index 0d8d30b78f95..5e6086eb1807 100644
@@ -21,10 +21,9 @@
  *
  */
 
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "cikd.h"
 #include "kv_dpm.h"
 #include "r600_dpm.h"
drivers/gpu/drm/radeon/ni.c +2 -2
index a729a68ad4fc..443b61cac8c5 100644
@@ -23,10 +23,10 @@
  */
 
 #include <linux/firmware.h>
-#include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
 
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/ni_dpm.c +1 -2
index d9e62ca65ab8..b57c37ddd164 100644
@@ -22,10 +22,9 @@
  */
 
 #include <linux/math64.h>
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "atom.h"
 #include "ni_dpm.h"
 #include "nid.h"
drivers/gpu/drm/radeon/r100.c +3 -3
index c61590c09955..79aecf1a7df4 100644
@@ -26,16 +26,16 @@
  *          Jerome Glisse
  */
 
-#include <linux/seq_file.h>
-#include <linux/slab.h>
 #include <linux/firmware.h>
 #include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
 
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
 #include <drm/drm_fourcc.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 #include <drm/radeon_drm.h>
 
drivers/gpu/drm/radeon/r300.c +1 -1
index 44856e3a7108..3b7ead5be5bf 100644
@@ -26,6 +26,7 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 
@@ -34,7 +35,6 @@
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "r100_track.h"
drivers/gpu/drm/radeon/r420.c +1 -1
index 83282ee2bde0..1d4c04e0a449 100644
@@ -26,13 +26,13 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 
 #include "atom.h"
 #include "r100d.h"
drivers/gpu/drm/radeon/r600.c +3 -3
index 033bc466a862..d2e51a9433f5 100644
@@ -26,14 +26,14 @@
  *          Jerome Glisse
  */
 
-#include <linux/slab.h>
-#include <linux/seq_file.h>
 #include <linux/firmware.h>
 #include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/seq_file.h>
 
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 #include <drm/radeon_drm.h>
 
drivers/gpu/drm/radeon/radeon_agp.c +2 -1
index 4de16f3badb4..0aca7bdf54c7 100644
@@ -25,9 +25,10 @@
  *    Jerome Glisse <[email protected]>
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_agpsupport.h>
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_asic.c +1 -1
index dc3c2227e06a..495700d16fc9 100644
@@ -27,10 +27,10 @@
  */
 
 #include <linux/console.h>
+#include <linux/pci.h>
 #include <linux/vgaarb.h>
 
 #include <drm/drm_crtc_helper.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/radeon_atombios.c +2 -1
index 226a7bf0eb7a..072e6daedf7a 100644
@@ -24,8 +24,9 @@
  *          Alex Deucher
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_bios.c +2 -2
index 4d1490fbb075..c84d965c283e 100644
@@ -26,11 +26,11 @@
  *          Jerome Glisse
  */
 
-#include <linux/slab.h>
 #include <linux/acpi.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
 
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 
 #include "atom.h"
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_clocks.c +2 -1
index 9057b32f4498..c594ca68e3a7 100644
@@ -26,8 +26,9 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/radeon_combios.c +2 -1
index c18ae15189f3..628a7a499186 100644
@@ -25,8 +25,9 @@
  *          Alex Deucher
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_cs.c +1 -1
index 7b5460678382..0d0ab8e0ff3b 100644
@@ -26,11 +26,11 @@
  */
 
 #include <linux/list_sort.h>
+#include <linux/pci.h>
 #include <linux/uaccess.h>
 
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_device.c +1 -1
index 5d017f0aec66..a522e092038b 100644
@@ -28,6 +28,7 @@
 
 #include <linux/console.h>
 #include <linux/efi.h>
+#include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
 #include <linux/vga_switcheroo.h>
@@ -38,7 +39,6 @@
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/radeon_drm.h>
 
drivers/gpu/drm/radeon/radeon_display.c +1 -1
index e81b01f8db90..dfb921899853 100644
@@ -24,6 +24,7 @@
  *          Alex Deucher
  */
 
+#include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/gcd.h>
 
@@ -36,7 +37,6 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_framebuffer_helper.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
drivers/gpu/drm/radeon/radeon_encoders.c +2 -1
index a0c99087034a..ced022fae19d 100644
@@ -24,9 +24,10 @@
  *          Alex Deucher
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_fb.c +1 -1
index 2c564f4f3468..f4f511796c40 100644
@@ -25,6 +25,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
 #include <linux/vga_switcheroo.h>
@@ -33,7 +34,6 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_fourcc.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_gart.c +1 -1
index d4d3778d0a98..f178ba321715 100644
@@ -26,9 +26,9 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
 #include <linux/vmalloc.h>
 
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 #ifdef CONFIG_X86
 #include <asm/set_memory.h>
drivers/gpu/drm/radeon/radeon_gem.c +2 -1
index 67298a0739cb..068c3e5da173 100644
@@ -26,10 +26,11 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_i2c.c +1 -1
index d465a3de7732..545e31e6cc3a 100644
@@ -25,10 +25,10 @@
  */
 
 #include <linux/export.h>
+#include <linux/pci.h>
 
 #include <drm/drm_device.h>
 #include <drm/drm_edid.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_irq_kms.c +1 -1
index d9613638f9cc..b86bc88ad430 100644
@@ -26,12 +26,12 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
 #include <linux/pm_runtime.h>
 
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_device.h>
 #include <drm/drm_irq.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
 #include <drm/radeon_drm.h>
drivers/gpu/drm/radeon/radeon_kms.c +1 -1
index ea24cf6fc046..8583dfaee737 100644
@@ -26,6 +26,7 @@
  *          Jerome Glisse
  */
 
+#include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
@@ -34,7 +35,6 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_file.h>
 #include <drm/drm_ioctl.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +1 -1
index ef100b790463..a33b19566b2d 100644
@@ -25,11 +25,11 @@
  */
 
 #include <linux/backlight.h>
+#include <linux/pci.h>
 
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_util.h>
 #include <drm/radeon_drm.h>
 
drivers/gpu/drm/radeon/radeon_pm.c +1 -1
index 5d10e11a9225..b37121f2631d 100644
@@ -23,10 +23,10 @@
 
 #include <linux/hwmon-sysfs.h>
 #include <linux/hwmon.h>
+#include <linux/pci.h>
 #include <linux/power_supply.h>
 
 #include <drm/drm_debugfs.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
index 91993a233cb0..f4af67035673 100644
@@ -32,6 +32,7 @@
 
 #include <linux/dma-mapping.h>
 #include <linux/pagemap.h>
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/swap.h>
@@ -41,7 +42,6 @@
 #include <drm/drm_debugfs.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_prime.h>
 #include <drm/radeon_drm.h>
 #include <drm/ttm/ttm_bo_api.h>
drivers/gpu/drm/radeon/rs600.c +1 -1
index 2f8ff089f7b1..c88b4906f7bc 100644
@@ -37,9 +37,9 @@
  */
 
 #include <linux/io-64-nonatomic-lo-hi.h>
+#include <linux/pci.h>
 
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/rs690.c +1 -1
index f0dad1224daa..81c491fc3639 100644
@@ -26,7 +26,7 @@
  *          Jerome Glisse
  */
 
-#include <drm/drm_pci.h>
+#include <linux/pci.h>
 
 #include "atom.h"
 #include "radeon.h"
drivers/gpu/drm/radeon/rs780_dpm.c +1 -2
index 72dbf3251c53..17390074277a 100644
@@ -22,10 +22,9 @@
  * Authors: Alex Deucher
  */
 
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "atom.h"
 #include "r600_dpm.h"
 #include "radeon.h"
drivers/gpu/drm/radeon/rv770.c +1 -1
index 7a6fc66d6a40..3fc461defeeb 100644
@@ -27,10 +27,10 @@
  */
 
 #include <linux/firmware.h>
+#include <linux/pci.h>
 #include <linux/slab.h>
 
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/radeon_drm.h>
 
 #include "atom.h"
drivers/gpu/drm/radeon/si.c +2 -2
index 06130fb89afd..6a1f0bac3d09 100644
@@ -23,10 +23,10 @@
  */
 
 #include <linux/firmware.h>
-#include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
 
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 #include <drm/radeon_drm.h>
 
drivers/gpu/drm/radeon/si_dpm.c +1 -2
index a0b382a637a6..720a3483f1c3 100644
@@ -22,10 +22,9 @@
  */
 
 #include <linux/math64.h>
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "atom.h"
 #include "r600_dpm.h"
 #include "radeon.h"
drivers/gpu/drm/radeon/trinity_dpm.c +1 -2
index 65302f9d025e..4d93b84aa739 100644
@@ -21,10 +21,9 @@
  *
  */
 
+#include <linux/pci.h>
 #include <linux/seq_file.h>
 
-#include <drm/drm_pci.h>
-
 #include "r600_dpm.h"
 #include "radeon.h"
 #include "radeon_asic.h"
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#13 lore raw

PATCH 9/12 drm/savage: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/savage/savage_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/savage/savage_drv.c +1 -1
index 2966fcfd9548..799bd11adb9c 100644
@@ -24,10 +24,10 @@
  */
 
 #include <linux/module.h>
+#include <linux/pci.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_pciids.h>
 
 #include "savage_drv.h"
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#14 lore raw

PATCH 10/12 drm/sis: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/sis/sis_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sis/sis_drv.c +1 -1
index ee3801201ecc..2c54b33abb54 100644
@@ -26,10 +26,10 @@
  */
 
 #include <linux/module.h>
+#include <linux/pci.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_pciids.h>
 #include <drm/sis_drm.h>
 
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#15 lore raw

PATCH 11/12 drm/tdfx: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/tdfx/tdfx_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tdfx/tdfx_drv.c +1 -1
index c243af156ee7..ab699bf0ac5c 100644
@@ -31,12 +31,12 @@
  */
 
 #include <linux/module.h>
+#include <linux/pci.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
 #include <drm/drm_ioctl.h>
 #include <drm/drm_legacy.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_pciids.h>
 
 #include "tdfx_drv.h"
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#16 lore raw

PATCH 12/12 drm/via: Don't include <drm/drm_pci.h>

In reply to Thomas Zimmermann

Including <drm/drm_pci.h> is unnecessary in most cases. Replace these instances.

---
 drivers/gpu/drm/via/via_dmablit.c | 2 +-
 drivers/gpu/drm/via/via_drv.c     | 2 +-
 drivers/gpu/drm/via/via_map.c     | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/via/via_dmablit.c +1 -1
index 3db000aacd26..d13a3897506e 100644
@@ -35,11 +35,11 @@
  */
 
 #include <linux/pagemap.h>
+#include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/via_drm.h>
 
 #include "via_dmablit.h"
drivers/gpu/drm/via/via_drv.c +1 -1
index 666a16de84f9..5da38082821f 100644
@@ -23,10 +23,10 @@
  */
 
 #include <linux/module.h>
+#include <linux/pci.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_pciids.h>
 #include <drm/via_drm.h>
 
drivers/gpu/drm/via/via_map.c +2 -1
index 431c150df014..255c5066a939 100644
@@ -22,8 +22,9 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/pci.h>
+
 #include <drm/drm_device.h>
-#include <drm/drm_pci.h>
 #include <drm/drm_vblank.h>
 #include <drm/via_drm.h>
 
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on the v1 series
#17 lore raw
In reply to Thomas Zimmermann
Quoted 10 lines · Thomas Zimmermann

This patchset cleans up drm_pci.{c,h}. Patch 1 removes drm_pci.c from non-PCI builds. Declarations of legacy functions are hidden in drm_legacy.h and their implementation is protected by CONFIG_PCI in patch 2. The rest of the patches replace unnecessary include statements for drm_pci.h. Most of the source files only require <linux/pci.h>.

The pathset was built on x86-64 and aarch64 with PCI support and arm without PCI support.

Quoted 14 lines

Thomas Zimmermann (12):
drm/pci: Only build drm_pci.c if CONFIG_PCI is set drm/pci: Hide legacy PCI functions from non-legacy code drm/ast: Don't include <drm/drm_pci.h> drm/i810: Don't include <drm/drm_pci.h> drm/mga: Don't include <drm/drm_pci.h> drm/mgag200: Don't include <drm/drm_pci.h> drm/r128: Don't include <drm/drm_pci.h> drm/radeon: Don't include <drm/drm_pci.h> drm/savage: Don't include <drm/drm_pci.h> drm/sis: Don't include <drm/drm_pci.h> drm/tdfx: Don't include <drm/drm_pci.h> drm/via: Don't include <drm/drm_pci.h>

Slightly leaning about getting 01 <> 02 swapped, but regardless the series is:

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw
In reply to Thomas Zimmermann

Hi Thomas.

Quoted 3 lines

The rest
of the patches replace unnecessary include statements for drm_pci.h. Most of the source files only require <linux/pci.h>.

I guess I am to blame here. When migrating away from drmP.h I used <drm/drm_pci.h> as preferred way when there were pci related build errors and when it worked I moved on.
Sorry for creating extra work for you, but glad to see it cleaned up.

Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#19 lore raw

Am 03.12.19 um 13:13 schrieb Sam Ravnborg:

Quoted 10 lines

Hi Thomas.

Quoted 3 lines

The rest
of the patches replace unnecessary include statements for drm_pci.h. Most of the source files only require <linux/pci.h>.

I guess I am to blame here. When migrating away from drmP.h I used <drm/drm_pci.h> as preferred way when there were pci related build errors and when it worked I moved on.
Sorry for creating extra work for you, but glad to see it cleaned up.

No problem, don't worry. :)

Quoted 7 lines

Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on the v1 series
#20 lore raw
In reply to Thomas Zimmermann
Quoted 9 lines · Thomas Zimmermann

This patchset cleans up drm_pci.{c,h}. Patch 1 removes drm_pci.c from non-PCI builds. Declarations of legacy functions are hidden in drm_legacy.h and their implementation is protected by CONFIG_PCI in patch 2. The rest of the patches replace unnecessary include statements for drm_pci.h. Most of the source files only require <linux/pci.h>.

The pathset was built on x86-64 and aarch64 with PCI support and arm without PCI support.

Series is:

Quoted 78 lines

Thomas Zimmermann (12):
drm/pci: Only build drm_pci.c if CONFIG_PCI is set drm/pci: Hide legacy PCI functions from non-legacy code drm/ast: Don't include <drm/drm_pci.h> drm/i810: Don't include <drm/drm_pci.h> drm/mga: Don't include <drm/drm_pci.h> drm/mgag200: Don't include <drm/drm_pci.h> drm/r128: Don't include <drm/drm_pci.h> drm/radeon: Don't include <drm/drm_pci.h> drm/savage: Don't include <drm/drm_pci.h> drm/sis: Don't include <drm/drm_pci.h> drm/tdfx: Don't include <drm/drm_pci.h> drm/via: Don't include <drm/drm_pci.h>

 drivers/gpu/drm/Makefile                      |  3 +-
 drivers/gpu/drm/ast/ast_drv.c                 |  1 -
 drivers/gpu/drm/drm_internal.h                | 22 ++++++++++++++
 drivers/gpu/drm/drm_pci.c                     | 17 +++--------
 drivers/gpu/drm/i810/i810_dma.c               |  2 +-
 drivers/gpu/drm/i810/i810_drv.c               |  3 +-
 drivers/gpu/drm/mga/mga_drv.h                 |  2 +-
 drivers/gpu/drm/mgag200/mgag200_cursor.c      |  2 +-
 drivers/gpu/drm/mgag200/mgag200_i2c.c         |  3 +-
 drivers/gpu/drm/mgag200/mgag200_main.c        |  3 +-
 drivers/gpu/drm/mgag200/mgag200_mode.c        |  2 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c         |  2 +-
 drivers/gpu/drm/r128/r128_drv.c               |  2 +-
 drivers/gpu/drm/radeon/atom.h                 |  1 +
 drivers/gpu/drm/radeon/atombios_encoders.c    |  2 +-
 drivers/gpu/drm/radeon/btc_dpm.c              |  3 +-
 drivers/gpu/drm/radeon/ci_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/cik.c                  |  4 +--
 drivers/gpu/drm/radeon/cypress_dpm.c          |  2 +-
 drivers/gpu/drm/radeon/evergreen.c            |  2 +-
 drivers/gpu/drm/radeon/kv_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/ni.c                   |  4 +--
 drivers/gpu/drm/radeon/ni_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/r100.c                 |  6 ++--
 drivers/gpu/drm/radeon/r300.c                 |  2 +-
 drivers/gpu/drm/radeon/r420.c                 |  2 +-
 drivers/gpu/drm/radeon/r600.c                 |  6 ++--
 drivers/gpu/drm/radeon/radeon_agp.c           |  3 +-
 drivers/gpu/drm/radeon/radeon_asic.c          |  2 +-
 drivers/gpu/drm/radeon/radeon_atombios.c      |  3 +-
 drivers/gpu/drm/radeon/radeon_bios.c          |  4 +--
 drivers/gpu/drm/radeon/radeon_clocks.c        |  3 +-
 drivers/gpu/drm/radeon/radeon_combios.c       |  3 +-
 drivers/gpu/drm/radeon/radeon_cs.c            |  2 +-
 drivers/gpu/drm/radeon/radeon_device.c        |  2 +-
 drivers/gpu/drm/radeon/radeon_display.c       |  2 +-
 drivers/gpu/drm/radeon/radeon_encoders.c      |  3 +-
 drivers/gpu/drm/radeon/radeon_fb.c            |  2 +-
 drivers/gpu/drm/radeon/radeon_gart.c          |  2 +-
 drivers/gpu/drm/radeon/radeon_gem.c           |  3 +-
 drivers/gpu/drm/radeon/radeon_i2c.c           |  2 +-
 drivers/gpu/drm/radeon/radeon_irq_kms.c       |  2 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  2 +-
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  2 +-
 drivers/gpu/drm/radeon/radeon_pm.c            |  2 +-
 drivers/gpu/drm/radeon/radeon_ttm.c           |  2 +-
 drivers/gpu/drm/radeon/rs600.c                |  2 +-
 drivers/gpu/drm/radeon/rs690.c                |  2 +-
 drivers/gpu/drm/radeon/rs780_dpm.c            |  3 +-
 drivers/gpu/drm/radeon/rv770.c                |  2 +-
 drivers/gpu/drm/radeon/si.c                   |  4 +--
 drivers/gpu/drm/radeon/si_dpm.c               |  3 +-
 drivers/gpu/drm/radeon/trinity_dpm.c          |  3 +-
 drivers/gpu/drm/savage/savage_drv.c           |  2 +-
 drivers/gpu/drm/sis/sis_drv.c                 |  2 +-
 drivers/gpu/drm/tdfx/tdfx_drv.c               |  2 +-
 drivers/gpu/drm/via/via_dmablit.c             |  2 +-
 drivers/gpu/drm/via/via_drv.c                 |  2 +-
 drivers/gpu/drm/via/via_map.c                 |  3 +-
 include/drm/drm_legacy.h                      | 29 ++++++++++++++++++-
 include/drm/drm_pci.h                         | 19 ++++++++++--
 61 files changed, 144 insertions(+), 89 deletions(-)
Quoted 7 lines

--
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel