Commit 3cbf6a5d authored by Daniel Vetter's avatar Daniel Vetter

drm: Mark up legacy/dri1 drivers with DRM_LEGACY

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: default avatarFrank Binns <frank.binns@imgtec.com>
Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-1-git-send-email-daniel.vetter@ffwll.ch
parent aafdcfd3
...@@ -53,9 +53,12 @@ u32 driver_features; ...@@ -53,9 +53,12 @@ u32 driver_features;
DRIVER_USE_AGP DRIVER_USE_AGP
Driver uses AGP interface, the DRM core will manage AGP resources. Driver uses AGP interface, the DRM core will manage AGP resources.
DRIVER_REQUIRE_AGP DRIVER_LEGACY
Driver needs AGP interface to function. AGP initialization failure Denote a legacy driver using shadow attach. Don't use.
will become a fatal error.
DRIVER_KMS_LEGACY_CONTEXT
Used only by nouveau for backwards compatibility with existing userspace.
Don't use.
DRIVER_PCI_DMA DRIVER_PCI_DMA
Driver is capable of PCI DMA, mapping of PCI DMA buffers to Driver is capable of PCI DMA, mapping of PCI DMA buffers to
......
...@@ -56,9 +56,7 @@ static const struct file_operations i810_driver_fops = { ...@@ -56,9 +56,7 @@ static const struct file_operations i810_driver_fops = {
}; };
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = .driver_features = DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_LEGACY,
DRIVER_USE_AGP |
DRIVER_HAVE_DMA,
.dev_priv_size = sizeof(drm_i810_buf_priv_t), .dev_priv_size = sizeof(drm_i810_buf_priv_t),
.load = i810_driver_load, .load = i810_driver_load,
.lastclose = i810_driver_lastclose, .lastclose = i810_driver_lastclose,
......
...@@ -58,7 +58,7 @@ static const struct file_operations mga_driver_fops = { ...@@ -58,7 +58,7 @@ static const struct file_operations mga_driver_fops = {
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = .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, DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
.dev_priv_size = sizeof(drm_mga_buf_priv_t), .dev_priv_size = sizeof(drm_mga_buf_priv_t),
.load = mga_driver_load, .load = mga_driver_load,
......
...@@ -56,7 +56,7 @@ static const struct file_operations r128_driver_fops = { ...@@ -56,7 +56,7 @@ static const struct file_operations r128_driver_fops = {
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = .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, DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
.dev_priv_size = sizeof(drm_r128_buf_priv_t), .dev_priv_size = sizeof(drm_r128_buf_priv_t),
.load = r128_driver_load, .load = r128_driver_load,
......
...@@ -50,7 +50,7 @@ static const struct file_operations savage_driver_fops = { ...@@ -50,7 +50,7 @@ static const struct file_operations savage_driver_fops = {
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = .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), .dev_priv_size = sizeof(drm_savage_buf_priv_t),
.load = savage_driver_load, .load = savage_driver_load,
.firstopen = savage_driver_firstopen, .firstopen = savage_driver_firstopen,
......
...@@ -102,7 +102,7 @@ static void sis_driver_postclose(struct drm_device *dev, struct drm_file *file) ...@@ -102,7 +102,7 @@ static void sis_driver_postclose(struct drm_device *dev, struct drm_file *file)
} }
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = DRIVER_USE_AGP, .driver_features = DRIVER_USE_AGP | DRIVER_LEGACY,
.load = sis_driver_load, .load = sis_driver_load,
.unload = sis_driver_unload, .unload = sis_driver_unload,
.open = sis_driver_open, .open = sis_driver_open,
......
...@@ -56,6 +56,7 @@ static const struct file_operations tdfx_driver_fops = { ...@@ -56,6 +56,7 @@ static const struct file_operations tdfx_driver_fops = {
}; };
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = DRIVER_LEGACY,
.set_busid = drm_pci_set_busid, .set_busid = drm_pci_set_busid,
.fops = &tdfx_driver_fops, .fops = &tdfx_driver_fops,
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -72,7 +72,7 @@ static const struct file_operations via_driver_fops = { ...@@ -72,7 +72,7 @@ static const struct file_operations via_driver_fops = {
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = .driver_features =
DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_LEGACY |
DRIVER_IRQ_SHARED, DRIVER_IRQ_SHARED,
.load = via_driver_load, .load = via_driver_load,
.unload = via_driver_unload, .unload = via_driver_unload,
......
...@@ -146,6 +146,7 @@ void drm_err(const char *format, ...); ...@@ -146,6 +146,7 @@ void drm_err(const char *format, ...);
/* driver capabilities and requirements mask */ /* driver capabilities and requirements mask */
#define DRIVER_USE_AGP 0x1 #define DRIVER_USE_AGP 0x1
#define DRIVER_LEGACY 0x2
#define DRIVER_PCI_DMA 0x8 #define DRIVER_PCI_DMA 0x8
#define DRIVER_SG 0x10 #define DRIVER_SG 0x10
#define DRIVER_HAVE_DMA 0x20 #define DRIVER_HAVE_DMA 0x20
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment