diff mbox

[1/3] drm/i915: Rename i915.panel_use_ssc field to lvds_use_ssc

Message ID 20170608150734.42296-2-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Wajdeczko June 8, 2017, 3:07 p.m. UTC
This is the only field from i915_params struct which name does not match
the the name of the param that it is associated with. Lets fix that now
as this will unblock us with further improvements around params defs.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_params.c   | 4 ++--
 drivers/gpu/drm/i915/i915_params.h   | 2 +-
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Comments

Ville Syrjälä June 8, 2017, 4:03 p.m. UTC | #1
On Thu, Jun 08, 2017 at 03:07:32PM +0000, Michal Wajdeczko wrote:
> This is the only field from i915_params struct which name does not match
> the the name of the param that it is associated with. Lets fix that now
> as this will unblock us with further improvements around params defs.

Maybe we should rename the modparam instead since it does affect eDP as
well. Thoughts?

> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_params.c   | 4 ++--
>  drivers/gpu/drm/i915/i915_params.h   | 2 +-
>  drivers/gpu/drm/i915/intel_display.c | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index b6a7e36..072aaaf 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -30,7 +30,7 @@ struct i915_params i915 __read_mostly = {
>  	.panel_ignore_lid = 1,
>  	.semaphores = -1,
>  	.lvds_channel_mode = 0,
> -	.panel_use_ssc = -1,
> +	.lvds_use_ssc = -1,
>  	.vbt_sdvo_panel_type = -1,
>  	.enable_rc6 = -1,
>  	.enable_dc = -1,
> @@ -105,7 +105,7 @@ MODULE_PARM_DESC(lvds_channel_mode,
>  	 "Specify LVDS channel mode "
>  	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
>  
> -module_param_named_unsafe(lvds_use_ssc, i915.panel_use_ssc, int, 0600);
> +module_param_named_unsafe(lvds_use_ssc, i915.lvds_use_ssc, int, 0600);
>  MODULE_PARM_DESC(lvds_use_ssc,
>  	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
>  	"(default: auto from VBT)");
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index 34148cc..5fa62c2 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -32,7 +32,7 @@
>  	func(int, panel_ignore_lid); \
>  	func(int, semaphores); \
>  	func(int, lvds_channel_mode); \
> -	func(int, panel_use_ssc); \
> +	func(int, lvds_use_ssc); \
>  	func(int, vbt_sdvo_panel_type); \
>  	func(int, enable_rc6); \
>  	func(int, enable_dc); \
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 25390dd..fdd2576 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6345,8 +6345,8 @@ intel_link_compute_m_n(int bits_per_pixel, int nlanes,
>  
>  static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
>  {
> -	if (i915.panel_use_ssc >= 0)
> -		return i915.panel_use_ssc != 0;
> +	if (i915.lvds_use_ssc >= 0)
> +		return i915.lvds_use_ssc != 0;
>  	return dev_priv->vbt.lvds_use_ssc
>  		&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
>  }
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Michal Wajdeczko June 8, 2017, 4:22 p.m. UTC | #2
On Thu, Jun 08, 2017 at 07:03:55PM +0300, Ville Syrjälä wrote:
> On Thu, Jun 08, 2017 at 03:07:32PM +0000, Michal Wajdeczko wrote:
> > This is the only field from i915_params struct which name does not match
> > the the name of the param that it is associated with. Lets fix that now
> > as this will unblock us with further improvements around params defs.
> 
> Maybe we should rename the modparam instead since it does affect eDP as
> well. Thoughts?
> 

For me it's fine (and maybe even easier).
But I'm not sure how "stable" modparams need to be.

Michal


> > 
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/i915_params.c   | 4 ++--
> >  drivers/gpu/drm/i915/i915_params.h   | 2 +-
> >  drivers/gpu/drm/i915/intel_display.c | 4 ++--
> >  3 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> > index b6a7e36..072aaaf 100644
> > --- a/drivers/gpu/drm/i915/i915_params.c
> > +++ b/drivers/gpu/drm/i915/i915_params.c
> > @@ -30,7 +30,7 @@ struct i915_params i915 __read_mostly = {
> >  	.panel_ignore_lid = 1,
> >  	.semaphores = -1,
> >  	.lvds_channel_mode = 0,
> > -	.panel_use_ssc = -1,
> > +	.lvds_use_ssc = -1,
> >  	.vbt_sdvo_panel_type = -1,
> >  	.enable_rc6 = -1,
> >  	.enable_dc = -1,
> > @@ -105,7 +105,7 @@ MODULE_PARM_DESC(lvds_channel_mode,
> >  	 "Specify LVDS channel mode "
> >  	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
> >  
> > -module_param_named_unsafe(lvds_use_ssc, i915.panel_use_ssc, int, 0600);
> > +module_param_named_unsafe(lvds_use_ssc, i915.lvds_use_ssc, int, 0600);
> >  MODULE_PARM_DESC(lvds_use_ssc,
> >  	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
> >  	"(default: auto from VBT)");
> > diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> > index 34148cc..5fa62c2 100644
> > --- a/drivers/gpu/drm/i915/i915_params.h
> > +++ b/drivers/gpu/drm/i915/i915_params.h
> > @@ -32,7 +32,7 @@
> >  	func(int, panel_ignore_lid); \
> >  	func(int, semaphores); \
> >  	func(int, lvds_channel_mode); \
> > -	func(int, panel_use_ssc); \
> > +	func(int, lvds_use_ssc); \
> >  	func(int, vbt_sdvo_panel_type); \
> >  	func(int, enable_rc6); \
> >  	func(int, enable_dc); \
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 25390dd..fdd2576 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -6345,8 +6345,8 @@ intel_link_compute_m_n(int bits_per_pixel, int nlanes,
> >  
> >  static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
> >  {
> > -	if (i915.panel_use_ssc >= 0)
> > -		return i915.panel_use_ssc != 0;
> > +	if (i915.lvds_use_ssc >= 0)
> > +		return i915.lvds_use_ssc != 0;
> >  	return dev_priv->vbt.lvds_use_ssc
> >  		&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
> >  }
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel OTC
Chris Wilson June 8, 2017, 8 p.m. UTC | #3
Quoting Michal Wajdeczko (2017-06-08 17:22:40)
> On Thu, Jun 08, 2017 at 07:03:55PM +0300, Ville Syrjälä wrote:
> > On Thu, Jun 08, 2017 at 03:07:32PM +0000, Michal Wajdeczko wrote:
> > > This is the only field from i915_params struct which name does not match
> > > the the name of the param that it is associated with. Lets fix that now
> > > as this will unblock us with further improvements around params defs.
> > 
> > Maybe we should rename the modparam instead since it does affect eDP as
> > well. Thoughts?
> > 
> 
> For me it's fine (and maybe even easier).
> But I'm not sure how "stable" modparams need to be.

Soft. Since it is used to quirk hw behaviour, occasionally upsetting the
apple-cart so that a user files a bug report and we get it added to the
quirk table is a small price to pay in annoyance. If no one notices, the
modparam may have outlived its usefulness.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index b6a7e36..072aaaf 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -30,7 +30,7 @@  struct i915_params i915 __read_mostly = {
 	.panel_ignore_lid = 1,
 	.semaphores = -1,
 	.lvds_channel_mode = 0,
-	.panel_use_ssc = -1,
+	.lvds_use_ssc = -1,
 	.vbt_sdvo_panel_type = -1,
 	.enable_rc6 = -1,
 	.enable_dc = -1,
@@ -105,7 +105,7 @@  MODULE_PARM_DESC(lvds_channel_mode,
 	 "Specify LVDS channel mode "
 	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
 
-module_param_named_unsafe(lvds_use_ssc, i915.panel_use_ssc, int, 0600);
+module_param_named_unsafe(lvds_use_ssc, i915.lvds_use_ssc, int, 0600);
 MODULE_PARM_DESC(lvds_use_ssc,
 	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
 	"(default: auto from VBT)");
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 34148cc..5fa62c2 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -32,7 +32,7 @@ 
 	func(int, panel_ignore_lid); \
 	func(int, semaphores); \
 	func(int, lvds_channel_mode); \
-	func(int, panel_use_ssc); \
+	func(int, lvds_use_ssc); \
 	func(int, vbt_sdvo_panel_type); \
 	func(int, enable_rc6); \
 	func(int, enable_dc); \
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 25390dd..fdd2576 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6345,8 +6345,8 @@  intel_link_compute_m_n(int bits_per_pixel, int nlanes,
 
 static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
 {
-	if (i915.panel_use_ssc >= 0)
-		return i915.panel_use_ssc != 0;
+	if (i915.lvds_use_ssc >= 0)
+		return i915.lvds_use_ssc != 0;
 	return dev_priv->vbt.lvds_use_ssc
 		&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
 }