Skip to contentSkip to conversation

drm/i915: Remove references to previously removed UMS config option

PATCH In review Andreas Ruprecht 4 participants 4 messages Feb 6, 2015 – Feb 13, 2015

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

PATCH 1/1 drm/i915: Remove references to previously removed UMS config option

Commit 03dae59c72ffffd8 ("drm/i915: Ditch UMS config option") removed CONFIG_DRM_I915_UMS from the Kconfig file, but i915_drv.c still references this option in two #ifndef statements.

As an undefined config option will always be 'false', we can drop the #ifndefs alltogether and adapt the printed error message.

This inconsistency was found with the undertaker tool.

---
 drivers/gpu/drm/i915/i915_drv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -5
index 8039cec..4ecf85f 100644
@@ -1630,11 +1630,9 @@ static int __init i915_init(void)
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
 		driver.get_vblank_timestamp = NULL;
-#ifndef CONFIG_DRM_I915_UMS
 		/* Silently fail loading to not upset userspace. */
-		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
+		DRM_DEBUG_DRIVER("KMS disabled.\n");
 		return 0;
-#endif
 	}
 
 	/*
@@ -1650,10 +1648,8 @@ static int __init i915_init(void)
 
 static void __exit i915_exit(void)
 {
-#ifndef CONFIG_DRM_I915_UMS
 	if (!(driver.driver_features & DRIVER_MODESET))
 		return; /* Never loaded a driver. */
-#endif
 
 	drm_pci_exit(&driver, &i915_pci_driver);
 }
Signature · 1 line
1.9.1
#1 lore raw
Quoted 11 lines · Andreas Ruprecht

Commit 03dae59c72ffffd8 ("drm/i915: Ditch UMS config option") removed CONFIG_DRM_I915_UMS from the Kconfig file, but i915_drv.c still references this option in two #ifndef statements.

As an undefined config option will always be 'false', we can drop the #ifndefs alltogether and adapt the printed error message.

This inconsistency was found with the undertaker tool.

---

Previously discussed in
http://lists.freedesktop.org/archives/dri-devel/2014-July/064702.html
(but not on lkml). If I understand Daniels message correctly this

    $ git grep -n '!drm_core_check_feature' | grep -w DRIVER_MODESET | wc -l
    43

means the cleanup needed to be done before this cleanup will be applied, hasn't happened yet.

Quoted 21 lines
 drivers/gpu/drm/i915/i915_drv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -3
index 8039cec..4ecf85f 100644
@@ -1630,11 +1630,9 @@ static int __init i915_init(void)
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
 		driver.get_vblank_timestamp = NULL;
-#ifndef CONFIG_DRM_I915_UMS
 		/* Silently fail loading to not upset userspace. */
-		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
+		DRM_DEBUG_DRIVER("KMS disabled.\n");
 		return 0;
-#endif
 	}
 
 	/*

drivers/gpu/drm/i915/i915_drv.c static int __init i915_init(void) · line 1655

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +0 -2
@@ -1650,10 +1648,8 @@ static int __init i915_init(void)
 
 static void __exit i915_exit(void)
 {
-#ifndef CONFIG_DRM_I915_UMS
 	if (!(driver.driver_features & DRIVER_MODESET))
 		return; /* Never loaded a driver. */
-#endif
 
 	drm_pci_exit(&driver, &i915_pci_driver);
 }

Thanks,

Paul Bolle

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Andreas Ruprecht
Quoted 19 lines · Andreas Ruprecht

Commit 03dae59c72ffffd8 ("drm/i915: Ditch UMS config option") removed CONFIG_DRM_I915_UMS from the Kconfig file, but i915_drv.c still references this option in two #ifndef statements.

As an undefined config option will always be 'false', we can drop the #ifndefs alltogether and adapt the printed error message.

This inconsistency was found with the undertaker tool.

---
 drivers/gpu/drm/i915/i915_drv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +0 -0
index 8039cec..4ecf85f 100644

drivers/gpu/drm/i915/i915_drv.c static int __init i915_init(void) · line 1634

Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.c +1 -2
@@ -1630,11 +1630,9 @@ static int __init i915_init(void)
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
 		driver.get_vblank_timestamp = NULL;
-#ifndef CONFIG_DRM_I915_UMS
 		/* Silently fail loading to not upset userspace. */
-		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
+		DRM_DEBUG_DRIVER("KMS disabled.\n");

I'm not sure if this logging change is required. UMS will still also be disabled. Or maybe make it "KMS disabled, UMS not supported.\n". Background in

commit c9cd7b65db50175a5f1ff64bbad6d5affdad6aba

Author: Jani Nikula <[email protected]>
Date:   Mon Jun 2 16:58:30 2014 +0300

drm/i915: tell the user if both KMS and UMS are disabled

Other than that,

Quoted 19 lines
drivers/gpu/drm/i915/i915_drv.c +0 -3
 		return 0;
-#endif
 	}
 
 	/*
@@ -1650,10 +1648,8 @@ static int __init i915_init(void)
 
 static void __exit i915_exit(void)
 {
-#ifndef CONFIG_DRM_I915_UMS
 	if (!(driver.driver_features & DRIVER_MODESET))
 		return; /* Never loaded a driver. */
-#endif
 
 	drm_pci_exit(&driver, &i915_pci_driver);
 }
Signature · 1 line
1.9.1
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#3 lore raw
Quoted 32 lines · Jani Nikula
Quoted 19 lines · Andreas Ruprecht

Commit 03dae59c72ffffd8 ("drm/i915: Ditch UMS config option") removed CONFIG_DRM_I915_UMS from the Kconfig file, but i915_drv.c still references this option in two #ifndef statements.

As an undefined config option will always be 'false', we can drop the #ifndefs alltogether and adapt the printed error message.

This inconsistency was found with the undertaker tool.

---
 drivers/gpu/drm/i915/i915_drv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +0 -0
index 8039cec..4ecf85f 100644

drivers/gpu/drm/i915/i915_drv.c static int __init i915_init(void) · line 1634

Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.c +1 -2
@@ -1630,11 +1630,9 @@ static int __init i915_init(void)
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
 		driver.get_vblank_timestamp = NULL;
-#ifndef CONFIG_DRM_I915_UMS
 		/* Silently fail loading to not upset userspace. */
-		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
+		DRM_DEBUG_DRIVER("KMS disabled.\n");

I'm not sure if this logging change is required. UMS will still also be disabled. Or maybe make it "KMS disabled, UMS not supported.\n". Background in

Quoted 7 lines

commit c9cd7b65db50175a5f1ff64bbad6d5affdad6aba

Author: Jani Nikula <[email protected]>
Date:   Mon Jun 2 16:58:30 2014 +0300

drm/i915: tell the user if both KMS and UMS are disabled

Other than that,

Undone ...

Quoted 2 lines

and merged for 3.21, thanks for patch&review.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx