Skip to contentSkip to conversation

drm: move dri1 drivers to drm/dri1/

PATCH In review Sam Ravnborg 4 participants 36 messages Jul 16, 2022 – Jul 19, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover drm: move dri1 drivers to drm/dri1/

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Feedback welcome!

Sam

Sam Ravnborg (11):
drm: rename DRIVER_LEGACY to DRIVER_DRI1
drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1 drm/tdfx: Move the tdfx driver to drm/dri1/ drm/r128: Move the r128 driver to drm/dri1/ drm/i810: Move the i810 driver to drm/dri1/ drm/mga: Move the mga driver to drm/dri1/ drm/sis: Move the sis driver to drm/dri1/ drm/via: Move the via driver to drm/dri1/ drm/savage: Move the savage driver to drm/dri1/ drm/dri1: Move Kconfig logic to drm/dri1
drm: Move dri1 core files to drm/dri1

 arch/powerpc/configs/pmac32_defconfig              |  2 +-
 arch/powerpc/configs/ppc6xx_defconfig              |  2 +-
 drivers/char/agp/Makefile                          |  2 +-
 drivers/char/agp/agp.h                             |  2 +-
 drivers/gpu/drm/Kconfig                            | 79 +---------------------
 drivers/gpu/drm/Makefile                           | 18 +++--
 drivers/gpu/drm/dri1/Kconfig                       | 79 ++++++++++++++++++++++
 drivers/gpu/drm/dri1/Makefile                      | 11 +++
 drivers/gpu/drm/{ => dri1}/drm_agpsupport.c        |  4 +-
 drivers/gpu/drm/{ => dri1}/drm_bufs.c              | 22 +++---
 drivers/gpu/drm/{ => dri1}/drm_context.c           | 24 +++----
 drivers/gpu/drm/{ => dri1}/drm_dma.c               |  4 +-
 drivers/gpu/drm/{ => dri1}/drm_hashtab.c           |  0
 drivers/gpu/drm/{ => dri1}/drm_irq.c               |  6 +-
 drivers/gpu/drm/{ => dri1}/drm_legacy_misc.c       |  2 +-
 drivers/gpu/drm/{ => dri1}/drm_lock.c              |  6 +-
 drivers/gpu/drm/{ => dri1}/drm_memory.c            |  0
 drivers/gpu/drm/{ => dri1}/drm_scatter.c           |  6 +-
 drivers/gpu/drm/{ => dri1}/drm_vm.c                |  2 +-
 drivers/gpu/drm/{ => dri1}/i810/Makefile           |  0
 drivers/gpu/drm/{ => dri1}/i810/i810_dma.c         |  0
 drivers/gpu/drm/{ => dri1}/i810/i810_drv.c         |  2 +-
 drivers/gpu/drm/{ => dri1}/i810/i810_drv.h         |  0
 drivers/gpu/drm/{ => dri1}/mga/Makefile            |  0
 drivers/gpu/drm/{ => dri1}/mga/mga_dma.c           |  0
 drivers/gpu/drm/{ => dri1}/mga/mga_drv.c           |  2 +-
 drivers/gpu/drm/{ => dri1}/mga/mga_drv.h           |  0
 drivers/gpu/drm/{ => dri1}/mga/mga_ioc32.c         |  0
 drivers/gpu/drm/{ => dri1}/mga/mga_irq.c           |  0
 drivers/gpu/drm/{ => dri1}/mga/mga_state.c         |  0
 drivers/gpu/drm/{ => dri1}/mga/mga_warp.c          |  0
 drivers/gpu/drm/{ => dri1}/r128/Makefile           |  0
 drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.c      |  0
 drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.h      |  0
 drivers/gpu/drm/{ => dri1}/r128/r128_cce.c         |  0
 drivers/gpu/drm/{ => dri1}/r128/r128_drv.c         |  2 +-
 drivers/gpu/drm/{ => dri1}/r128/r128_drv.h         |  0
 drivers/gpu/drm/{ => dri1}/r128/r128_ioc32.c       |  0
 drivers/gpu/drm/{ => dri1}/r128/r128_irq.c         |  0
 drivers/gpu/drm/{ => dri1}/r128/r128_state.c       |  0
 drivers/gpu/drm/{ => dri1}/savage/Makefile         |  0
 drivers/gpu/drm/{ => dri1}/savage/savage_bci.c     |  0
 drivers/gpu/drm/{ => dri1}/savage/savage_drv.c     |  2 +-
 drivers/gpu/drm/{ => dri1}/savage/savage_drv.h     |  0
 drivers/gpu/drm/{ => dri1}/savage/savage_state.c   |  0
 drivers/gpu/drm/{ => dri1}/sis/Makefile            |  0
 drivers/gpu/drm/{ => dri1}/sis/sis_drv.c           |  2 +-
 drivers/gpu/drm/{ => dri1}/sis/sis_drv.h           |  0
 drivers/gpu/drm/{ => dri1}/sis/sis_mm.c            |  0
 drivers/gpu/drm/{ => dri1}/tdfx/Makefile           |  0
 drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.c         |  2 +-
 drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.h         |  0
 drivers/gpu/drm/{ => dri1}/via/Makefile            |  4 +-
 drivers/gpu/drm/{via/via_dri1.c => dri1/via/via.c} |  4 +-
 drivers/gpu/drm/drm_drv.c                          |  2 +-
 drivers/gpu/drm/drm_file.c                         | 12 ++--
 drivers/gpu/drm/drm_internal.h                     |  2 +-
 drivers/gpu/drm/drm_ioc32.c                        | 12 ++--
 drivers/gpu/drm/drm_ioctl.c                        |  4 +-
 drivers/gpu/drm/drm_legacy.h                       | 32 ++++-----
 drivers/gpu/drm/drm_pci.c                          | 12 ++--
 drivers/gpu/drm/drm_vblank.c                       | 12 ++--
 include/drm/drm_auth.h                             |  2 +-
 include/drm/drm_device.h                           |  4 +-
 include/drm/drm_drv.h                              | 10 +--
 include/drm/drm_file.h                             |  2 +-
 include/drm/drm_legacy.h                           |  2 +-
 67 files changed, 205 insertions(+), 194 deletions(-)
#1 lore raw

PATCH 1/11 drm: rename DRIVER_LEGACY to DRIVER_DRI1

"legacy" is a general term - be specific and use the term dri1. The first step is to rename DRIVER_LEGACY to DRIVER_DRI1.

---
 drivers/gpu/drm/drm_agpsupport.c    |  4 ++--
 drivers/gpu/drm/drm_bufs.c          | 22 +++++++++++-----------
 drivers/gpu/drm/drm_context.c       | 24 ++++++++++++------------
 drivers/gpu/drm/drm_dma.c           |  4 ++--
 drivers/gpu/drm/drm_drv.c           |  2 +-
 drivers/gpu/drm/drm_file.c          |  8 ++++----
 drivers/gpu/drm/drm_ioctl.c         |  2 +-
 drivers/gpu/drm/drm_irq.c           |  6 +++---
 drivers/gpu/drm/drm_legacy_misc.c   |  2 +-
 drivers/gpu/drm/drm_lock.c          |  6 +++---
 drivers/gpu/drm/drm_pci.c           |  8 ++++----
 drivers/gpu/drm/drm_scatter.c       |  6 +++---
 drivers/gpu/drm/drm_vblank.c        |  4 ++--
 drivers/gpu/drm/i810/i810_drv.c     |  2 +-
 drivers/gpu/drm/mga/mga_drv.c       |  2 +-
 drivers/gpu/drm/r128/r128_drv.c     |  2 +-
 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_dri1.c      |  2 +-
 include/drm/drm_device.h            |  2 +-
 include/drm/drm_drv.h               |  6 +++---
 22 files changed, 60 insertions(+), 60 deletions(-)
drivers/gpu/drm/drm_agpsupport.c +2 -2
index a4ad6fd13abc..b7f6bbe7e340 100644
@@ -422,7 +422,7 @@ EXPORT_SYMBOL(drm_legacy_agp_init);
  * intact so it can still be used. It is safe to call this if AGP is disabled or
  * was already removed.
  *
- * Cleanup is only done for drivers who have DRIVER_LEGACY set.
+ * Cleanup is only done for drivers who have DRIVER_DRI1 set.
  */
 void drm_legacy_agp_clear(struct drm_device *dev)
 {
@@ -430,7 +430,7 @@ void drm_legacy_agp_clear(struct drm_device *dev)
 
 	if (!dev->agp)
 		return;
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
drivers/gpu/drm/drm_bufs.c +11 -11
index fcca21e8efac..8cc134d1c26a 100644
@@ -424,7 +424,7 @@ int drm_legacy_addmap_ioctl(struct drm_device *dev, void *data,
 		return -EPERM;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	err = drm_addmap_core(dev, map->offset, map->size, map->type,
@@ -470,7 +470,7 @@ int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,
 	int i;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	idx = map->offset;
@@ -571,7 +571,7 @@ EXPORT_SYMBOL(drm_legacy_rmmap_locked);
 void drm_legacy_rmmap(struct drm_device *dev, struct drm_local_map *map)
 {
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	mutex_lock(&dev->struct_mutex);
@@ -584,7 +584,7 @@ void drm_legacy_master_rmmaps(struct drm_device *dev, struct drm_master *master)
 {
 	struct drm_map_list *r_list, *list_temp;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	mutex_lock(&dev->struct_mutex);
@@ -629,7 +629,7 @@ int drm_legacy_rmmap_ioctl(struct drm_device *dev, void *data,
 	int ret;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	mutex_lock(&dev->struct_mutex);
@@ -1276,7 +1276,7 @@ int drm_legacy_addbufs(struct drm_device *dev, void *data,
 	struct drm_buf_desc *request = data;
 	int ret;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
@@ -1322,7 +1322,7 @@ int __drm_legacy_infobufs(struct drm_device *dev,
 	int i;
 	int count;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
@@ -1412,7 +1412,7 @@ int drm_legacy_markbufs(struct drm_device *dev, void *data,
 	int order;
 	struct drm_buf_entry *entry;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
@@ -1460,7 +1460,7 @@ int drm_legacy_freebufs(struct drm_device *dev, void *data,
 	int idx;
 	struct drm_buf *buf;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
@@ -1516,7 +1516,7 @@ int __drm_legacy_mapbufs(struct drm_device *dev, void *data, int *p,
 	unsigned long virtual;
 	int i;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
@@ -1607,7 +1607,7 @@ int drm_legacy_mapbufs(struct drm_device *dev, void *data,
 int drm_legacy_dma_ioctl(struct drm_device *dev, void *data,
 		  struct drm_file *file_priv)
 {
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (dev->driver->dma_ioctl)
drivers/gpu/drm/drm_context.c +12 -12
index c6e6a3e7219a..97564097d130 100644
@@ -60,7 +60,7 @@ struct drm_ctx_list {
 void drm_legacy_ctxbitmap_free(struct drm_device * dev, int ctx_handle)
 {
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	mutex_lock(&dev->struct_mutex);
@@ -98,7 +98,7 @@ static int drm_legacy_ctxbitmap_next(struct drm_device * dev)
 void drm_legacy_ctxbitmap_init(struct drm_device * dev)
 {
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	idr_init(&dev->ctx_idr);
@@ -115,7 +115,7 @@ void drm_legacy_ctxbitmap_init(struct drm_device * dev)
 void drm_legacy_ctxbitmap_cleanup(struct drm_device * dev)
 {
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	mutex_lock(&dev->struct_mutex);
@@ -137,7 +137,7 @@ void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm_file *file)
 	struct drm_ctx_list *pos, *tmp;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	mutex_lock(&dev->ctxlist_mutex);
@@ -183,7 +183,7 @@ int drm_legacy_getsareactx(struct drm_device *dev, void *data,
 	struct drm_map_list *_entry;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	mutex_lock(&dev->struct_mutex);
@@ -231,7 +231,7 @@ int drm_legacy_setsareactx(struct drm_device *dev, void *data,
 	struct drm_map_list *r_list = NULL;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	mutex_lock(&dev->struct_mutex);
@@ -336,7 +336,7 @@ int drm_legacy_resctx(struct drm_device *dev, void *data,
 	int i;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (res->count >= DRM_RESERVED_CONTEXTS) {
@@ -371,7 +371,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data,
 	int tmp_handle;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	tmp_handle = drm_legacy_ctxbitmap_next(dev);
@@ -420,7 +420,7 @@ int drm_legacy_getctx(struct drm_device *dev, void *data,
 	struct drm_ctx *ctx = data;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	/* This is 0, because we don't handle any context flags */
@@ -446,7 +446,7 @@ int drm_legacy_switchctx(struct drm_device *dev, void *data,
 	struct drm_ctx *ctx = data;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	DRM_DEBUG("%d\n", ctx->handle);
@@ -470,7 +470,7 @@ int drm_legacy_newctx(struct drm_device *dev, void *data,
 	struct drm_ctx *ctx = data;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	DRM_DEBUG("%d\n", ctx->handle);
@@ -496,7 +496,7 @@ int drm_legacy_rmctx(struct drm_device *dev, void *data,
 	struct drm_ctx *ctx = data;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	DRM_DEBUG("%d\n", ctx->handle);
drivers/gpu/drm/drm_dma.c +2 -2
index eb6b741a6f99..c6b80a618e5e 100644
@@ -54,7 +54,7 @@ int drm_legacy_dma_setup(struct drm_device *dev)
 	int i;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA) ||
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return 0;
 
 	dev->buf_use = 0;
@@ -85,7 +85,7 @@ void drm_legacy_dma_takedown(struct drm_device *dev)
 	int i, j;
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA) ||
-	    !drm_core_check_feature(dev, DRIVER_LEGACY))
+	    !drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	if (!dma)
drivers/gpu/drm/drm_drv.c +1 -1
index 8214a0b1ab7f..45e6a48ac110 100644
@@ -933,7 +933,7 @@ EXPORT_SYMBOL(drm_dev_register);
  */
 void drm_dev_unregister(struct drm_device *dev)
 {
-	if (drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (drm_core_check_feature(dev, DRIVER_DRI1))
 		drm_lastclose(dev);
 
 	dev->registered = false;
drivers/gpu/drm/drm_file.c +4 -4
index ed25168619fc..c6781afe41cf 100644
@@ -63,7 +63,7 @@ bool drm_dev_needs_global_mutex(struct drm_device *dev)
 	 * bother. They also still need BKL locking for their ioctls, so better
 	 * safe than sorry.
 	 */
-	if (drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (drm_core_check_feature(dev, DRIVER_DRI1))
 		return true;
 
 	/*
@@ -256,12 +256,12 @@ void drm_file_free(struct drm_file *file)
 		  atomic_read(&dev->open_count));
 
 #ifdef CONFIG_DRM_LEGACY
-	if (drm_core_check_feature(dev, DRIVER_LEGACY) &&
+	if (drm_core_check_feature(dev, DRIVER_DRI1) &&
 	    dev->driver->preclose)
 		dev->driver->preclose(dev, file);
 #endif
 
-	if (drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (drm_core_check_feature(dev, DRIVER_DRI1))
 		drm_legacy_lock_release(dev, file->filp);
 
 	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
@@ -461,7 +461,7 @@ void drm_lastclose(struct drm_device * dev)
 		dev->driver->lastclose(dev);
 	DRM_DEBUG("driver lastclose completed\n");
 
-	if (drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (drm_core_check_feature(dev, DRIVER_DRI1))
 		drm_legacy_dev_reinit(dev);
 
 	drm_client_dev_restore(dev);
drivers/gpu/drm/drm_ioctl.c +1 -1
index ca2a6e6101dc..ab36c689f19f 100644
@@ -783,7 +783,7 @@ long drm_ioctl_kernel(struct file *file, drm_ioctl_t *func, void *kdata,
 		return retcode;
 
 	/* Enforce sane locking for modern driver ioctls. */
-	if (likely(!drm_core_check_feature(dev, DRIVER_LEGACY)) ||
+	if (likely(!drm_core_check_feature(dev, DRIVER_DRI1)) ||
 	    (flags & DRM_UNLOCKED))
 		retcode = func(dev, kdata, file_priv);
 	else {
drivers/gpu/drm/drm_irq.c +3 -3
index d327638e15ee..ac7042db24dc 100644
@@ -102,7 +102,7 @@ static int drm_legacy_irq_install(struct drm_device *dev, int irq)
 
 	if (ret < 0) {
 		dev->irq_enabled = false;
-		if (drm_core_check_feature(dev, DRIVER_LEGACY))
+		if (drm_core_check_feature(dev, DRIVER_DRI1))
 			vga_client_unregister(to_pci_dev(dev->dev));
 		free_irq(irq, dev);
 	} else {
@@ -148,7 +148,7 @@ int drm_legacy_irq_uninstall(struct drm_device *dev)
 
 	DRM_DEBUG("irq=%d\n", dev->irq);
 
-	if (drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (drm_core_check_feature(dev, DRIVER_DRI1))
 		vga_client_unregister(to_pci_dev(dev->dev));
 
 	if (dev->driver->irq_uninstall)
@@ -173,7 +173,7 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,
 
 	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
 		return 0;
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return 0;
 	/* UMS was only ever supported on pci devices. */
 	if (WARN_ON(!dev_is_pci(dev->dev)))
drivers/gpu/drm/drm_legacy_misc.c +1 -1
index d4c5434062d7..a33e4adf6974 100644
@@ -59,7 +59,7 @@ int drm_legacy_setup(struct drm_device * dev)
 	int ret;
 
 	if (dev->driver->firstopen &&
-	    drm_core_check_feature(dev, DRIVER_LEGACY)) {
+	    drm_core_check_feature(dev, DRIVER_DRI1)) {
 		ret = dev->driver->firstopen(dev);
 		if (ret != 0)
 			return ret;
drivers/gpu/drm/drm_lock.c +3 -3
index 1efbd5389d89..c2ad6b34f247 100644
@@ -169,7 +169,7 @@ int drm_legacy_lock(struct drm_device *dev, void *data,
 	struct drm_master *master = file_priv->master;
 	int ret = 0;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	++file_priv->lock_count;
@@ -259,7 +259,7 @@ int drm_legacy_unlock(struct drm_device *dev, void *data, struct drm_file *file_
 	struct drm_lock *lock = data;
 	struct drm_master *master = file_priv->master;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (lock->context == DRM_KERNEL_CONTEXT) {
@@ -354,7 +354,7 @@ void drm_legacy_lock_release(struct drm_device *dev, struct file *filp)
 
 void drm_legacy_lock_master_cleanup(struct drm_device *dev, struct drm_master *master)
 {
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return;
 
 	/*
drivers/gpu/drm/drm_pci.c +4 -4
index 39d35fc3a43b..eb0656db08a2 100644
@@ -107,7 +107,7 @@ int drm_legacy_irq_by_busid(struct drm_device *dev, void *data,
 {
 	struct drm_irq_busid *p = data;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	/* UMS was only ever support on PCI devices. */
@@ -171,7 +171,7 @@ static int drm_legacy_get_pci_dev(struct pci_dev *pdev,
 	if (ret)
 		goto err_agp;
 
-	if (drm_core_check_feature(dev, DRIVER_LEGACY)) {
+	if (drm_core_check_feature(dev, DRIVER_DRI1)) {
 		mutex_lock(&legacy_dev_list_lock);
 		list_add_tail(&dev->legacy_dev_list, &legacy_dev_list);
 		mutex_unlock(&legacy_dev_list_lock);
@@ -205,7 +205,7 @@ int drm_legacy_pci_init(const struct drm_driver *driver,
 
 	DRM_DEBUG("\n");
 
-	if (WARN_ON(!(driver->driver_features & DRIVER_LEGACY)))
+	if (WARN_ON(!(driver->driver_features & DRIVER_DRI1)))
 		return -EINVAL;
 
 	/* If not using KMS, fall back to stealth mode manual scanning. */
@@ -249,7 +249,7 @@ void drm_legacy_pci_exit(const struct drm_driver *driver,
 
 	DRM_DEBUG("\n");
 
-	if (!(driver->driver_features & DRIVER_LEGACY)) {
+	if (!(driver->driver_features & DRIVER_DRI1)) {
 		WARN_ON(1);
 	} else {
 		mutex_lock(&legacy_dev_list_lock);
drivers/gpu/drm/drm_scatter.c +3 -3
index f4e6184d1877..bc213ffb98e7 100644
@@ -64,7 +64,7 @@ static void drm_sg_cleanup(struct drm_sg_mem * entry)
 void drm_legacy_sg_cleanup(struct drm_device *dev)
 {
 	if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg &&
-	    drm_core_check_feature(dev, DRIVER_LEGACY)) {
+	    drm_core_check_feature(dev, DRIVER_DRI1)) {
 		drm_sg_cleanup(dev->sg);
 		dev->sg = NULL;
 	}
@@ -84,7 +84,7 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
 
 	DRM_DEBUG("\n");
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_SG))
@@ -200,7 +200,7 @@ int drm_legacy_sg_free(struct drm_device *dev, void *data,
 	struct drm_scatter_gather *request = data;
 	struct drm_sg_mem *entry;
 
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return -EOPNOTSUPP;
 
 	if (!drm_core_check_feature(dev, DRIVER_SG))
drivers/gpu/drm/drm_vblank.c +2 -2
index 2ff31717a3de..a03b03edc6d4 100644
@@ -1594,7 +1594,7 @@ int drm_legacy_modeset_ctl_ioctl(struct drm_device *dev, void *data,
 		return 0;
 
 	/* KMS drivers handle this internally */
-	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+	if (!drm_core_check_feature(dev, DRIVER_DRI1))
 		return 0;
 
 	pipe = modeset->crtc;
@@ -1740,7 +1740,7 @@ static void drm_wait_vblank_reply(struct drm_device *dev, unsigned int pipe,
 static bool drm_wait_vblank_supported(struct drm_device *dev)
 {
 #if IS_ENABLED(CONFIG_DRM_LEGACY)
-	if (unlikely(drm_core_check_feature(dev, DRIVER_LEGACY)))
+	if (unlikely(drm_core_check_feature(dev, DRIVER_DRI1)))
 		return dev->irq_enabled;
 #endif
 	return drm_dev_has_vblank(dev);
drivers/gpu/drm/i810/i810_drv.c +1 -1
index 0e53a066d4db..fceb9a38c0ee 100644
@@ -57,7 +57,7 @@ static const struct file_operations i810_driver_fops = {
 };
 
 static struct drm_driver driver = {
-	.driver_features = DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_LEGACY,
+	.driver_features = DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_DRI1,
 	.dev_priv_size = sizeof(drm_i810_buf_priv_t),
 	.load = i810_driver_load,
 	.lastclose = i810_driver_lastclose,
drivers/gpu/drm/mga/mga_drv.c +1 -1
index 71128e6f6ae9..0fc3f3a2d9d7 100644
@@ -55,7 +55,7 @@ static const struct file_operations mga_driver_fops = {
 
 static struct drm_driver driver = {
 	.driver_features =
-	    DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_LEGACY |
+	    DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_DRI1 |
 	    DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ,
 	.dev_priv_size = sizeof(drm_mga_buf_priv_t),
 	.load = mga_driver_load,
drivers/gpu/drm/r128/r128_drv.c +1 -1
index e35a3a1449bd..6f90627be21b 100644
@@ -59,7 +59,7 @@ static const struct file_operations r128_driver_fops = {
 
 static struct drm_driver driver = {
 	.driver_features =
-	    DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_LEGACY |
+	    DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_DRI1 |
 	    DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ,
 	.dev_priv_size = sizeof(drm_r128_buf_priv_t),
 	.load = r128_driver_load,
drivers/gpu/drm/savage/savage_drv.c +1 -1
index 799bd11adb9c..66494500d7fd 100644
@@ -49,7 +49,7 @@ static const struct file_operations savage_driver_fops = {
 
 static struct drm_driver driver = {
 	.driver_features =
-	    DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_PCI_DMA | DRIVER_LEGACY,
+	    DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_PCI_DMA | DRIVER_DRI1,
 	.dev_priv_size = sizeof(drm_savage_buf_priv_t),
 	.load = savage_driver_load,
 	.firstopen = savage_driver_firstopen,
drivers/gpu/drm/sis/sis_drv.c +1 -1
index e35e719cf315..9206ded39462 100644
@@ -101,7 +101,7 @@ static void sis_driver_postclose(struct drm_device *dev, struct drm_file *file)
 }
 
 static struct drm_driver driver = {
-	.driver_features = DRIVER_USE_AGP | DRIVER_LEGACY,
+	.driver_features = DRIVER_USE_AGP | DRIVER_DRI1,
 	.load = sis_driver_load,
 	.unload = sis_driver_unload,
 	.open = sis_driver_open,
drivers/gpu/drm/tdfx/tdfx_drv.c +1 -1
index 58c185c299f4..ec1326973b6c 100644
@@ -57,7 +57,7 @@ static const struct file_operations tdfx_driver_fops = {
 };
 
 static const struct drm_driver driver = {
-	.driver_features = DRIVER_LEGACY,
+	.driver_features = DRIVER_DRI1,
 	.fops = &tdfx_driver_fops,
 	.name = DRIVER_NAME,
 	.desc = DRIVER_DESC,
drivers/gpu/drm/via/via_dri1.c +1 -1
index d695d9291ece..c5708a3f4530 100644
@@ -3579,7 +3579,7 @@ static const struct file_operations via_driver_fops = {
 
 static struct drm_driver driver = {
 	.driver_features =
-	    DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_LEGACY,
+	    DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_DRI1,
 	.load = via_driver_load,
 	.unload = via_driver_unload,
 	.open = via_driver_open,
include/drm/drm_device.h +1 -1
index 9923c7a6885e..bbf7ff8aa492 100644
@@ -138,7 +138,7 @@ struct drm_device {
 	 * Lock for others (not &drm_minor.master and &drm_file.is_master)
 	 *
 	 * WARNING:
-	 * Only drivers annotated with DRIVER_LEGACY should be using this.
+	 * Only drivers annotated with DRIVER_DRI1 should be using this.
 	 */
 	struct mutex struct_mutex;
 
include/drm/drm_drv.h +3 -3
index f6159acb8856..e9725295686b 100644
@@ -105,11 +105,11 @@ enum drm_driver_feature {
 	 */
 	DRIVER_USE_AGP			= BIT(25),
 	/**
-	 * @DRIVER_LEGACY:
+	 * @DRIVER_DRI1:
 	 *
-	 * Denote a legacy driver using shadow attach. Do not use.
+	 * Denote a DRI1 driver using shadow attach. Do not use.
 	 */
-	DRIVER_LEGACY			= BIT(26),
+	DRIVER_DRI1			= BIT(26),
 	/**
 	 * @DRIVER_PCI_DMA:
 	 *
Signature · 1 line
2.34.1
Reviewed-by on v1 1/11
#2 lore raw

Re: [PATCH v1 01/11] drm: rename DRIVER_LEGACY to DRIVER_DRI1

Hello Sam,

Thanks a lot for working on this patch-set.

Quoted 4 lines · Sam Ravnborg

"legacy" is a general term - be specific and use the term dri1. The first step is to rename DRIVER_LEGACY to DRIVER_DRI1.

IIRC it was Thomas who suggested the s/DRIVER_LEGACY/DRIVER_DRI1 rename, while I suggested the move to a separate dri1 directory.

Quoted 2 lines

---

[...]

Quoted 1 line

if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&

Not for this series but I wonder when this could be dropped since is only used by nouveau and only when CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is enabled.

AFAIK this is only needed for an old nouveau DDX so I wonder whether someone even still uses that in practice. For example, we don't even set CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT in the Fedora kernel configs.

--
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat

#3 lore raw

PATCH 2/11 drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1

In reply to Sam Ravnborg

The rename is done to make it more obvious what is DRI1 drivers and what is other type of legacy.

---
 arch/powerpc/configs/pmac32_defconfig |  2 +-
 arch/powerpc/configs/ppc6xx_defconfig |  2 +-
 drivers/char/agp/Makefile             |  2 +-
 drivers/char/agp/agp.h                |  2 +-
 drivers/gpu/drm/Kconfig               | 10 ++++-----
 drivers/gpu/drm/Makefile              |  6 ++---
 drivers/gpu/drm/drm_file.c            |  4 ++--
 drivers/gpu/drm/drm_internal.h        |  2 +-
 drivers/gpu/drm/drm_ioc32.c           | 12 +++++-----
 drivers/gpu/drm/drm_ioctl.c           |  2 +-
 drivers/gpu/drm/drm_legacy.h          | 32 +++++++++++++--------------
 drivers/gpu/drm/drm_pci.c             |  4 ++--
 drivers/gpu/drm/drm_vblank.c          |  8 +++----
 drivers/gpu/drm/drm_vm.c              |  2 +-
 include/drm/drm_auth.h                |  2 +-
 include/drm/drm_device.h              |  2 +-
 include/drm/drm_drv.h                 |  4 ++--
 include/drm/drm_file.h                |  2 +-
 include/drm/drm_legacy.h              |  2 +-
 19 files changed, 51 insertions(+), 51 deletions(-)
arch/powerpc/configs/pmac32_defconfig +1 -1
index 13885ec563d1..47bb0e8018e4 100644
@@ -187,7 +187,7 @@ CONFIG_AGP=m
 CONFIG_AGP_UNINORTH=m
 CONFIG_DRM=m
 CONFIG_DRM_RADEON=m
-CONFIG_DRM_LEGACY=y
+CONFIG_DRM_DRI1=y
 CONFIG_DRM_R128=m
 CONFIG_FB=y
 CONFIG_FB_OF=y
arch/powerpc/configs/ppc6xx_defconfig +1 -1
index b622ecd73286..5616b669e6ab 100644
@@ -694,7 +694,7 @@ CONFIG_AGP=y
 CONFIG_AGP_UNINORTH=y
 CONFIG_DRM=m
 CONFIG_DRM_RADEON=m
-CONFIG_DRM_LEGACY=y
+CONFIG_DRM_DRI1=y
 CONFIG_DRM_TDFX=m
 CONFIG_DRM_R128=m
 CONFIG_DRM_MGA=m
drivers/char/agp/Makefile +1 -1
index 90ed8c789e48..360e8e9dde98 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 agpgart-y := backend.o generic.o isoch.o
 
-ifeq ($(CONFIG_DRM_LEGACY),y)
+ifeq ($(CONFIG_DRM_DRI1),y)
 agpgart-$(CONFIG_COMPAT)	+= compat_ioctl.o
 agpgart-y			+= frontend.o
 endif
drivers/char/agp/agp.h +1 -1
index bb09d64cd51e..97802b076d80 100644
@@ -186,7 +186,7 @@ int agp_add_bridge(struct agp_bridge_data *bridge);
 void agp_remove_bridge(struct agp_bridge_data *bridge);
 
 /* Frontend routines. */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int agp_frontend_initialize(void);
 void agp_frontend_cleanup(void);
 #else
drivers/gpu/drm/Kconfig +5 -5
index 1c91e1e861a5..024081480fcf 100644
@@ -402,10 +402,10 @@ config DRM_HYPERV
 
 	 If M is selected the module will be called hyperv_drm.
 
-# Keep legacy drivers last
+# Keep legacy DRI1 drivers last
 
-menuconfig DRM_LEGACY
-	bool "Enable legacy drivers (DANGEROUS)"
+menuconfig DRM_DRI1
+	bool "Enable legacy DRI1 drivers (DANGEROUS)"
 	depends on DRM && MMU
 	help
 	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
@@ -419,7 +419,7 @@ menuconfig DRM_LEGACY
 
 	  Unless you have strong reasons to go rogue, say "N".
 
-if DRM_LEGACY
+if DRM_DRI1
 
 config DRM_TDFX
 	tristate "3dfx Banshee/Voodoo3+"
@@ -478,7 +478,7 @@ config DRM_SAVAGE
 	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
 	  chipset. If M is selected the module will be called savage.
 
-endif # DRM_LEGACY
+endif # DRM_DRI1
 
 config DRM_EXPORT_FOR_TESTS
 	bool
drivers/gpu/drm/Makefile +3 -3
index 25016dcab55e..dd7f296ef9b8 100644
@@ -18,9 +18,9 @@ drm-y       :=	drm_aperture.o drm_auth.o drm_cache.o \
 		drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \
 		drm_client_modeset.o drm_atomic_uapi.o \
 		drm_managed.o drm_vblank_work.o
-drm-$(CONFIG_DRM_LEGACY) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \
-			    drm_hashtab.o drm_irq.o drm_legacy_misc.o drm_lock.o \
-			    drm_memory.o drm_scatter.o drm_vm.o
+drm-$(CONFIG_DRM_DRI1) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \
+			  drm_hashtab.o drm_irq.o drm_legacy_misc.o drm_lock.o \
+			  drm_memory.o drm_scatter.o drm_vm.o
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 drm-$(CONFIG_DRM_PANEL) += drm_panel.o
drivers/gpu/drm/drm_file.c +2 -2
index c6781afe41cf..a48bce8fe85e 100644
@@ -255,7 +255,7 @@ void drm_file_free(struct drm_file *file)
 		  (long)old_encode_dev(file->minor->kdev->devt),
 		  atomic_read(&dev->open_count));
 
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 	if (drm_core_check_feature(dev, DRIVER_DRI1) &&
 	    dev->driver->preclose)
 		dev->driver->preclose(dev, file);
@@ -368,7 +368,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
 	list_add(&priv->lhead, &dev->filelist);
 	mutex_unlock(&dev->filelist_mutex);
 
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 #ifdef __alpha__
 	/*
 	 * Default the hose
drivers/gpu/drm/drm_internal.h +1 -1
index 1fbbc19f1ac0..fd085b9ea712 100644
@@ -120,7 +120,7 @@ int drm_legacy_modeset_ctl_ioctl(struct drm_device *dev, void *data,
 /* drm_irq.c */
 
 /* IOCTLS */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int drm_legacy_irq_control(struct drm_device *dev, void *data,
 			   struct drm_file *file_priv);
 #endif
drivers/gpu/drm/drm_ioc32.c +6 -6
index 5d82891c3222..5d941f1eb231 100644
@@ -163,7 +163,7 @@ static int compat_drm_setunique(struct file *file, unsigned int cmd,
 	return -EINVAL;
 }
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 typedef struct drm_map32 {
 	u32 offset;		/* Requested physical address (0 for SAREA) */
 	u32 size;		/* Requested physical size (bytes) */
@@ -308,7 +308,7 @@ static int compat_drm_getstats(struct file *file, unsigned int cmd,
 	return 0;
 }
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 typedef struct drm_buf_desc32 {
 	int count;		 /* Number of buffers of this size */
 	int size;		 /* Size in bytes */
@@ -618,7 +618,7 @@ static int compat_drm_dma(struct file *file, unsigned int cmd,
 }
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 #if IS_ENABLED(CONFIG_AGP)
 typedef struct drm_agp_mode32 {
 	u32 mode;	/**< AGP mode */
@@ -914,13 +914,13 @@ static struct {
 #define DRM_IOCTL32_DEF(n, f) [DRM_IOCTL_NR(n##32)] = {.fn = f, .name = #n}
 	DRM_IOCTL32_DEF(DRM_IOCTL_VERSION, compat_drm_version),
 	DRM_IOCTL32_DEF(DRM_IOCTL_GET_UNIQUE, compat_drm_getunique),
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	DRM_IOCTL32_DEF(DRM_IOCTL_GET_MAP, compat_drm_getmap),
 #endif
 	DRM_IOCTL32_DEF(DRM_IOCTL_GET_CLIENT, compat_drm_getclient),
 	DRM_IOCTL32_DEF(DRM_IOCTL_GET_STATS, compat_drm_getstats),
 	DRM_IOCTL32_DEF(DRM_IOCTL_SET_UNIQUE, compat_drm_setunique),
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	DRM_IOCTL32_DEF(DRM_IOCTL_ADD_MAP, compat_drm_addmap),
 	DRM_IOCTL32_DEF(DRM_IOCTL_ADD_BUFS, compat_drm_addbufs),
 	DRM_IOCTL32_DEF(DRM_IOCTL_MARK_BUFS, compat_drm_markbufs),
@@ -941,7 +941,7 @@ static struct {
 	DRM_IOCTL32_DEF(DRM_IOCTL_AGP_UNBIND, compat_drm_agp_unbind),
 #endif
 #endif
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	DRM_IOCTL32_DEF(DRM_IOCTL_SG_ALLOC, compat_drm_sg_alloc),
 	DRM_IOCTL32_DEF(DRM_IOCTL_SG_FREE, compat_drm_sg_free),
 #endif
drivers/gpu/drm/drm_ioctl.c +1 -1
index ab36c689f19f..5a075f2ed045 100644
@@ -560,7 +560,7 @@ static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
 		.name = #ioctl			\
 	}
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 #define DRM_LEGACY_IOCTL_DEF(ioctl, _func, _flags)  DRM_IOCTL_DEF(ioctl, _func, _flags)
 #else
 #define DRM_LEGACY_IOCTL_DEF(ioctl, _func, _flags) DRM_IOCTL_DEF(ioctl, drm_invalid_op, _flags)
drivers/gpu/drm/drm_legacy.h +16 -16
index 70c9dba114a6..bae45f1d0e70 100644
@@ -48,7 +48,7 @@ struct drm_open_hash;
 #define drm_hash_entry(_ptr, _type, _member) container_of(_ptr, _type, _member)
 
 /* drm_hashtab.c */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int drm_ht_create(struct drm_open_hash *ht, unsigned int order);
 int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
 int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
@@ -84,7 +84,7 @@ void drm_ht_remove(struct drm_open_hash *ht);
 #define DRM_KERNEL_CONTEXT		0
 #define DRM_RESERVED_CONTEXTS		1
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_ctxbitmap_init(struct drm_device *dev);
 void drm_legacy_ctxbitmap_cleanup(struct drm_device *dev);
 void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm_file *file);
@@ -96,7 +96,7 @@ static inline void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm
 
 void drm_legacy_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int drm_legacy_resctx(struct drm_device *d, void *v, struct drm_file *f);
 int drm_legacy_addctx(struct drm_device *d, void *v, struct drm_file *f);
 int drm_legacy_getctx(struct drm_device *d, void *v, struct drm_file *f);
@@ -114,7 +114,7 @@ int drm_legacy_getsareactx(struct drm_device *d, void *v, struct drm_file *f);
 
 #define DRM_MAP_HASH_OFFSET 0x10000000
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 static inline int drm_legacy_create_map_hash(struct drm_device *dev)
 {
 	return drm_ht_create(&dev->map_hash, 12);
@@ -134,7 +134,7 @@ static inline void drm_legacy_remove_map_hash(struct drm_device *dev) {}
 #endif
 
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,
 			    struct drm_file *file_priv);
 int drm_legacy_addmap_ioctl(struct drm_device *d, void *v, struct drm_file *f);
@@ -155,7 +155,7 @@ int __drm_legacy_mapbufs(struct drm_device *, void *, int *,
 			  int (*)(void *, int, unsigned long, struct drm_buf *),
 			  struct drm_file *);
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_master_rmmaps(struct drm_device *dev,
 			      struct drm_master *master);
 void drm_legacy_rmmaps(struct drm_device *dev);
@@ -165,7 +165,7 @@ static inline void drm_legacy_master_rmmaps(struct drm_device *dev,
 static inline void drm_legacy_rmmaps(struct drm_device *dev) {}
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_vma_flush(struct drm_device *d);
 #else
 static inline void drm_legacy_vma_flush(struct drm_device *d)
@@ -187,7 +187,7 @@ struct drm_agp_mem {
 };
 
 /* drm_agpsupport.c */
-#if IS_ENABLED(CONFIG_DRM_LEGACY) && IS_ENABLED(CONFIG_AGP)
+#if IS_ENABLED(CONFIG_DRM_DRI1) && IS_ENABLED(CONFIG_AGP)
 void drm_legacy_agp_clear(struct drm_device *dev);
 
 int drm_legacy_agp_acquire_ioctl(struct drm_device *dev, void *data,
@@ -211,7 +211,7 @@ static inline void drm_legacy_agp_clear(struct drm_device *dev) {}
 #endif
 
 /* drm_lock.c */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int drm_legacy_lock(struct drm_device *d, void *v, struct drm_file *f);
 int drm_legacy_unlock(struct drm_device *d, void *v, struct drm_file *f);
 void drm_legacy_lock_release(struct drm_device *dev, struct file *filp);
@@ -220,7 +220,7 @@ static inline void drm_legacy_lock_release(struct drm_device *dev, struct file *
 #endif
 
 /* DMA support */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 int drm_legacy_dma_setup(struct drm_device *dev);
 void drm_legacy_dma_takedown(struct drm_device *dev);
 #else
@@ -232,7 +232,7 @@ static inline int drm_legacy_dma_setup(struct drm_device *dev)
 
 void drm_legacy_free_buffer(struct drm_device *dev,
 			    struct drm_buf * buf);
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_reclaim_buffers(struct drm_device *dev,
 				struct drm_file *filp);
 #else
@@ -241,7 +241,7 @@ static inline void drm_legacy_reclaim_buffers(struct drm_device *dev,
 #endif
 
 /* Scatter Gather Support */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_sg_cleanup(struct drm_device *dev);
 int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
 			struct drm_file *file_priv);
@@ -249,7 +249,7 @@ int drm_legacy_sg_free(struct drm_device *dev, void *data,
 		       struct drm_file *file_priv);
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_init_members(struct drm_device *dev);
 void drm_legacy_destroy_members(struct drm_device *dev);
 void drm_legacy_dev_reinit(struct drm_device *dev);
@@ -261,20 +261,20 @@ static inline void drm_legacy_dev_reinit(struct drm_device *dev) {}
 static inline int drm_legacy_setup(struct drm_device * dev) { return 0; }
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_lock_master_cleanup(struct drm_device *dev, struct drm_master *master);
 #else
 static inline void drm_legacy_lock_master_cleanup(struct drm_device *dev, struct drm_master *master) {}
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_master_legacy_init(struct drm_master *master);
 #else
 static inline void drm_master_legacy_init(struct drm_master *master) {}
 #endif
 
 /* drm_pci.c */
-#if IS_ENABLED(CONFIG_DRM_LEGACY) && IS_ENABLED(CONFIG_PCI)
+#if IS_ENABLED(CONFIG_DRM_DRI1) && IS_ENABLED(CONFIG_PCI)
 int drm_legacy_irq_by_busid(struct drm_device *dev, void *data, struct drm_file *file_priv);
 void drm_legacy_pci_agp_destroy(struct drm_device *dev);
 #else
drivers/gpu/drm/drm_pci.c +2 -2
index eb0656db08a2..f92c2a484ee5 100644
@@ -36,7 +36,7 @@
 #include "drm_internal.h"
 #include "drm_legacy.h"
 
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 /* List of devices hanging off drivers with stealth attach. */
 static LIST_HEAD(legacy_dev_list);
 static DEFINE_MUTEX(legacy_dev_list_lock);
@@ -72,7 +72,7 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
 	return 0;
 }
 
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 
 static int drm_legacy_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p)
 {
drivers/gpu/drm/drm_vblank.c +4 -4
index a03b03edc6d4..c33786d30afb 100644
@@ -210,7 +210,7 @@ static u32 __get_vblank_counter(struct drm_device *dev, unsigned int pipe)
 		if (crtc->funcs->get_vblank_counter)
 			return crtc->funcs->get_vblank_counter(crtc);
 	}
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 	else if (dev->driver->get_vblank_counter) {
 		return dev->driver->get_vblank_counter(dev, pipe);
 	}
@@ -433,7 +433,7 @@ static void __disable_vblank(struct drm_device *dev, unsigned int pipe)
 		if (crtc->funcs->disable_vblank)
 			crtc->funcs->disable_vblank(crtc);
 	}
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 	else {
 		dev->driver->disable_vblank(dev, pipe);
 	}
@@ -1110,7 +1110,7 @@ static int __enable_vblank(struct drm_device *dev, unsigned int pipe)
 		if (crtc->funcs->enable_vblank)
 			return crtc->funcs->enable_vblank(crtc);
 	}
-#ifdef CONFIG_DRM_LEGACY
+#ifdef CONFIG_DRM_DRI1
 	else if (dev->driver->enable_vblank) {
 		return dev->driver->enable_vblank(dev, pipe);
 	}
@@ -1739,7 +1739,7 @@ static void drm_wait_vblank_reply(struct drm_device *dev, unsigned int pipe,
 
 static bool drm_wait_vblank_supported(struct drm_device *dev)
 {
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	if (unlikely(drm_core_check_feature(dev, DRIVER_DRI1)))
 		return dev->irq_enabled;
 #endif
drivers/gpu/drm/drm_vm.c +1 -1
index f024dc93939e..1cb5ee131e7c 100644
@@ -651,7 +651,7 @@ int drm_legacy_mmap(struct file *filp, struct vm_area_struct *vma)
 }
 EXPORT_SYMBOL(drm_legacy_mmap);
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 void drm_legacy_vma_flush(struct drm_device *dev)
 {
 	struct drm_vma_entry *vma, *vma_temp;
include/drm/drm_auth.h +1 -1
index ba248ca8866f..e126df0da509 100644
@@ -146,7 +146,7 @@ struct drm_master {
 	 */
 	struct idr lessee_idr;
 	/* private: */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	struct drm_lock_data lock;
 #endif
 };
include/drm/drm_device.h +1 -1
index bbf7ff8aa492..5ff04e6599b7 100644
@@ -297,7 +297,7 @@ struct drm_device {
 
 	/* Everything below here is for legacy driver, never use! */
 	/* private: */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	/* List of devices per driver for stealth attach cleanup */
 	struct list_head legacy_dev_list;
 
include/drm/drm_drv.h +2 -2
index e9725295686b..45cf84b53103 100644
@@ -459,8 +459,8 @@ struct drm_driver {
 	 */
 	const struct file_operations *fops;
 
-#ifdef CONFIG_DRM_LEGACY
-	/* Everything below here is for legacy driver, never use! */
+#ifdef CONFIG_DRM_DRI1
+	/* Everything below here is for DRI1 drivers, never use! */
 	/* private: */
 
 	int (*firstopen) (struct drm_device *);
include/drm/drm_file.h +1 -1
index e0a73a1e2df7..5040b0a7d1c4 100644
@@ -363,7 +363,7 @@ struct drm_file {
 	struct drm_prime_file_private prime;
 
 	/* private: */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_DRI1)
 	unsigned long lock_count; /* DRI1 legacy lock count */
 #endif
 };
include/drm/drm_legacy.h +1 -1
index 0fc85418aad8..f84a400b884d 100644
@@ -260,7 +260,7 @@ struct drm_agp_head {
 	unsigned long page_mask;
 };
 
-#if IS_ENABLED(CONFIG_DRM_LEGACY) && IS_ENABLED(CONFIG_AGP)
+#if IS_ENABLED(CONFIG_DRM_DRI1) && IS_ENABLED(CONFIG_AGP)
 struct drm_agp_head *drm_legacy_agp_init(struct drm_device *dev);
 int drm_legacy_agp_acquire(struct drm_device *dev);
 int drm_legacy_agp_release(struct drm_device *dev);
Signature · 1 line
2.34.1
#5 lore raw

Re: [PATCH v1 02/11] drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1

In reply to Sam Ravnborg
Quoted 17 lines · Sam Ravnborg

The rename is done to make it more obvious what is DRI1 drivers and what is other type of legacy.

---
 arch/powerpc/configs/pmac32_defconfig |  2 +-
 arch/powerpc/configs/ppc6xx_defconfig |  2 +-
 drivers/char/agp/Makefile             |  2 +-
 drivers/char/agp/agp.h                |  2 +-
 drivers/gpu/drm/Kconfig               | 10 ++++-----
 drivers/gpu/drm/Makefile              |  6 ++---
 drivers/gpu/drm/drm_file.c            |  4 ++--
 drivers/gpu/drm/drm_internal.h        |  2 +-
 drivers/gpu/drm/drm_ioc32.c           | 12 +++++-----
 drivers/gpu/drm/drm_ioctl.c           |  2 +-
 drivers/gpu/drm/drm_legacy.h          | 32 +++++++++++++--------------
 drivers/gpu/drm/drm_pci.c             |  4 ++--
Quoted 8 lines
 drivers/gpu/drm/drm_vblank.c          |  8 +++----
 drivers/gpu/drm/drm_vm.c              |  2 +-
 include/drm/drm_auth.h                |  2 +-
 include/drm/drm_device.h              |  2 +-
 include/drm/drm_drv.h                 |  4 ++--
 include/drm/drm_file.h                |  2 +-
 include/drm/drm_legacy.h              |  2 +-
 19 files changed, 51 insertions(+), 51 deletions(-)

I missed two hits in Documentation/ will add them in v2.

Sam

#6 lore raw

PATCH 3/11 drm/tdfx: Move the tdfx driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---
 drivers/gpu/drm/Makefile                   | 2 +-
 drivers/gpu/drm/dri1/Makefile              | 5 +++++
 drivers/gpu/drm/{ => dri1}/tdfx/Makefile   | 0
 drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.c | 0
 drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.h | 0
 5 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/dri1/Makefile
 rename drivers/gpu/drm/{ => dri1}/tdfx/Makefile (100%)
 rename drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.c (100%)
 rename drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.h (100%)
drivers/gpu/drm/Makefile +1 -1
index dd7f296ef9b8..08a65237ce4e 100644
@@ -83,7 +83,7 @@ obj-y			+= arm/
 obj-y			+= display/
 obj-$(CONFIG_DRM_TTM)	+= ttm/
 obj-$(CONFIG_DRM_SCHED)	+= scheduler/
-obj-$(CONFIG_DRM_TDFX)	+= tdfx/
+obj-$(CONFIG_DRM_DRI1)	+= dri1/
 obj-$(CONFIG_DRM_R128)	+= r128/
 obj-$(CONFIG_DRM_RADEON)+= radeon/
 obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
drivers/gpu/drm/dri1/Makefile new file +5 -0
new file mode 100644
index 000000000000..a3525b545670
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for DRI1 drm device drivers
+
+obj-$(CONFIG_DRM_TDFX)		+= tdfx/
drivers/gpu/drm/dri1/tdfx/Makefile renamed from drivers/gpu/drm/tdfx/Makefile +0 -0
similarity index 100%
rename from drivers/gpu/drm/tdfx/Makefile
rename to drivers/gpu/drm/dri1/tdfx/Makefile
drivers/gpu/drm/dri1/tdfx/tdfx_drv.c renamed from drivers/gpu/drm/tdfx/tdfx_drv.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tdfx/tdfx_drv.c
rename to drivers/gpu/drm/dri1/tdfx/tdfx_drv.c
drivers/gpu/drm/dri1/tdfx/tdfx_drv.h renamed from drivers/gpu/drm/tdfx/tdfx_drv.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/tdfx/tdfx_drv.h
rename to drivers/gpu/drm/dri1/tdfx/tdfx_drv.h
Signature · 1 line
2.34.1
Reviewed-by on v1 3/11
#7 lore raw

Re: [PATCH v1 03/11] drm/tdfx: Move the tdfx driver to drm/dri1/

Quoted 4 lines · Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

I believe these should be chronological and so the order inverted.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#8 lore raw

PATCH 4/11 drm/r128: Move the r128 driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---
 drivers/gpu/drm/Makefile                      | 1 -
 drivers/gpu/drm/dri1/Makefile                 | 1 +
 drivers/gpu/drm/{ => dri1}/r128/Makefile      | 0
 drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.c | 0
 drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.h | 0
 drivers/gpu/drm/{ => dri1}/r128/r128_cce.c    | 0
 drivers/gpu/drm/{ => dri1}/r128/r128_drv.c    | 0
 drivers/gpu/drm/{ => dri1}/r128/r128_drv.h    | 0
 drivers/gpu/drm/{ => dri1}/r128/r128_ioc32.c  | 0
 drivers/gpu/drm/{ => dri1}/r128/r128_irq.c    | 0
 drivers/gpu/drm/{ => dri1}/r128/r128_state.c  | 0
 11 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/gpu/drm/{ => dri1}/r128/Makefile (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.c (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.h (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/r128_cce.c (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/r128_drv.c (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/r128_drv.h (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/r128_ioc32.c (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/r128_irq.c (100%)
 rename drivers/gpu/drm/{ => dri1}/r128/r128_state.c (100%)
drivers/gpu/drm/Makefile +0 -1
index 08a65237ce4e..0b6b33e64261 100644
@@ -84,7 +84,6 @@ obj-y			+= display/
 obj-$(CONFIG_DRM_TTM)	+= ttm/
 obj-$(CONFIG_DRM_SCHED)	+= scheduler/
 obj-$(CONFIG_DRM_DRI1)	+= dri1/
-obj-$(CONFIG_DRM_R128)	+= r128/
 obj-$(CONFIG_DRM_RADEON)+= radeon/
 obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
 obj-$(CONFIG_DRM_MGA)	+= mga/
drivers/gpu/drm/dri1/Makefile +1 -0
index a3525b545670..f243aac48bb9 100644
@@ -2,4 +2,5 @@
 #
 # Makefile for DRI1 drm device drivers
 
+obj-$(CONFIG_DRM_R128)		+= r128/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
drivers/gpu/drm/dri1/r128/Makefile renamed from drivers/gpu/drm/r128/Makefile +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/Makefile
rename to drivers/gpu/drm/dri1/r128/Makefile
drivers/gpu/drm/dri1/r128/ati_pcigart.c renamed from drivers/gpu/drm/r128/ati_pcigart.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/ati_pcigart.c
rename to drivers/gpu/drm/dri1/r128/ati_pcigart.c
drivers/gpu/drm/dri1/r128/ati_pcigart.h renamed from drivers/gpu/drm/r128/ati_pcigart.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/ati_pcigart.h
rename to drivers/gpu/drm/dri1/r128/ati_pcigart.h
drivers/gpu/drm/dri1/r128/r128_cce.c renamed from drivers/gpu/drm/r128/r128_cce.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/r128_cce.c
rename to drivers/gpu/drm/dri1/r128/r128_cce.c
drivers/gpu/drm/dri1/r128/r128_drv.c renamed from drivers/gpu/drm/r128/r128_drv.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/r128_drv.c
rename to drivers/gpu/drm/dri1/r128/r128_drv.c
drivers/gpu/drm/dri1/r128/r128_drv.h renamed from drivers/gpu/drm/r128/r128_drv.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/r128_drv.h
rename to drivers/gpu/drm/dri1/r128/r128_drv.h
drivers/gpu/drm/dri1/r128/r128_ioc32.c renamed from drivers/gpu/drm/r128/r128_ioc32.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/r128_ioc32.c
rename to drivers/gpu/drm/dri1/r128/r128_ioc32.c
drivers/gpu/drm/dri1/r128/r128_irq.c renamed from drivers/gpu/drm/r128/r128_irq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/r128_irq.c
rename to drivers/gpu/drm/dri1/r128/r128_irq.c
drivers/gpu/drm/dri1/r128/r128_state.c renamed from drivers/gpu/drm/r128/r128_state.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/r128/r128_state.c
rename to drivers/gpu/drm/dri1/r128/r128_state.c
Signature · 1 line
2.34.1
Reviewed-by on v1 4/11
#9 lore raw

Re: [PATCH v1 04/11] drm/r128: Move the r128 driver to drm/dri1/

Quoted 4 lines · Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

Ditto here and other patches.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#10 lore raw

PATCH 5/11 drm/i810: Move the i810 driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---
 drivers/gpu/drm/Makefile                   | 1 -
 drivers/gpu/drm/dri1/Makefile              | 1 +
 drivers/gpu/drm/{ => dri1}/i810/Makefile   | 0
 drivers/gpu/drm/{ => dri1}/i810/i810_dma.c | 0
 drivers/gpu/drm/{ => dri1}/i810/i810_drv.c | 0
 drivers/gpu/drm/{ => dri1}/i810/i810_drv.h | 0
 6 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/gpu/drm/{ => dri1}/i810/Makefile (100%)
 rename drivers/gpu/drm/{ => dri1}/i810/i810_dma.c (100%)
 rename drivers/gpu/drm/{ => dri1}/i810/i810_drv.c (100%)
 rename drivers/gpu/drm/{ => dri1}/i810/i810_drv.h (100%)
drivers/gpu/drm/Makefile +0 -1
index 0b6b33e64261..9a664a4a021d 100644
@@ -87,7 +87,6 @@ obj-$(CONFIG_DRM_DRI1)	+= dri1/
 obj-$(CONFIG_DRM_RADEON)+= radeon/
 obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
 obj-$(CONFIG_DRM_MGA)	+= mga/
-obj-$(CONFIG_DRM_I810)	+= i810/
 obj-$(CONFIG_DRM_I915)	+= i915/
 obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
 obj-$(CONFIG_DRM_MGAG200) += mgag200/
drivers/gpu/drm/dri1/Makefile +1 -0
index f243aac48bb9..d16bfdf26888 100644
@@ -2,5 +2,6 @@
 #
 # Makefile for DRI1 drm device drivers
 
+obj-$(CONFIG_DRM_I810)		+= i810/
 obj-$(CONFIG_DRM_R128)		+= r128/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
drivers/gpu/drm/dri1/i810/Makefile renamed from drivers/gpu/drm/i810/Makefile +0 -0
similarity index 100%
rename from drivers/gpu/drm/i810/Makefile
rename to drivers/gpu/drm/dri1/i810/Makefile
drivers/gpu/drm/dri1/i810/i810_dma.c renamed from drivers/gpu/drm/i810/i810_dma.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/i810/i810_dma.c
rename to drivers/gpu/drm/dri1/i810/i810_dma.c
drivers/gpu/drm/dri1/i810/i810_drv.c renamed from drivers/gpu/drm/i810/i810_drv.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/i810/i810_drv.c
rename to drivers/gpu/drm/dri1/i810/i810_drv.c
drivers/gpu/drm/dri1/i810/i810_drv.h renamed from drivers/gpu/drm/i810/i810_drv.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/i810/i810_drv.h
rename to drivers/gpu/drm/dri1/i810/i810_drv.h
Signature · 1 line
2.34.1
#12 lore raw

PATCH 6/11 drm/mga: Move the mga driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---
 drivers/gpu/drm/Makefile                   | 1 -
 drivers/gpu/drm/dri1/Makefile              | 1 +
 drivers/gpu/drm/{ => dri1}/mga/Makefile    | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_dma.c   | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_drv.c   | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_drv.h   | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_ioc32.c | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_irq.c   | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_state.c | 0
 drivers/gpu/drm/{ => dri1}/mga/mga_warp.c  | 0
 10 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/gpu/drm/{ => dri1}/mga/Makefile (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_dma.c (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_drv.c (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_drv.h (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_ioc32.c (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_irq.c (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_state.c (100%)
 rename drivers/gpu/drm/{ => dri1}/mga/mga_warp.c (100%)
drivers/gpu/drm/Makefile +0 -1
index 9a664a4a021d..363cecfff919 100644
@@ -86,7 +86,6 @@ obj-$(CONFIG_DRM_SCHED)	+= scheduler/
 obj-$(CONFIG_DRM_DRI1)	+= dri1/
 obj-$(CONFIG_DRM_RADEON)+= radeon/
 obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
-obj-$(CONFIG_DRM_MGA)	+= mga/
 obj-$(CONFIG_DRM_I915)	+= i915/
 obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
 obj-$(CONFIG_DRM_MGAG200) += mgag200/
drivers/gpu/drm/dri1/Makefile +1 -0
index d16bfdf26888..c254e443aa3a 100644
@@ -3,5 +3,6 @@
 # Makefile for DRI1 drm device drivers
 
 obj-$(CONFIG_DRM_I810)		+= i810/
+obj-$(CONFIG_DRM_MGA)		+= mga/
 obj-$(CONFIG_DRM_R128)		+= r128/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
drivers/gpu/drm/dri1/mga/Makefile renamed from drivers/gpu/drm/mga/Makefile +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/Makefile
rename to drivers/gpu/drm/dri1/mga/Makefile
drivers/gpu/drm/dri1/mga/mga_dma.c renamed from drivers/gpu/drm/mga/mga_dma.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_dma.c
rename to drivers/gpu/drm/dri1/mga/mga_dma.c
drivers/gpu/drm/dri1/mga/mga_drv.c renamed from drivers/gpu/drm/mga/mga_drv.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_drv.c
rename to drivers/gpu/drm/dri1/mga/mga_drv.c
drivers/gpu/drm/dri1/mga/mga_drv.h renamed from drivers/gpu/drm/mga/mga_drv.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_drv.h
rename to drivers/gpu/drm/dri1/mga/mga_drv.h
drivers/gpu/drm/dri1/mga/mga_ioc32.c renamed from drivers/gpu/drm/mga/mga_ioc32.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_ioc32.c
rename to drivers/gpu/drm/dri1/mga/mga_ioc32.c
drivers/gpu/drm/dri1/mga/mga_irq.c renamed from drivers/gpu/drm/mga/mga_irq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_irq.c
rename to drivers/gpu/drm/dri1/mga/mga_irq.c
drivers/gpu/drm/dri1/mga/mga_state.c renamed from drivers/gpu/drm/mga/mga_state.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_state.c
rename to drivers/gpu/drm/dri1/mga/mga_state.c
drivers/gpu/drm/dri1/mga/mga_warp.c renamed from drivers/gpu/drm/mga/mga_warp.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/mga/mga_warp.c
rename to drivers/gpu/drm/dri1/mga/mga_warp.c
Signature · 1 line
2.34.1
Reviewed-by on v1 6/11
#14 lore raw

Re: [PATCH v1 06/11] drm/mga: Move the mga driver to drm/dri1/

In reply to Sam Ravnborg
Quoted 5 lines · Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#15 lore raw

PATCH 7/11 drm/sis: Move the sis driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---
 drivers/gpu/drm/Makefile                 | 1 -
 drivers/gpu/drm/dri1/Makefile            | 1 +
 drivers/gpu/drm/{ => dri1}/sis/Makefile  | 0
 drivers/gpu/drm/{ => dri1}/sis/sis_drv.c | 0
 drivers/gpu/drm/{ => dri1}/sis/sis_drv.h | 0
 drivers/gpu/drm/{ => dri1}/sis/sis_mm.c  | 0
 6 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/gpu/drm/{ => dri1}/sis/Makefile (100%)
 rename drivers/gpu/drm/{ => dri1}/sis/sis_drv.c (100%)
 rename drivers/gpu/drm/{ => dri1}/sis/sis_drv.h (100%)
 rename drivers/gpu/drm/{ => dri1}/sis/sis_mm.c (100%)
drivers/gpu/drm/Makefile +0 -1
index 363cecfff919..7de784da6345 100644
@@ -91,7 +91,6 @@ obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
 obj-$(CONFIG_DRM_MGAG200) += mgag200/
 obj-$(CONFIG_DRM_V3D)  += v3d/
 obj-$(CONFIG_DRM_VC4)  += vc4/
-obj-$(CONFIG_DRM_SIS)   += sis/
 obj-$(CONFIG_DRM_SAVAGE)+= savage/
 obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
 obj-$(CONFIG_DRM_VIA)	+=via/
drivers/gpu/drm/dri1/Makefile +1 -0
index c254e443aa3a..23e33398fdf5 100644
@@ -5,4 +5,5 @@
 obj-$(CONFIG_DRM_I810)		+= i810/
 obj-$(CONFIG_DRM_MGA)		+= mga/
 obj-$(CONFIG_DRM_R128)		+= r128/
+obj-$(CONFIG_DRM_SIS)		+= sis/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
drivers/gpu/drm/dri1/sis/Makefile renamed from drivers/gpu/drm/sis/Makefile +0 -0
similarity index 100%
rename from drivers/gpu/drm/sis/Makefile
rename to drivers/gpu/drm/dri1/sis/Makefile
drivers/gpu/drm/dri1/sis/sis_drv.c renamed from drivers/gpu/drm/sis/sis_drv.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/sis/sis_drv.c
rename to drivers/gpu/drm/dri1/sis/sis_drv.c
drivers/gpu/drm/dri1/sis/sis_drv.h renamed from drivers/gpu/drm/sis/sis_drv.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/sis/sis_drv.h
rename to drivers/gpu/drm/dri1/sis/sis_drv.h
drivers/gpu/drm/dri1/sis/sis_mm.c renamed from drivers/gpu/drm/sis/sis_mm.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/sis/sis_mm.c
rename to drivers/gpu/drm/dri1/sis/sis_mm.c
Signature · 1 line
2.34.1
#17 lore raw

PATCH 8/11 drm/via: Move the via driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers. Used the opportunity to rename the file to via.c to match the name of the driver.

---
 drivers/gpu/drm/Makefile                           | 1 -
 drivers/gpu/drm/dri1/Makefile                      | 1 +
 drivers/gpu/drm/{ => dri1}/via/Makefile            | 4 +---
 drivers/gpu/drm/{via/via_dri1.c => dri1/via/via.c} | 2 +-
 4 files changed, 3 insertions(+), 5 deletions(-)
 rename drivers/gpu/drm/{ => dri1}/via/Makefile (77%)
 rename drivers/gpu/drm/{via/via_dri1.c => dri1/via/via.c} (99%)
drivers/gpu/drm/Makefile +0 -1
index 7de784da6345..bb3d8ffb9dd6 100644
@@ -93,7 +93,6 @@ obj-$(CONFIG_DRM_V3D)  += v3d/
 obj-$(CONFIG_DRM_VC4)  += vc4/
 obj-$(CONFIG_DRM_SAVAGE)+= savage/
 obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
-obj-$(CONFIG_DRM_VIA)	+=via/
 obj-$(CONFIG_DRM_VGEM)	+= vgem/
 obj-$(CONFIG_DRM_VKMS)	+= vkms/
 obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
drivers/gpu/drm/dri1/Makefile +1 -0
index 23e33398fdf5..73c0aa1c7b94 100644
@@ -7,3 +7,4 @@ obj-$(CONFIG_DRM_MGA)		+= mga/
 obj-$(CONFIG_DRM_R128)		+= r128/
 obj-$(CONFIG_DRM_SIS)		+= sis/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
+obj-$(CONFIG_DRM_VIA)		+= via/
drivers/gpu/drm/dri1/via/Makefile renamed from drivers/gpu/drm/via/Makefile +1 -3
similarity index 77%
rename from drivers/gpu/drm/via/Makefile
rename to drivers/gpu/drm/dri1/via/Makefile
index 8b978dd51a25..b7cd59c2e226 100644
@@ -3,6 +3,4 @@
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
-via-y    := via_dri1.o
-
-obj-$(CONFIG_DRM_VIA)	+=via.o
+obj-$(CONFIG_DRM_VIA)	+= via.o
drivers/gpu/drm/dri1/via/via.c renamed from drivers/gpu/drm/via/via_dri1.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/via/via_dri1.c
rename to drivers/gpu/drm/dri1/via/via.c
index c5708a3f4530..24bc3ebe66e1 100644
@@ -44,7 +44,7 @@
 #include <drm/drm_vblank.h>
 #include <drm/via_drm.h>
 
-#include "via_3d_reg.h"
+#include "../../via/via_3d_reg.h"
 
 #define DRIVER_AUTHOR	"Various"
 
Signature · 1 line
2.34.1
Reviewed-by on v1 8/11
#18 lore raw

Re: [PATCH v1 08/11] drm/via: Move the via driver to drm/dri1/

Quoted 7 lines · Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers. Used the opportunity to rename the file to via.c to match the name of the driver.

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#19 lore raw

PATCH 9/11 drm/savage: Move the savage driver to drm/dri1/

In reply to Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---
 drivers/gpu/drm/Makefile                         | 1 -
 drivers/gpu/drm/dri1/Makefile                    | 1 +
 drivers/gpu/drm/{ => dri1}/savage/Makefile       | 0
 drivers/gpu/drm/{ => dri1}/savage/savage_bci.c   | 0
 drivers/gpu/drm/{ => dri1}/savage/savage_drv.c   | 0
 drivers/gpu/drm/{ => dri1}/savage/savage_drv.h   | 0
 drivers/gpu/drm/{ => dri1}/savage/savage_state.c | 0
 7 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/gpu/drm/{ => dri1}/savage/Makefile (100%)
 rename drivers/gpu/drm/{ => dri1}/savage/savage_bci.c (100%)
 rename drivers/gpu/drm/{ => dri1}/savage/savage_drv.c (100%)
 rename drivers/gpu/drm/{ => dri1}/savage/savage_drv.h (100%)
 rename drivers/gpu/drm/{ => dri1}/savage/savage_state.c (100%)
drivers/gpu/drm/Makefile +0 -1
index bb3d8ffb9dd6..a3bd337bcab4 100644
@@ -91,7 +91,6 @@ obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
 obj-$(CONFIG_DRM_MGAG200) += mgag200/
 obj-$(CONFIG_DRM_V3D)  += v3d/
 obj-$(CONFIG_DRM_VC4)  += vc4/
-obj-$(CONFIG_DRM_SAVAGE)+= savage/
 obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
 obj-$(CONFIG_DRM_VGEM)	+= vgem/
 obj-$(CONFIG_DRM_VKMS)	+= vkms/
drivers/gpu/drm/dri1/Makefile +1 -0
index 73c0aa1c7b94..f639d5e0ae2e 100644
@@ -5,6 +5,7 @@
 obj-$(CONFIG_DRM_I810)		+= i810/
 obj-$(CONFIG_DRM_MGA)		+= mga/
 obj-$(CONFIG_DRM_R128)		+= r128/
+obj-$(CONFIG_DRM_SAVAGE)	+= savage/
 obj-$(CONFIG_DRM_SIS)		+= sis/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
 obj-$(CONFIG_DRM_VIA)		+= via/
drivers/gpu/drm/dri1/savage/Makefile renamed from drivers/gpu/drm/savage/Makefile +0 -0
similarity index 100%
rename from drivers/gpu/drm/savage/Makefile
rename to drivers/gpu/drm/dri1/savage/Makefile
drivers/gpu/drm/dri1/savage/savage_bci.c renamed from drivers/gpu/drm/savage/savage_bci.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/savage/savage_bci.c
rename to drivers/gpu/drm/dri1/savage/savage_bci.c
drivers/gpu/drm/dri1/savage/savage_drv.c renamed from drivers/gpu/drm/savage/savage_drv.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/savage/savage_drv.c
rename to drivers/gpu/drm/dri1/savage/savage_drv.c
drivers/gpu/drm/dri1/savage/savage_drv.h renamed from drivers/gpu/drm/savage/savage_drv.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/savage/savage_drv.h
rename to drivers/gpu/drm/dri1/savage/savage_drv.h
drivers/gpu/drm/dri1/savage/savage_state.c renamed from drivers/gpu/drm/savage/savage_state.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/savage/savage_state.c
rename to drivers/gpu/drm/dri1/savage/savage_state.c
Signature · 1 line
2.34.1
Reviewed-by on v1 9/11
#20 lore raw

Re: [PATCH v1 09/11] drm/savage: Move the savage driver to drm/dri1/

Quoted 5 lines · Sam Ravnborg

drm/dri1 is the new home for all the legacy DRI1 drivers.

---

I wonder if we should just squash patches 03/11 to 09/11 into a single patch. Although I guess having them in separate patches makes it easier to get the acks from the drivers' maintainers.

[...]

drivers/gpu/drm/dri1/Makefile line 11

Quoted 11 lines

index 73c0aa1c7b94..f639d5e0ae2e 100644

drivers/gpu/drm/dri1/Makefile +1 -0
@@ -5,6 +5,7 @@
 obj-$(CONFIG_DRM_I810)		+= i810/
 obj-$(CONFIG_DRM_MGA)		+= mga/
 obj-$(CONFIG_DRM_R128)		+= r128/
+obj-$(CONFIG_DRM_SAVAGE)	+= savage/
 obj-$(CONFIG_DRM_SIS)		+= sis/
 obj-$(CONFIG_DRM_TDFX)		+= tdfx/
 obj-$(CONFIG_DRM_VIA)		+= via/

Maybe we should call these CONFIG_DRM_DRI1_FOO to make more clear in kernel configs whether DRM or DRI1 drivers are being enabled?

After all, the menuconfig now is called DRM_DRI1 and the drivers enabled when CONFIG_DRM_DRI1 is set.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#21 lore raw

PATCH 10/11 drm/dri1: Move Kconfig logic to drm/dri1

In reply to Sam Ravnborg

Move the DRI1 section from drm/Kconfig to a new Kconfig file that lives in the dri1/ directory.
This isolates more of the DRI1 functionality.

---
 drivers/gpu/drm/Kconfig      | 77 +----------------------------------
 drivers/gpu/drm/dri1/Kconfig | 79 ++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+), 76 deletions(-)
 create mode 100644 drivers/gpu/drm/dri1/Kconfig
drivers/gpu/drm/Kconfig +1 -76
index 024081480fcf..fd2684c7481f 100644
@@ -403,82 +403,7 @@ config DRM_HYPERV
 	 If M is selected the module will be called hyperv_drm.
 
 # Keep legacy DRI1 drivers last
-
-menuconfig DRM_DRI1
-	bool "Enable legacy DRI1 drivers (DANGEROUS)"
-	depends on DRM && MMU
-	help
-	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
-	  APIs to user-space, which can be used to circumvent access
-	  restrictions and other security measures. For backwards compatibility
-	  those drivers are still available, but their use is highly
-	  inadvisable and might harm your system.
-
-	  You are recommended to use the safe modeset-only drivers instead, and
-	  perform 3D emulation in user-space.
-
-	  Unless you have strong reasons to go rogue, say "N".
-
-if DRM_DRI1
-
-config DRM_TDFX
-	tristate "3dfx Banshee/Voodoo3+"
-	depends on DRM && PCI
-	help
-	  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
-	  graphics card.  If M is selected, the module will be called tdfx.
-
-config DRM_R128
-	tristate "ATI Rage 128"
-	depends on DRM && PCI
-	select FW_LOADER
-	help
-	  Choose this option if you have an ATI Rage 128 graphics card.  If M
-	  is selected, the module will be called r128.  AGP support for
-	  this card is strongly suggested (unless you have a PCI version).
-
-config DRM_I810
-	tristate "Intel I810"
-	# !PREEMPTION because of missing ioctl locking
-	depends on DRM && AGP && AGP_INTEL && (!PREEMPTION || BROKEN)
-	help
-	  Choose this option if you have an Intel I810 graphics card.  If M is
-	  selected, the module will be called i810.  AGP support is required
-	  for this driver to work.
-
-config DRM_MGA
-	tristate "Matrox g200/g400"
-	depends on DRM && PCI
-	select FW_LOADER
-	help
-	  Choose this option if you have a Matrox G200, G400 or G450 graphics
-	  card.  If M is selected, the module will be called mga.  AGP
-	  support is required for this driver to work.
-
-config DRM_SIS
-	tristate "SiS video cards"
-	depends on DRM && AGP
-	depends on FB_SIS || FB_SIS=n
-	help
-	  Choose this option if you have a SiS 630 or compatible video
-	  chipset. If M is selected the module will be called sis. AGP
-	  support is required for this driver to work.
-
-config DRM_VIA
-	tristate "Via unichrome video cards"
-	depends on DRM && PCI
-	help
-	  Choose this option if you have a Via unichrome or compatible video
-	  chipset. If M is selected the module will be called via.
-
-config DRM_SAVAGE
-	tristate "Savage video cards"
-	depends on DRM && PCI
-	help
-	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
-	  chipset. If M is selected the module will be called savage.
-
-endif # DRM_DRI1
+source "drivers/gpu/drm/dri1/Kconfig"
 
 config DRM_EXPORT_FOR_TESTS
 	bool
drivers/gpu/drm/dri1/Kconfig new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v1 10/11
#22 lore raw

Re: [PATCH v1 10/11] drm/dri1: Move Kconfig logic to drm/dri1

Quoted 6 lines · Sam Ravnborg

Move the DRI1 section from drm/Kconfig to a new Kconfig file that lives in the dri1/ directory.
This isolates more of the DRI1 functionality.

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#23 lore raw

PATCH 11/11 drm: Move dri1 core files to drm/dri1

In reply to Sam Ravnborg

To have more of the dri1 specific support in one place move the dri1 core files to the dri1 folder.
The files continue to be part of the drm module, we just refer to the files with a folder name.

---
 drivers/gpu/drm/Makefile                     | 10 +++++++---
 drivers/gpu/drm/{ => dri1}/drm_agpsupport.c  |  0
 drivers/gpu/drm/{ => dri1}/drm_bufs.c        |  0
 drivers/gpu/drm/{ => dri1}/drm_context.c     |  0
 drivers/gpu/drm/{ => dri1}/drm_dma.c         |  0
 drivers/gpu/drm/{ => dri1}/drm_hashtab.c     |  0
 drivers/gpu/drm/{ => dri1}/drm_irq.c         |  0
 drivers/gpu/drm/{ => dri1}/drm_legacy_misc.c |  0
 drivers/gpu/drm/{ => dri1}/drm_lock.c        |  0
 drivers/gpu/drm/{ => dri1}/drm_memory.c      |  0
 drivers/gpu/drm/{ => dri1}/drm_scatter.c     |  0
 drivers/gpu/drm/{ => dri1}/drm_vm.c          |  0
 12 files changed, 7 insertions(+), 3 deletions(-)
 rename drivers/gpu/drm/{ => dri1}/drm_agpsupport.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_bufs.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_context.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_dma.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_hashtab.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_irq.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_legacy_misc.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_lock.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_memory.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_scatter.c (100%)
 rename drivers/gpu/drm/{ => dri1}/drm_vm.c (100%)
drivers/gpu/drm/Makefile +7 -3
index a3bd337bcab4..02ae13a71281 100644
@@ -18,9 +18,13 @@ drm-y       :=	drm_aperture.o drm_auth.o drm_cache.o \
 		drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \
 		drm_client_modeset.o drm_atomic_uapi.o \
 		drm_managed.o drm_vblank_work.o
-drm-$(CONFIG_DRM_DRI1) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \
-			  drm_hashtab.o drm_irq.o drm_legacy_misc.o drm_lock.o \
-			  drm_memory.o drm_scatter.o drm_vm.o
+
+drm-$(CONFIG_DRM_DRI1) += dri1/drm_agpsupport.o dri1/drm_bufs.o \
+			  dri1/drm_context.o dri1/drm_dma.o \
+			  dri1/drm_hashtab.o dri1/drm_irq.o \
+			  dri1/drm_legacy_misc.o dri1/drm_lock.o \
+			  dri1/drm_memory.o dri1/drm_scatter.o \
+			  dri1/drm_vm.o
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 drm-$(CONFIG_DRM_PANEL) += drm_panel.o
drivers/gpu/drm/dri1/drm_agpsupport.c renamed from drivers/gpu/drm/drm_agpsupport.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_agpsupport.c
rename to drivers/gpu/drm/dri1/drm_agpsupport.c
drivers/gpu/drm/dri1/drm_bufs.c renamed from drivers/gpu/drm/drm_bufs.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_bufs.c
rename to drivers/gpu/drm/dri1/drm_bufs.c
drivers/gpu/drm/dri1/drm_context.c renamed from drivers/gpu/drm/drm_context.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_context.c
rename to drivers/gpu/drm/dri1/drm_context.c
drivers/gpu/drm/dri1/drm_dma.c renamed from drivers/gpu/drm/drm_dma.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_dma.c
rename to drivers/gpu/drm/dri1/drm_dma.c
drivers/gpu/drm/dri1/drm_hashtab.c renamed from drivers/gpu/drm/drm_hashtab.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_hashtab.c
rename to drivers/gpu/drm/dri1/drm_hashtab.c
drivers/gpu/drm/dri1/drm_irq.c renamed from drivers/gpu/drm/drm_irq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_irq.c
rename to drivers/gpu/drm/dri1/drm_irq.c
drivers/gpu/drm/dri1/drm_legacy_misc.c renamed from drivers/gpu/drm/drm_legacy_misc.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_legacy_misc.c
rename to drivers/gpu/drm/dri1/drm_legacy_misc.c
drivers/gpu/drm/dri1/drm_lock.c renamed from drivers/gpu/drm/drm_lock.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_lock.c
rename to drivers/gpu/drm/dri1/drm_lock.c
drivers/gpu/drm/dri1/drm_memory.c renamed from drivers/gpu/drm/drm_memory.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_memory.c
rename to drivers/gpu/drm/dri1/drm_memory.c
drivers/gpu/drm/dri1/drm_scatter.c renamed from drivers/gpu/drm/drm_scatter.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_scatter.c
rename to drivers/gpu/drm/dri1/drm_scatter.c
drivers/gpu/drm/dri1/drm_vm.c renamed from drivers/gpu/drm/drm_vm.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/drm_vm.c
rename to drivers/gpu/drm/dri1/drm_vm.c
Signature · 1 line
2.34.1
Reviewed-by on v1 11/11
#24 lore raw

Re: [PATCH v1 11/11] drm: Move dri1 core files to drm/dri1

Quoted 7 lines · Sam Ravnborg

To have more of the dri1 specific support in one place move the dri1 core files to the dri1 folder.
The files continue to be part of the drm module, we just refer to the files with a folder name.

---

This patch shows how having them into a separate sub-directory pays it forward since you won't even see any of these drm_ core files if not interested about DRI1 drivers.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#25 lore raw
In reply to Sam Ravnborg

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 14 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

Quoted 8 lines

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Feedback welcome!

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations? Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

Best regards
Thomsa

Quoted 86 lines

Sam

Sam Ravnborg (11):
drm: rename DRIVER_LEGACY to DRIVER_DRI1
drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1 drm/tdfx: Move the tdfx driver to drm/dri1/ drm/r128: Move the r128 driver to drm/dri1/ drm/i810: Move the i810 driver to drm/dri1/ drm/mga: Move the mga driver to drm/dri1/ drm/sis: Move the sis driver to drm/dri1/ drm/via: Move the via driver to drm/dri1/ drm/savage: Move the savage driver to drm/dri1/ drm/dri1: Move Kconfig logic to drm/dri1
drm: Move dri1 core files to drm/dri1

  arch/powerpc/configs/pmac32_defconfig              |  2 +-
  arch/powerpc/configs/ppc6xx_defconfig              |  2 +-
  drivers/char/agp/Makefile                          |  2 +-
  drivers/char/agp/agp.h                             |  2 +-
  drivers/gpu/drm/Kconfig                            | 79 +---------------------
  drivers/gpu/drm/Makefile                           | 18 +++--
  drivers/gpu/drm/dri1/Kconfig                       | 79 ++++++++++++++++++++++
  drivers/gpu/drm/dri1/Makefile                      | 11 +++
  drivers/gpu/drm/{ => dri1}/drm_agpsupport.c        |  4 +-
  drivers/gpu/drm/{ => dri1}/drm_bufs.c              | 22 +++---
  drivers/gpu/drm/{ => dri1}/drm_context.c           | 24 +++----
  drivers/gpu/drm/{ => dri1}/drm_dma.c               |  4 +-
  drivers/gpu/drm/{ => dri1}/drm_hashtab.c           |  0
  drivers/gpu/drm/{ => dri1}/drm_irq.c               |  6 +-
  drivers/gpu/drm/{ => dri1}/drm_legacy_misc.c       |  2 +-
  drivers/gpu/drm/{ => dri1}/drm_lock.c              |  6 +-
  drivers/gpu/drm/{ => dri1}/drm_memory.c            |  0
  drivers/gpu/drm/{ => dri1}/drm_scatter.c           |  6 +-
  drivers/gpu/drm/{ => dri1}/drm_vm.c                |  2 +-
  drivers/gpu/drm/{ => dri1}/i810/Makefile           |  0
  drivers/gpu/drm/{ => dri1}/i810/i810_dma.c         |  0
  drivers/gpu/drm/{ => dri1}/i810/i810_drv.c         |  2 +-
  drivers/gpu/drm/{ => dri1}/i810/i810_drv.h         |  0
  drivers/gpu/drm/{ => dri1}/mga/Makefile            |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_dma.c           |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_drv.c           |  2 +-
  drivers/gpu/drm/{ => dri1}/mga/mga_drv.h           |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_ioc32.c         |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_irq.c           |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_state.c         |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_warp.c          |  0
  drivers/gpu/drm/{ => dri1}/r128/Makefile           |  0
  drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.c      |  0
  drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.h      |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_cce.c         |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_drv.c         |  2 +-
  drivers/gpu/drm/{ => dri1}/r128/r128_drv.h         |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_ioc32.c       |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_irq.c         |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_state.c       |  0
  drivers/gpu/drm/{ => dri1}/savage/Makefile         |  0
  drivers/gpu/drm/{ => dri1}/savage/savage_bci.c     |  0
  drivers/gpu/drm/{ => dri1}/savage/savage_drv.c     |  2 +-
  drivers/gpu/drm/{ => dri1}/savage/savage_drv.h     |  0
  drivers/gpu/drm/{ => dri1}/savage/savage_state.c   |  0
  drivers/gpu/drm/{ => dri1}/sis/Makefile            |  0
  drivers/gpu/drm/{ => dri1}/sis/sis_drv.c           |  2 +-
  drivers/gpu/drm/{ => dri1}/sis/sis_drv.h           |  0
  drivers/gpu/drm/{ => dri1}/sis/sis_mm.c            |  0
  drivers/gpu/drm/{ => dri1}/tdfx/Makefile           |  0
  drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.c         |  2 +-
  drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.h         |  0
  drivers/gpu/drm/{ => dri1}/via/Makefile            |  4 +-
  drivers/gpu/drm/{via/via_dri1.c => dri1/via/via.c} |  4 +-
  drivers/gpu/drm/drm_drv.c                          |  2 +-
  drivers/gpu/drm/drm_file.c                         | 12 ++--
  drivers/gpu/drm/drm_internal.h                     |  2 +-
  drivers/gpu/drm/drm_ioc32.c                        | 12 ++--
  drivers/gpu/drm/drm_ioctl.c                        |  4 +-
  drivers/gpu/drm/drm_legacy.h                       | 32 ++++-----
  drivers/gpu/drm/drm_pci.c                          | 12 ++--
  drivers/gpu/drm/drm_vblank.c                       | 12 ++--
  include/drm/drm_auth.h                             |  2 +-
  include/drm/drm_device.h                           |  4 +-
  include/drm/drm_drv.h                              | 10 +--
  include/drm/drm_file.h                             |  2 +-
  include/drm/drm_legacy.h                           |  2 +-
  67 files changed, 205 insertions(+), 194 deletions(-)
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: Ivo Totev
#26 lore raw

Hi Thomas,

Quoted 24 lines · Thomas Zimmermann

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 21 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Quoted 8 lines
Quoted 1 line

Feedback welcome!

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations? Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

Until there are consensus, if ever, I will drop the patches moving the drivers. There is a few DRIVER_LEGACY in Documentation/ that I missed, so will send a v2 with these.

Quoted 5 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

If we do not move the core code, then this is a good way to tell this is dri1 specific. I may try to give it a spin - but just as a single file I think.

Sam

#27 lore raw

Hi Sam

Am 18.07.22 um 09:56 schrieb Sam Ravnborg:

Quoted 39 lines

Hi Thomas,

Quoted 24 lines · Thomas Zimmermann

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 21 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Quoted 8 lines
Quoted 1 line

Feedback welcome!

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations? Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

Until there are consensus, if ever, I will drop the patches moving the drivers. There is a few DRIVER_LEGACY in Documentation/ that I missed, so will send a v2 with these.

Quoted 7 lines
Quoted 5 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

If we do not move the core code, then this is a good way to tell this is dri1 specific. I may try to give it a spin - but just as a single file I think.

Thanks a lot.

Best regards
Thomas

Quoted 2 lines

Sam

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: Ivo Totev
#28 lore raw
In reply to Thomas Zimmermann

Hello Thomas,

Quoted 21 lines · Thomas Zimmermann

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 18 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

Quoted 8 lines
Quoted 4 lines

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Feedback welcome!

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And

That could be avoided by moving drivers/gpu/drm/via/via_3d_reg.h and other header files to include/drm/via_3d_reg.h for example. Other drivers (i.e:
i915) do the same for headers that are shared across different subsystems.

Quoted 2 lines

what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations?

I believe for these we could also move them to include/drm/ if needed.

Quoted 3 lines

Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

I disagree with the zero upside. It may be that the trade offs are not worth it but there are upsides of having all DRI1 drivers and core DRI1 bits in the same place. It makes grep-ing and reading files easier if one doesn't care about legacy DRI1 drivers.

Also, it would ease the removal of this if we ever get rid of them.

Quoted 2 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate

Maybe this could be sorted by splitting the DRI1 core bits in a separate drm_dri1.ko module?

Quoted 4 lines

file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

That would be an improvement but IMO moving them into a different dir as Sam did would be preferable. What would be the upside of having it in drivers/gpu/drm instead? Just to avoid the Makefile rule to have a dri1/ prefix in the included object files ?

Regardless of this discussion, I think that at the very least we should rename the Kconfig symbols to CONFIG_DRM_DRI1_* even if DRI1 drivers are kept in drivers/gpu/drm/ instead of moved to a drivers/gpu/drm/dri1/ dir.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#29 lore raw

Hi Javier

Am 18.07.22 um 11:46 schrieb Javier Martinez Canillas:

Quoted 33 lines

Hello Thomas,

Quoted 21 lines · Thomas Zimmermann

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 18 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

Quoted 8 lines
Quoted 4 lines

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Feedback welcome!

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And

Quoted 8 lines

That could be avoided by moving drivers/gpu/drm/via/via_3d_reg.h and other header files to include/drm/via_3d_reg.h for example. Other drivers (i.e:
i915) do the same for headers that are shared across different subsystems.

Quoted 2 lines

what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations?

I believe for these we could also move them to include/drm/ if needed.

That pollutes these shared directories at the expense of everyone else. If anything, we want to move files out of the shared include paths.

It would make sense to me if we'd have two distinct drivers. But here, the new and the old driver is really just one DRM driver with badly organized source code.

Quoted 9 lines
Quoted 4 lines

Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

I disagree with the zero upside. It may be that the trade offs are not worth it but there are upsides of having all DRI1 drivers and core DRI1 bits in the same place. It makes grep-ing and reading files easier if one doesn't care about legacy DRI1 drivers.

The grep-ability is a minor point. It does come up, but is usually sorted out easily.

If we want to improve grep output, we should consider applying Sam's via_dri1 changes to all DRI1 drivers. So we'd end up with a single mga_dri1.c, tdfx_dri1.c, savage_dri1.c and so on. If the core/helper code is also in a _dri1-named source file, grep runs can filter out those filenames.

Quoted 2 lines

Also, it would ease the removal of this if we ever get rid of them.

We're not going to remove them all at once. And if we'd do, the actual work would be in removing the DRI1 code from the DRM core. There's code in the core that does runtime tests for DRIVER_LEGACY and is partially shared with KMS drivers (mostly in VBLANK handling IIRC). Removing the driver directories is trivial.

Quoted 6 lines
Quoted 3 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate

Maybe this could be sorted by splitting the DRI1 core bits in a separate drm_dri1.ko module?

The dri1 core files cannot be in a separate module as they are linked with other core stuff. It would result in dependency cycles IIRC.

Quoted 10 lines
Quoted 5 lines

file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

That would be an improvement but IMO moving them into a different dir as Sam did would be preferable. What would be the upside of having it in drivers/gpu/drm instead? Just to avoid the Makefile rule to have a dri1/ prefix in the included object files ?

Makefile readability is important and our existing ones could be better, but that's a minor point.

Putting everything into a single file gets the legacy code out of the way, benefits grepping and is faster to build. In the case of a core/helper split, it would further align with the overall design of the DRM sub-system.

Quoted 5 lines

Regardless of this discussion, I think that at the very least we should rename the Kconfig symbols to CONFIG_DRM_DRI1_* even if DRI1 drivers are kept in drivers/gpu/drm/ instead of moved to a drivers/gpu/drm/dri1/ dir.

Agreed.

Best regards
Thomas

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: Ivo Totev
#30 lore raw

On 7/18/22 12:50, Thomas Zimmermann wrote:

[...]

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And

That could be avoided by moving drivers/gpu/drm/via/via_3d_reg.h and other header files to include/drm/via_3d_reg.h for example. Other drivers (i.e:
i915) do the same for headers that are shared across different subsystems.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations?

I believe for these we could also move them to include/drm/ if needed.

That pollutes these shared directories at the expense of everyone else. If anything, we want to move files out of the shared include paths.

Yes, every option has a different set of trade offs.

Quoted 4 lines

It would make sense to me if we'd have two distinct drivers. But here, the new and the old driver is really just one DRM driver with badly organized source code.

I see. I haven't looked at the via drivers in detail.

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines

Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

I disagree with the zero upside. It may be that the trade offs are not worth it but there are upsides of having all DRI1 drivers and core DRI1 bits in the same place. It makes grep-ing and reading files easier if one doesn't care about legacy DRI1 drivers.

Quoted 9 lines

The grep-ability is a minor point. It does come up, but is usually sorted out easily.

If we want to improve grep output, we should consider applying Sam's via_dri1 changes to all DRI1 drivers. So we'd end up with a single mga_dri1.c, tdfx_dri1.c, savage_dri1.c and so on. If the core/helper code is also in a _dri1-named source file, grep runs can filter out those filenames.

Having everything with a _dri1 suffix would be an improvement I agree and if that's the consensus then I'm OK with that approach as well.

[...]

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate

Maybe this could be sorted by splitting the DRI1 core bits in a separate drm_dri1.ko module?

The dri1 core files cannot be in a separate module as they are linked with other core stuff. It would result in dependency cycles IIRC.

Got it.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#31 lore raw

Hi Javier, Thomas,

Quoted 50 lines · Javier Martinez Canillas

On 7/18/22 12:50, Thomas Zimmermann wrote:

[...]

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And

That could be avoided by moving drivers/gpu/drm/via/via_3d_reg.h and other header files to include/drm/via_3d_reg.h for example. Other drivers (i.e:
i915) do the same for headers that are shared across different subsystems.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations?

I believe for these we could also move them to include/drm/ if needed.

That pollutes these shared directories at the expense of everyone else. If anything, we want to move files out of the shared include paths.

Yes, every option has a different set of trade offs.

Quoted 4 lines

It would make sense to me if we'd have two distinct drivers. But here, the new and the old driver is really just one DRM driver with badly organized source code.

I see. I haven't looked at the via drivers in detail.

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines

Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

I disagree with the zero upside. It may be that the trade offs are not worth it but there are upsides of having all DRI1 drivers and core DRI1 bits in the same place. It makes grep-ing and reading files easier if one doesn't care about legacy DRI1 drivers.

Quoted 9 lines

The grep-ability is a minor point. It does come up, but is usually sorted out easily.

If we want to improve grep output, we should consider applying Sam's via_dri1 changes to all DRI1 drivers. So we'd end up with a single mga_dri1.c, tdfx_dri1.c, savage_dri1.c and so on. If the core/helper code is also in a _dri1-named source file, grep runs can filter out those filenames.

Quoted 4 lines

Having everything with a _dri1 suffix would be an improvement I agree and if that's the consensus then I'm OK with that approach as well.

[...]

I will update the series with the following:
- Drop drm/dri1/
- Keep the CONFIG_DRM_* change and keep the DRIVER_DRI1 change
- All config options for DRI1 drivers will get a CONFIG_DRM_DRI1_* prefix
- Convert at least some of the drivers to single file drivers named foo_dri1.
- I may add SPDX for licenses when I am touching the files
- I may try to concatenate all dri1 specific drm core files to drm_dri1. It is easy to do but I will take a look at the result before posting anything.

When I have posted the above let's see what we all agree on. May take a couple of days before I get back to it.

Sam

#32 lore raw

Hi Sam

Am 19.07.22 um 09:55 schrieb Sam Ravnborg:

Quoted 70 lines

Hi Javier, Thomas,

Quoted 50 lines · Javier Martinez Canillas

On 7/18/22 12:50, Thomas Zimmermann wrote:

[...]

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And

That could be avoided by moving drivers/gpu/drm/via/via_3d_reg.h and other header files to include/drm/via_3d_reg.h for example. Other drivers (i.e:
i915) do the same for headers that are shared across different subsystems.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations?

I believe for these we could also move them to include/drm/ if needed.

That pollutes these shared directories at the expense of everyone else. If anything, we want to move files out of the shared include paths.

Yes, every option has a different set of trade offs.

Quoted 4 lines

It would make sense to me if we'd have two distinct drivers. But here, the new and the old driver is really just one DRM driver with badly organized source code.

I see. I haven't looked at the via drivers in detail.

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines

Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

I disagree with the zero upside. It may be that the trade offs are not worth it but there are upsides of having all DRI1 drivers and core DRI1 bits in the same place. It makes grep-ing and reading files easier if one doesn't care about legacy DRI1 drivers.

Quoted 9 lines

The grep-ability is a minor point. It does come up, but is usually sorted out easily.

If we want to improve grep output, we should consider applying Sam's via_dri1 changes to all DRI1 drivers. So we'd end up with a single mga_dri1.c, tdfx_dri1.c, savage_dri1.c and so on. If the core/helper code is also in a _dri1-named source file, grep runs can filter out those filenames.

Quoted 4 lines

Having everything with a _dri1 suffix would be an improvement I agree and if that's the consensus then I'm OK with that approach as well.

[...]

I will update the series with the following:
- Drop drm/dri1/
- Keep the CONFIG_DRM_* change and keep the DRIVER_DRI1 change
- All config options for DRI1 drivers will get a CONFIG_DRM_DRI1_* prefix
- Convert at least some of the drivers to single file drivers named foo_dri1.
- I may add SPDX for licenses when I am touching the files
- I may try to concatenate all dri1 specific drm core files to drm_dri1. It is easy to do but I will take a look at the result before posting anything.

Quoted 2 lines

When I have posted the above let's see what we all agree on. May take a couple of days before I get back to it.

Sounds like a plan to me.

Best regards
Thomas

Quoted 2 lines

Sam

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: Ivo Totev
#33 lore raw
Quoted 14 lines · Thomas Zimmermann
Quoted 14 lines
Quoted 1 line

[...]

I will update the series with the following:
- Drop drm/dri1/
- Keep the CONFIG_DRM_* change and keep the DRIVER_DRI1 change
- All config options for DRI1 drivers will get a CONFIG_DRM_DRI1_* prefix
- Convert at least some of the drivers to single file drivers named foo_dri1.
- I may add SPDX for licenses when I am touching the files
- I may try to concatenate all dri1 specific drm core files to drm_dri1. It is easy to do but I will take a look at the result before posting anything.

Quoted 5 lines
Quoted 2 lines

When I have posted the above let's see what we all agree on. May take a couple of days before I get back to it.

Sounds like a plan to me.

Sounds good to me as well.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat
#34 lore raw
In reply to Thomas Zimmermann
Quoted 27 lines · Thomas Zimmermann

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 14 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

Quoted 8 lines

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Feedback welcome!

Quoted 7 lines

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations? Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

Imo transitional drivers with both legacy dri1 and kms+gem support made some sense 10+ years ago when all this infrastructure was still being built. Now I really don't see much point.

For via imo make it a clean new driver, and copypaste anything from the old one (like register headers) it needs. That will also make review a ton easier I think. There has not been any actual via work, just general refactoring, in that driver for 10+ years, so "bugfix sharing" is really not an argument.

Quoted 5 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

Ugly Makefile for dri1 might be a feature :-) But personally no stake on this bikeshed.
-Daniel

Quoted 98 lines

Best regards
Thomsa

Quoted 76 lines

Sam

Sam Ravnborg (11):
drm: rename DRIVER_LEGACY to DRIVER_DRI1
drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1 drm/tdfx: Move the tdfx driver to drm/dri1/ drm/r128: Move the r128 driver to drm/dri1/ drm/i810: Move the i810 driver to drm/dri1/ drm/mga: Move the mga driver to drm/dri1/ drm/sis: Move the sis driver to drm/dri1/ drm/via: Move the via driver to drm/dri1/ drm/savage: Move the savage driver to drm/dri1/ drm/dri1: Move Kconfig logic to drm/dri1
drm: Move dri1 core files to drm/dri1

  arch/powerpc/configs/pmac32_defconfig              |  2 +-
  arch/powerpc/configs/ppc6xx_defconfig              |  2 +-
  drivers/char/agp/Makefile                          |  2 +-
  drivers/char/agp/agp.h                             |  2 +-
  drivers/gpu/drm/Kconfig                            | 79 +---------------------
  drivers/gpu/drm/Makefile                           | 18 +++--
  drivers/gpu/drm/dri1/Kconfig                       | 79 ++++++++++++++++++++++
  drivers/gpu/drm/dri1/Makefile                      | 11 +++
  drivers/gpu/drm/{ => dri1}/drm_agpsupport.c        |  4 +-
  drivers/gpu/drm/{ => dri1}/drm_bufs.c              | 22 +++---
  drivers/gpu/drm/{ => dri1}/drm_context.c           | 24 +++----
  drivers/gpu/drm/{ => dri1}/drm_dma.c               |  4 +-
  drivers/gpu/drm/{ => dri1}/drm_hashtab.c           |  0
  drivers/gpu/drm/{ => dri1}/drm_irq.c               |  6 +-
  drivers/gpu/drm/{ => dri1}/drm_legacy_misc.c       |  2 +-
  drivers/gpu/drm/{ => dri1}/drm_lock.c              |  6 +-
  drivers/gpu/drm/{ => dri1}/drm_memory.c            |  0
  drivers/gpu/drm/{ => dri1}/drm_scatter.c           |  6 +-
  drivers/gpu/drm/{ => dri1}/drm_vm.c                |  2 +-
  drivers/gpu/drm/{ => dri1}/i810/Makefile           |  0
  drivers/gpu/drm/{ => dri1}/i810/i810_dma.c         |  0
  drivers/gpu/drm/{ => dri1}/i810/i810_drv.c         |  2 +-
  drivers/gpu/drm/{ => dri1}/i810/i810_drv.h         |  0
  drivers/gpu/drm/{ => dri1}/mga/Makefile            |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_dma.c           |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_drv.c           |  2 +-
  drivers/gpu/drm/{ => dri1}/mga/mga_drv.h           |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_ioc32.c         |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_irq.c           |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_state.c         |  0
  drivers/gpu/drm/{ => dri1}/mga/mga_warp.c          |  0
  drivers/gpu/drm/{ => dri1}/r128/Makefile           |  0
  drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.c      |  0
  drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.h      |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_cce.c         |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_drv.c         |  2 +-
  drivers/gpu/drm/{ => dri1}/r128/r128_drv.h         |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_ioc32.c       |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_irq.c         |  0
  drivers/gpu/drm/{ => dri1}/r128/r128_state.c       |  0
  drivers/gpu/drm/{ => dri1}/savage/Makefile         |  0
  drivers/gpu/drm/{ => dri1}/savage/savage_bci.c     |  0
  drivers/gpu/drm/{ => dri1}/savage/savage_drv.c     |  2 +-
  drivers/gpu/drm/{ => dri1}/savage/savage_drv.h     |  0
  drivers/gpu/drm/{ => dri1}/savage/savage_state.c   |  0
  drivers/gpu/drm/{ => dri1}/sis/Makefile            |  0
  drivers/gpu/drm/{ => dri1}/sis/sis_drv.c           |  2 +-
  drivers/gpu/drm/{ => dri1}/sis/sis_drv.h           |  0
  drivers/gpu/drm/{ => dri1}/sis/sis_mm.c            |  0
  drivers/gpu/drm/{ => dri1}/tdfx/Makefile           |  0
  drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.c         |  2 +-
  drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.h         |  0
  drivers/gpu/drm/{ => dri1}/via/Makefile            |  4 +-
  drivers/gpu/drm/{via/via_dri1.c => dri1/via/via.c} |  4 +-
  drivers/gpu/drm/drm_drv.c                          |  2 +-
  drivers/gpu/drm/drm_file.c                         | 12 ++--
  drivers/gpu/drm/drm_internal.h                     |  2 +-
  drivers/gpu/drm/drm_ioc32.c                        | 12 ++--
  drivers/gpu/drm/drm_ioctl.c                        |  4 +-
  drivers/gpu/drm/drm_legacy.h                       | 32 ++++-----
Quoted 10 lines
  drivers/gpu/drm/drm_pci.c                          | 12 ++--
  drivers/gpu/drm/drm_vblank.c                       | 12 ++--
  include/drm/drm_auth.h                             |  2 +-
  include/drm/drm_device.h                           |  4 +-
  include/drm/drm_drv.h                              | 10 +--
  include/drm/drm_file.h                             |  2 +-
  include/drm/drm_legacy.h                           |  2 +-
  67 files changed, 205 insertions(+), 194 deletions(-)

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#35 lore raw

Hi

Am 19.07.22 um 11:52 schrieb Daniel Vetter:

Quoted 40 lines · Thomas Zimmermann
Quoted 27 lines

Hi

Am 16.07.22 um 20:17 schrieb Sam Ravnborg:

Quoted 14 lines

While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder.

The idea is to move the old DRI1 drivers so one do not accidentally consider them modern drivers.

This set of patches implements this idea.

To prepare the move, DRIVER_LEGACY and CONFIG_DRM_LEGACY are both renamed to *_DRI1. This makes it more obvious that we are dealing with DRI1 drivers, as we have a lot of other legacy support.

Quoted 8 lines

The drivers continue to have their own sub-directory so the driver files are not mixed with the core files which are copied in the last commit.

The DRI1 specific part of drm/Kconfig is likewise pulled out and located in the dri1/ folder.

Feedback welcome!

Quoted 7 lines

To be honest, I still don't like this rename. Especially in the case of via, which has a KMS driver coming up. It will now have an include statement that crosses several levels in the directory hierarchy. And what about the other DRI1 drivers? If we ever get KMS drivers for those, do we want to move some header files back into their original locations? Patches 1 and 2 look reasonable to me. The other driver patches have basically zero upside IMHO.

Imo transitional drivers with both legacy dri1 and kms+gem support made some sense 10+ years ago when all this infrastructure was still being built. Now I really don't see much point.

Quoted 5 lines

For via imo make it a clean new driver, and copypaste anything from the old one (like register headers) it needs. That will also make review a ton easier I think. There has not been any actual via work, just general refactoring, in that driver for 10+ years, so "bugfix sharing" is really not an argument.

At some point, I suggested to turn the VIA KMS driver into a new 'unichrome' driver, but everyone wants to keep 'via' instead.

Quoted 9 lines
Quoted 6 lines

In the case of moving the core files into dri1/, the resulting Makefile rule looks really ugly. I'd suggest to move all code into a separate file drm_dri1.c and be done with it. For something more elaborate, there could by drm_dri1.c and drm_dri1_helper.c, where the latter contains all DRI1 code that is only used by the drivers.

Ugly Makefile for dri1 might be a feature :-) But personally no stake on this bikeshed.

It's the core DRM makefile that would look ugly. :/

Best regards
Thomas

Quoted 103 lines

-Daniel

Quoted 98 lines

Best regards
Thomsa

Quoted 76 lines

Sam

Sam Ravnborg (11):
drm: rename DRIVER_LEGACY to DRIVER_DRI1
drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1 drm/tdfx: Move the tdfx driver to drm/dri1/ drm/r128: Move the r128 driver to drm/dri1/ drm/i810: Move the i810 driver to drm/dri1/ drm/mga: Move the mga driver to drm/dri1/ drm/sis: Move the sis driver to drm/dri1/ drm/via: Move the via driver to drm/dri1/ drm/savage: Move the savage driver to drm/dri1/ drm/dri1: Move Kconfig logic to drm/dri1
drm: Move dri1 core files to drm/dri1

   arch/powerpc/configs/pmac32_defconfig              |  2 +-
   arch/powerpc/configs/ppc6xx_defconfig              |  2 +-
   drivers/char/agp/Makefile                          |  2 +-
   drivers/char/agp/agp.h                             |  2 +-
   drivers/gpu/drm/Kconfig                            | 79 +---------------------
   drivers/gpu/drm/Makefile                           | 18 +++--
   drivers/gpu/drm/dri1/Kconfig                       | 79 ++++++++++++++++++++++
   drivers/gpu/drm/dri1/Makefile                      | 11 +++
   drivers/gpu/drm/{ => dri1}/drm_agpsupport.c        |  4 +-
   drivers/gpu/drm/{ => dri1}/drm_bufs.c              | 22 +++---
   drivers/gpu/drm/{ => dri1}/drm_context.c           | 24 +++----
   drivers/gpu/drm/{ => dri1}/drm_dma.c               |  4 +-
   drivers/gpu/drm/{ => dri1}/drm_hashtab.c           |  0
   drivers/gpu/drm/{ => dri1}/drm_irq.c               |  6 +-
   drivers/gpu/drm/{ => dri1}/drm_legacy_misc.c       |  2 +-
   drivers/gpu/drm/{ => dri1}/drm_lock.c              |  6 +-
   drivers/gpu/drm/{ => dri1}/drm_memory.c            |  0
   drivers/gpu/drm/{ => dri1}/drm_scatter.c           |  6 +-
   drivers/gpu/drm/{ => dri1}/drm_vm.c                |  2 +-
   drivers/gpu/drm/{ => dri1}/i810/Makefile           |  0
   drivers/gpu/drm/{ => dri1}/i810/i810_dma.c         |  0
   drivers/gpu/drm/{ => dri1}/i810/i810_drv.c         |  2 +-
   drivers/gpu/drm/{ => dri1}/i810/i810_drv.h         |  0
   drivers/gpu/drm/{ => dri1}/mga/Makefile            |  0
   drivers/gpu/drm/{ => dri1}/mga/mga_dma.c           |  0
   drivers/gpu/drm/{ => dri1}/mga/mga_drv.c           |  2 +-
   drivers/gpu/drm/{ => dri1}/mga/mga_drv.h           |  0
   drivers/gpu/drm/{ => dri1}/mga/mga_ioc32.c         |  0
   drivers/gpu/drm/{ => dri1}/mga/mga_irq.c           |  0
   drivers/gpu/drm/{ => dri1}/mga/mga_state.c         |  0
   drivers/gpu/drm/{ => dri1}/mga/mga_warp.c          |  0
   drivers/gpu/drm/{ => dri1}/r128/Makefile           |  0
   drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.c      |  0
   drivers/gpu/drm/{ => dri1}/r128/ati_pcigart.h      |  0
   drivers/gpu/drm/{ => dri1}/r128/r128_cce.c         |  0
   drivers/gpu/drm/{ => dri1}/r128/r128_drv.c         |  2 +-
   drivers/gpu/drm/{ => dri1}/r128/r128_drv.h         |  0
   drivers/gpu/drm/{ => dri1}/r128/r128_ioc32.c       |  0
   drivers/gpu/drm/{ => dri1}/r128/r128_irq.c         |  0
   drivers/gpu/drm/{ => dri1}/r128/r128_state.c       |  0
   drivers/gpu/drm/{ => dri1}/savage/Makefile         |  0
   drivers/gpu/drm/{ => dri1}/savage/savage_bci.c     |  0
   drivers/gpu/drm/{ => dri1}/savage/savage_drv.c     |  2 +-
   drivers/gpu/drm/{ => dri1}/savage/savage_drv.h     |  0
   drivers/gpu/drm/{ => dri1}/savage/savage_state.c   |  0
   drivers/gpu/drm/{ => dri1}/sis/Makefile            |  0
   drivers/gpu/drm/{ => dri1}/sis/sis_drv.c           |  2 +-
   drivers/gpu/drm/{ => dri1}/sis/sis_drv.h           |  0
   drivers/gpu/drm/{ => dri1}/sis/sis_mm.c            |  0
   drivers/gpu/drm/{ => dri1}/tdfx/Makefile           |  0
   drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.c         |  2 +-
   drivers/gpu/drm/{ => dri1}/tdfx/tdfx_drv.h         |  0
   drivers/gpu/drm/{ => dri1}/via/Makefile            |  4 +-
   drivers/gpu/drm/{via/via_dri1.c => dri1/via/via.c} |  4 +-
   drivers/gpu/drm/drm_drv.c                          |  2 +-
   drivers/gpu/drm/drm_file.c                         | 12 ++--
   drivers/gpu/drm/drm_internal.h                     |  2 +-
   drivers/gpu/drm/drm_ioc32.c                        | 12 ++--
   drivers/gpu/drm/drm_ioctl.c                        |  4 +-
   drivers/gpu/drm/drm_legacy.h                       | 32 ++++-----
Quoted 10 lines
   drivers/gpu/drm/drm_pci.c                          | 12 ++--
   drivers/gpu/drm/drm_vblank.c                       | 12 ++--
   include/drm/drm_auth.h                             |  2 +-
   include/drm/drm_device.h                           |  4 +-
   include/drm/drm_drv.h                              | 10 +--
   include/drm/drm_file.h                             |  2 +-
   include/drm/drm_legacy.h                           |  2 +-
   67 files changed, 205 insertions(+), 194 deletions(-)

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

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: Ivo Totev