Patchwork [1/1,Oneiric,SRU] drm/i915: Module parameters using '-1' as default must be signed type

login
register
mail settings
Submitter Seth Forshee
Date March 13, 2012, 1:46 p.m.
Message ID <1331646373-10541-2-git-send-email-seth.forshee@canonical.com>
Download mbox | patch
Permalink /patch/146411/
State New
Headers show

Comments

Seth Forshee - March 13, 2012, 1:46 p.m.
From: Keith Packard <keithp@keithp.com>

Testing i915_panel_use_ssc for the default value was broken, so the
driver would never autodetect the correct value.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by:   Michel Alexandre Salim <salimma@fedoraproject.org>
Tested-by:     Michel Alexandre Salim <salimma@fedoraproject.org>
Cc: stable@kernel.org
(backported from commit 4415e63b13c68c2f56d16d400a1ae345f68cf655)
BugLink: https://bugs.launchpad.net/bugs/925350
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/gpu/drm/i915/i915_drv.c |    2 +-
 drivers/gpu/drm/i915/i915_drv.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Colin King - March 13, 2012, 1:56 p.m.
On 13/03/12 13:46, Seth Forshee wrote:
> From: Keith Packard<keithp@keithp.com>
>
> Testing i915_panel_use_ssc for the default value was broken, so the
> driver would never autodetect the correct value.
>
> Signed-off-by: Keith Packard<keithp@keithp.com>
> Reviewed-by:   Michel Alexandre Salim<salimma@fedoraproject.org>
> Tested-by:     Michel Alexandre Salim<salimma@fedoraproject.org>
> Cc: stable@kernel.org
> (backported from commit 4415e63b13c68c2f56d16d400a1ae345f68cf655)
> BugLink: https://bugs.launchpad.net/bugs/925350
> Signed-off-by: Seth Forshee<seth.forshee@canonical.com>
> ---
>   drivers/gpu/drm/i915/i915_drv.c |    2 +-
>   drivers/gpu/drm/i915/i915_drv.h |    2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index b44f343..f6e54b1 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -61,7 +61,7 @@ module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
>   unsigned int i915_lvds_downclock = 0;
>   module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
>
> -unsigned int i915_panel_use_ssc __read_mostly = -1;
> +int i915_panel_use_ssc __read_mostly = -1;
>   module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
>   MODULE_PARM_DESC(lvds_use_ssc,
>   		"Use Spread Spectrum Clock with panels [LVDS/eDP] "
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index ed5fbe6..b5389af 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1003,7 +1003,7 @@ extern int i915_panel_ignore_lid;
>   extern unsigned int i915_powersave;
>   extern unsigned int i915_semaphores;
>   extern unsigned int i915_lvds_downclock;
> -extern unsigned int i915_panel_use_ssc;
> +extern int i915_panel_use_ssc;
>   extern int i915_vbt_sdvo_panel_type;
>   extern unsigned int i915_enable_rc6;
>   extern unsigned int i915_enable_fbc;

I see that you dropped the i915_enable_fbc from the original patch as 
this probably doesn't make sense for Oneiric.

Acked-by: Colin Ian King <colin.king@canonical.com>
Seth Forshee - March 13, 2012, 2:02 p.m.
On Tue, Mar 13, 2012 at 01:56:45PM +0000, Colin Ian King wrote:
> On 13/03/12 13:46, Seth Forshee wrote:
> >From: Keith Packard<keithp@keithp.com>
> >
> >Testing i915_panel_use_ssc for the default value was broken, so the
> >driver would never autodetect the correct value.
> >
> >Signed-off-by: Keith Packard<keithp@keithp.com>
> >Reviewed-by:   Michel Alexandre Salim<salimma@fedoraproject.org>
> >Tested-by:     Michel Alexandre Salim<salimma@fedoraproject.org>
> >Cc: stable@kernel.org
> >(backported from commit 4415e63b13c68c2f56d16d400a1ae345f68cf655)
> >BugLink: https://bugs.launchpad.net/bugs/925350
> >Signed-off-by: Seth Forshee<seth.forshee@canonical.com>
> >---
> >  drivers/gpu/drm/i915/i915_drv.c |    2 +-
> >  drivers/gpu/drm/i915/i915_drv.h |    2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> >index b44f343..f6e54b1 100644
> >--- a/drivers/gpu/drm/i915/i915_drv.c
> >+++ b/drivers/gpu/drm/i915/i915_drv.c
> >@@ -61,7 +61,7 @@ module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
> >  unsigned int i915_lvds_downclock = 0;
> >  module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
> >
> >-unsigned int i915_panel_use_ssc __read_mostly = -1;
> >+int i915_panel_use_ssc __read_mostly = -1;
> >  module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
> >  MODULE_PARM_DESC(lvds_use_ssc,
> >  		"Use Spread Spectrum Clock with panels [LVDS/eDP] "
> >diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> >index ed5fbe6..b5389af 100644
> >--- a/drivers/gpu/drm/i915/i915_drv.h
> >+++ b/drivers/gpu/drm/i915/i915_drv.h
> >@@ -1003,7 +1003,7 @@ extern int i915_panel_ignore_lid;
> >  extern unsigned int i915_powersave;
> >  extern unsigned int i915_semaphores;
> >  extern unsigned int i915_lvds_downclock;
> >-extern unsigned int i915_panel_use_ssc;
> >+extern int i915_panel_use_ssc;
> >  extern int i915_vbt_sdvo_panel_type;
> >  extern unsigned int i915_enable_rc6;
> >  extern unsigned int i915_enable_fbc;
> 
> I see that you dropped the i915_enable_fbc from the original patch
> as this probably doesn't make sense for Oneiric.

Right. Oneiric doesn't have the changes that treat i915_enable_fbc as a
signed value, although I suppose we could have kept that change without
affecting the functionality.

Seth
Herton Ronaldo Krzesinski - March 13, 2012, 3:29 p.m.
On Tue, Mar 13, 2012 at 08:46:13AM -0500, Seth Forshee wrote:
> From: Keith Packard <keithp@keithp.com>
> 
> Testing i915_panel_use_ssc for the default value was broken, so the
> driver would never autodetect the correct value.
> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> Reviewed-by:   Michel Alexandre Salim <salimma@fedoraproject.org>
> Tested-by:     Michel Alexandre Salim <salimma@fedoraproject.org>
> Cc: stable@kernel.org
> (backported from commit 4415e63b13c68c2f56d16d400a1ae345f68cf655)
> BugLink: https://bugs.launchpad.net/bugs/925350
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c |    2 +-
>  drivers/gpu/drm/i915/i915_drv.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index b44f343..f6e54b1 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -61,7 +61,7 @@ module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
>  unsigned int i915_lvds_downclock = 0;
>  module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
>  
> -unsigned int i915_panel_use_ssc __read_mostly = -1;
> +int i915_panel_use_ssc __read_mostly = -1;
>  module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
>  MODULE_PARM_DESC(lvds_use_ssc,
>  		"Use Spread Spectrum Clock with panels [LVDS/eDP] "
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index ed5fbe6..b5389af 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1003,7 +1003,7 @@ extern int i915_panel_ignore_lid;
>  extern unsigned int i915_powersave;
>  extern unsigned int i915_semaphores;
>  extern unsigned int i915_lvds_downclock;
> -extern unsigned int i915_panel_use_ssc;
> +extern int i915_panel_use_ssc;
>  extern int i915_vbt_sdvo_panel_type;
>  extern unsigned int i915_enable_rc6;
>  extern unsigned int i915_enable_fbc;
> -- 
> 1.7.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index b44f343..f6e54b1 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -61,7 +61,7 @@  module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
 unsigned int i915_lvds_downclock = 0;
 module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
 
-unsigned int i915_panel_use_ssc __read_mostly = -1;
+int i915_panel_use_ssc __read_mostly = -1;
 module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
 MODULE_PARM_DESC(lvds_use_ssc,
 		"Use Spread Spectrum Clock with panels [LVDS/eDP] "
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index ed5fbe6..b5389af 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1003,7 +1003,7 @@  extern int i915_panel_ignore_lid;
 extern unsigned int i915_powersave;
 extern unsigned int i915_semaphores;
 extern unsigned int i915_lvds_downclock;
-extern unsigned int i915_panel_use_ssc;
+extern int i915_panel_use_ssc;
 extern int i915_vbt_sdvo_panel_type;
 extern unsigned int i915_enable_rc6;
 extern unsigned int i915_enable_fbc;