public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Remove references to previously removed UMS config option
@ 2015-02-06 10:16 Andreas Ruprecht
  2015-02-06 10:30 ` Paul Bolle
  2015-02-06 10:48 ` Jani Nikula
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Ruprecht @ 2015-02-06 10:16 UTC (permalink / raw)
  To: David Airlie
  Cc: Daniel Vetter, Jani Nikula, intel-gfx, dri-devel, linux-kernel,
	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.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
---
 drivers/gpu/drm/i915/i915_drv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8039cec..4ecf85f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -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);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Remove references to previously removed UMS config option
  2015-02-06 10:16 [PATCH] drm/i915: Remove references to previously removed UMS config option Andreas Ruprecht
@ 2015-02-06 10:30 ` Paul Bolle
  2015-02-06 10:48 ` Jani Nikula
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Bolle @ 2015-02-06 10:30 UTC (permalink / raw)
  To: Andreas Ruprecht
  Cc: David Airlie, Daniel Vetter, Jani Nikula, intel-gfx, dri-devel,
	linux-kernel

On Fri, 2015-02-06 at 11:16 +0100, Andreas Ruprecht wrote:
> 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.
> 
> Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
> ---

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.

>  drivers/gpu/drm/i915/i915_drv.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 8039cec..4ecf85f 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -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);
>  }

Thanks,


Paul Bolle


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Remove references to previously removed UMS config option
  2015-02-06 10:16 [PATCH] drm/i915: Remove references to previously removed UMS config option Andreas Ruprecht
  2015-02-06 10:30 ` Paul Bolle
@ 2015-02-06 10:48 ` Jani Nikula
  2015-02-13 14:44   ` [Intel-gfx] " Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2015-02-06 10:48 UTC (permalink / raw)
  To: Andreas Ruprecht, David Airlie
  Cc: Daniel Vetter, intel-gfx, dri-devel, linux-kernel,
	Andreas Ruprecht

On Fri, 06 Feb 2015, Andreas Ruprecht <rupran@einserver.de> wrote:
> 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.
>
> Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 8039cec..4ecf85f 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -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 <jani.nikula@intel.com>
Date:   Mon Jun 2 16:58:30 2014 +0300

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

Other than that,

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>  		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);
>  }
> -- 
> 1.9.1
>

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Remove references to previously removed UMS config option
  2015-02-06 10:48 ` Jani Nikula
@ 2015-02-13 14:44   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2015-02-13 14:44 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Andreas Ruprecht, David Airlie, Daniel Vetter, intel-gfx,
	linux-kernel, dri-devel

On Fri, Feb 06, 2015 at 12:48:57PM +0200, Jani Nikula wrote:
> On Fri, 06 Feb 2015, Andreas Ruprecht <rupran@einserver.de> wrote:
> > 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.
> >
> > Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 8039cec..4ecf85f 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -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 <jani.nikula@intel.com>
> 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 ...
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

and merged for 3.21, thanks for patch&review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-13 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 10:16 [PATCH] drm/i915: Remove references to previously removed UMS config option Andreas Ruprecht
2015-02-06 10:30 ` Paul Bolle
2015-02-06 10:48 ` Jani Nikula
2015-02-13 14:44   ` [Intel-gfx] " Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox