diff mbox

[2/2] drm/i915: provide module parameter description

Message ID 1309990493-27160-2-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky July 6, 2011, 10:14 p.m. UTC
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

Comments

Chris Wilson July 7, 2011, 5:58 a.m. UTC | #1
On Wed,  6 Jul 2011 15:14:53 -0700, Ben Widawsky <ben@bwidawsk.net> wrote:
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_drv.c |   23 +++++++++++++++++++++++
>  1 files changed, 23 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index f5ef954..feac0f9 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -39,39 +39,62 @@
>  
>  static int i915_modeset __read_mostly = -1;
>  module_param_named(modeset, i915_modeset, int, 0400);
> +MODULE_PARM_DESC(modeset, "Use kernel modesetting (KMS) "
> +			  "(0=use DRM_I915_KMS from .config, "
> +			  "1=on, "
> +			  "-1=force vga console preference (default))");

I find this alignment slightly odd, and it is disadvantageous later where
it forces a string across two lines that could just be one. Can you try
aligning the start of the description with the bracket on a new line?
i.e. set cino=:0,(0
-Chris
Chris Wilson July 7, 2011, 9:17 a.m. UTC | #2
On Wed,  6 Jul 2011 15:14:53 -0700, Ben Widawsky <ben@bwidawsk.net> wrote:
>  bool i915_enable_hangcheck __read_mostly = true;
>  module_param_named(enable_hangcheck, i915_enable_hangcheck, bool, 0644);
> +MODULE_PARM_DESC(enable_hangcheck, "Periodically check GPU activity for "
> +				   "detecting hangs (default: true)");

I think we need to stress here that disabling the hangcheck can cause the
system to hang (X, VT switching, etc) following an GPU hang. The
assumption that the hangcheck will prevail and break any waits (and
eventually release the struct_mutex) is deeply ingrained into the code.

The alternate scenario is to wait without the mutex, which then requires
revalidating all state after a wait, effectively we would have to restart
the operation from the being. And introduces unfairness (potential
starvation) into command/resource allocations...
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index f5ef954..feac0f9 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -39,39 +39,62 @@ 
 
 static int i915_modeset __read_mostly = -1;
 module_param_named(modeset, i915_modeset, int, 0400);
+MODULE_PARM_DESC(modeset, "Use kernel modesetting (KMS) "
+			  "(0=use DRM_I915_KMS from .config, "
+			  "1=on, "
+			  "-1=force vga console preference (default))");
 
 unsigned int i915_fbpercrtc __always_unused = 0;
 module_param_named(fbpercrtc, i915_fbpercrtc, int, 0400);
 
 int i915_panel_ignore_lid __read_mostly = 0;
 module_param_named(panel_ignore_lid, i915_panel_ignore_lid, int, 0600);
+MODULE_PARM_DESC(panel_ignore_lid, "Override lid status "
+				   "(0=autodetect (default), 1=lid open, -1=lid closed)");
 
 unsigned int i915_powersave __read_mostly = 1;
 module_param_named(powersave, i915_powersave, int, 0600);
+MODULE_PARM_DESC(powersave, "Enable powersavings, fbc, downclocking, etc. "
+			    "(default: true)");
 
 unsigned int i915_semaphores __read_mostly = 0;
 module_param_named(semaphores, i915_semaphores, int, 0600);
+MODULE_PARM_DESC(semaphores, "Use semaphores for inter-ring synchronization "
+			     "(default: false)");
 
 unsigned int i915_enable_rc6 __read_mostly = 1;
 module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
+MODULE_PARM_DESC(i915_enable_rc6, "Enable power-saving render C-state 6 "
+				  "(default: true)");
 
 unsigned int i915_enable_fbc __read_mostly = 0;
 module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
+MODULE_PARM_DESC(i915_enable_fbc, "Enable frame buffer compression for power savings "
+				  "(default: false)");
 
 unsigned int i915_lvds_downclock __read_mostly = 0;
 module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
+MODULE_PARM_DESC(lvds_downclock, "Use panel (LVDS/eDP) downclocking for "
+				 "power savings (default: false)");
 
 unsigned 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) (default: true)");
 
 int i915_vbt_sdvo_panel_type __read_mostly = -1;
 module_param_named(vbt_sdvo_panel_type, i915_vbt_sdvo_panel_type, int, 0600);
+MODULE_PARM_DESC(vbt_sdvo_panel_type, "Override selection of SDVO panel mode "
+				      "in the VBT (default: auto)");
 
 static bool i915_try_reset __read_mostly = true;
 module_param_named(reset, i915_try_reset, bool, 0600);
+MODULE_PARM_DESC(reset, "Attempt GPU resets (default: true)");
 
 bool i915_enable_hangcheck __read_mostly = true;
 module_param_named(enable_hangcheck, i915_enable_hangcheck, bool, 0644);
+MODULE_PARM_DESC(enable_hangcheck, "Periodically check GPU activity for "
+				   "detecting hangs (default: true)");
 
 static struct drm_driver driver;
 extern int intel_agp_enabled;