drm: Mark up legacy/dri1 drivers with DRM_LEGACY
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Aug 2016 19:11:09 +0000 (21:11 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 8 Aug 2016 08:05:22 +0000 (10:05 +0200)
It's super confusing that new drivers need to be marked with
DRIVER_MODESET when really it means DRIVER_MODERN. Much better to
invert the meaning and rename it to something that's suitably
off-putting.

Since there's over 100 places using DRIVER_MODESET we need to roll out
this change without a flag day.

v2: Update docs.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-1-git-send-email-daniel.vetter@ffwll.ch
Documentation/gpu/drm-internals.rst
drivers/gpu/drm/i810/i810_drv.c
drivers/gpu/drm/mga/mga_drv.c
drivers/gpu/drm/r128/r128_drv.c
drivers/gpu/drm/savage/savage_drv.c
drivers/gpu/drm/sis/sis_drv.c
drivers/gpu/drm/tdfx/tdfx_drv.c
drivers/gpu/drm/via/via_drv.c
include/drm/drmP.h

index 3bb26135971f06a3f9d3794a1d23efbaafec28fe..37284bcc77641a76d9b658fb30c50e2bde861542 100644 (file)
@@ -53,9 +53,12 @@ u32 driver_features;
 DRIVER_USE_AGP
     Driver uses AGP interface, the DRM core will manage AGP resources.
 
-DRIVER_REQUIRE_AGP
-    Driver needs AGP interface to function. AGP initialization failure
-    will become a fatal error.
+DRIVER_LEGACY
+    Denote a legacy driver using shadow attach. Don't use.
+
+DRIVER_KMS_LEGACY_CONTEXT
+    Used only by nouveau for backwards compatibility with existing userspace.
+    Don't use.
 
 DRIVER_PCI_DMA
     Driver is capable of PCI DMA, mapping of PCI DMA buffers to
index 44f4a131c8ddb4c0e68f16ecde7dbad324255edc..0be55dc1ef4bbe748b6d66daff817093effd83d6 100644 (file)
@@ -56,9 +56,7 @@ static const struct file_operations i810_driver_fops = {
 };
 
 static struct drm_driver driver = {
-       .driver_features =
-           DRIVER_USE_AGP |
-           DRIVER_HAVE_DMA,
+       .driver_features = DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_LEGACY,
        .dev_priv_size = sizeof(drm_i810_buf_priv_t),
        .load = i810_driver_load,
        .lastclose = i810_driver_lastclose,
index 5e2f131a6a72943f4f911c7428d507adae735bfa..25b2a1a424e66e4832ba8f3605f661b013bab783 100644 (file)
@@ -58,7 +58,7 @@ static const struct file_operations mga_driver_fops = {
 
 static struct drm_driver driver = {
        .driver_features =
-           DRIVER_USE_AGP | DRIVER_PCI_DMA |
+           DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_LEGACY |
            DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
        .dev_priv_size = sizeof(drm_mga_buf_priv_t),
        .load = mga_driver_load,
index c57b4de63caf5f633edda167a83009f6fb6a8484..a982be57d1efb44b0638f55faa18621dcdc14fce 100644 (file)
@@ -56,7 +56,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_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_LEGACY |
            DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
        .dev_priv_size = sizeof(drm_r128_buf_priv_t),
        .load = r128_driver_load,
index 21aed1febeb4d12f6fd4d48ff1d257497dc04bc5..3b807135a5cd8621fe1d40879749bec94dd3d3e2 100644 (file)
@@ -50,7 +50,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_USE_AGP | DRIVER_HAVE_DMA | DRIVER_PCI_DMA | DRIVER_LEGACY,
        .dev_priv_size = sizeof(drm_savage_buf_priv_t),
        .load = savage_driver_load,
        .firstopen = savage_driver_firstopen,
index 79bce76cb8f71cc49ca99933cc9dc767d4689151..ae9839886c4d09ed78e706e4d1b7d843034bf434 100644 (file)
@@ -102,7 +102,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_features = DRIVER_USE_AGP | DRIVER_LEGACY,
        .load = sis_driver_load,
        .unload = sis_driver_unload,
        .open = sis_driver_open,
index fab5ebcb0fef09dbaafd4eade233151350d26278..f418892b0c7127681a31acee118dbd2cad3405a2 100644 (file)
@@ -56,6 +56,7 @@ static const struct file_operations tdfx_driver_fops = {
 };
 
 static struct drm_driver driver = {
+       .driver_features = DRIVER_LEGACY,
        .set_busid = drm_pci_set_busid,
        .fops = &tdfx_driver_fops,
        .name = DRIVER_NAME,
index ed8aa8ff861a14f1cc42ef636e505fc0ba816085..e5582bab7e3c926999088d848e5a37669cf1399b 100644 (file)
@@ -72,7 +72,7 @@ static const struct file_operations via_driver_fops = {
 
 static struct drm_driver driver = {
        .driver_features =
-           DRIVER_USE_AGP | DRIVER_HAVE_IRQ |
+           DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_LEGACY |
            DRIVER_IRQ_SHARED,
        .load = via_driver_load,
        .unload = via_driver_unload,
index d488a7230b9359ad5734f1b61d0eb972398d7102..856c174bd73078f58edcabf50d999178347dd193 100644 (file)
@@ -146,6 +146,7 @@ void drm_err(const char *format, ...);
 
 /* driver capabilities and requirements mask */
 #define DRIVER_USE_AGP                 0x1
+#define DRIVER_LEGACY                  0x2
 #define DRIVER_PCI_DMA                 0x8
 #define DRIVER_SG                      0x10
 #define DRIVER_HAVE_DMA                        0x20