[RFC PATCH 2/4] Documentation: start module parameter documentation autogenerated from modinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Module parameters are supposed to be documented using MODULE_PARM_DESC
in source. We should be able to use this information to autogenerate
module parameter documentation instead of duplicating that information
manually in kernel-parameters.rst.

Parsing that information directly from the source is hard. It's not
obvious what the module name is when you encounter MODULE_PARM_DESC. The
information may be entered in source using several layers of other
macros. Oh, and you'd need another C parser.

An alternative is to use modinfo(8) on the compiled kernel modules. The
trouble is, you have to actually build the module to do so, and that is
obviously too slow for the documentation build.

Here's an approach to commit the generated information in the repo. It's
not ideal to commit generated data, but at least the information can be
automatically updated as needed.

All the generated files are included as a toctree in
kernel-parameters.rst.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 Documentation/admin-guide/kernel-parameters.rst    |   8 ++
 Documentation/admin-guide/kernel-parameters.txt    |  14 ---
 Documentation/admin-guide/module-parameters/README |  10 ++
 .../admin-guide/module-parameters/i915.rst         | 125 +++++++++++++++++++++
 4 files changed, 143 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/admin-guide/module-parameters/README
 create mode 100644 Documentation/admin-guide/module-parameters/i915.rst

diff --git a/Documentation/admin-guide/kernel-parameters.rst b/Documentation/admin-guide/kernel-parameters.rst
index d76ab3907e2b..eed98e70b700 100644
--- a/Documentation/admin-guide/kernel-parameters.rst
+++ b/Documentation/admin-guide/kernel-parameters.rst
@@ -204,6 +204,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted:
 .. include:: kernel-parameters.txt
    :literal:
 
+Module parameters
+-----------------
+
+.. toctree::
+   :glob:
+
+   module-parameters/*
+
 Todo
 ----
 
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index d9c171ce4190..4e731b44db95 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1382,20 +1382,6 @@
 	i8k.restricted	[HW] Allow controlling fans only if SYS_ADMIN
 			capability is set.
 
-	i915.invert_brightness=
-			[DRM] Invert the sense of the variable that is used to
-			set the brightness of the panel backlight. Normally a
-			brightness value of 0 indicates backlight switched off,
-			and the maximum of the brightness value sets the backlight
-			to maximum brightness. If this parameter is set to 0
-			(default) and the machine requires it, or this parameter
-			is set to 1, a brightness value of 0 sets the backlight
-			to maximum brightness, and the maximum of the brightness
-			value switches the backlight off.
-			-1 -- never invert brightness
-			 0 -- machine default
-			 1 -- force brightness inversion
-
 	icn=		[HW,ISDN]
 			Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
 
diff --git a/Documentation/admin-guide/module-parameters/README b/Documentation/admin-guide/module-parameters/README
new file mode 100644
index 000000000000..38e34f83bdc7
--- /dev/null
+++ b/Documentation/admin-guide/module-parameters/README
@@ -0,0 +1,10 @@
+The files in this directory are automatically generated. Please don't update
+them manually.
+
+To add a new file, run:
+
+	$ scripts/modinfo-to-rst path/to/module.ko > \
+	  Documentation/admin-guide/module-parameters/module.rst
+
+Make sure you do this with a recently built module.ko! Review and commit the
+changes afterwards.
diff --git a/Documentation/admin-guide/module-parameters/i915.rst b/Documentation/admin-guide/module-parameters/i915.rst
new file mode 100644
index 000000000000..7dd4a92fe7b0
--- /dev/null
+++ b/Documentation/admin-guide/module-parameters/i915.rst
@@ -0,0 +1,125 @@
+.. Autogenerated from i915.ko using modinfo(8) and modinfo-to-rst
+
+i915
+====
+
+alpha_support (bool)
+  Enable alpha quality driver support for latest hardware. See also CONFIG_DRM_I915_ALPHA_SUPPORT.
+
+disable_display (bool)
+  Disable display (default: false)
+
+disable_power_well (int)
+  Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)
+
+edp_vswing (int)
+  Ignore/Override vswing pre-emph table selection from VBT (0=use value from vbt [default], 1=low power swing(200mV),2=default swing(400mV))
+
+enable_cmd_parser (bool)
+  Enable command parsing (true=enabled [default], false=disabled)
+
+enable_dbc (bool)
+  Enable support for dynamic backlight control (default:true)
+
+enable_dc (int)
+  Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6)
+
+enable_dpcd_backlight (int)
+  Enable support for DPCD backlight control (-1:auto (default), 0:force disable, 1:force enabled if supported
+
+enable_dp_mst (bool)
+  Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)
+
+enable_execlists (int)
+  Override execlists usage. (-1=auto [default], 0=disabled, 1=enabled)
+
+enable_fbc (int)
+  Enable frame buffer compression for power savings (default: -1 (use per-chip default))
+
+enable_guc_loading (int)
+  Enable GuC firmware loading (-1=auto, 0=never [default], 1=if available, 2=required)
+
+enable_guc_submission (int)
+  Enable GuC submission (-1=auto, 0=never [default], 1=if available, 2=required)
+
+enable_gvt (bool)
+  Enable support for Intel GVT-g graphics virtualization host support(default:false)
+
+enable_hangcheck (bool)
+  Periodically check GPU activity for detecting hangs. WARNING: Disabling this can cause system wide hangs. (default: true)
+
+enable_ips (int)
+  Enable IPS (default: true)
+
+enable_ppgtt (int)
+  Override PPGTT usage. (-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)
+
+enable_psr (int)
+  Enable PSR (0=disabled, 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode) Default: -1 (use per-chip default)
+
+enable_rc6 (int)
+  Enable power-saving render C-state 6. Different stages can be selected via bitmask values (0 = disable; 1 = enable rc6; 2 = enable deep rc6; 4 = enable deepest rc6). For example, 3 would enable rc6 and deep rc6, and 7 would enable everything. default: -1 (use per-chip default)
+
+error_capture (bool)
+  Record the GPU state following a hang. This information in /sys/class/drm/card<N>/error is vital for triaging and debugging hangs.
+
+fastboot (bool)
+  Try to skip unnecessary mode sets at boot time (default: false)
+
+force_reset_modeset_test (bool)
+  Force a modeset during gpu reset for testing (default:false). For developers only.
+
+guc_firmware_path (charp)
+  GuC firmware path to use instead of the default one
+
+guc_log_level (int)
+  GuC firmware logging level (-1:disabled (default), 0-3:enabled)
+
+huc_firmware_path (charp)
+  HuC firmware path to use instead of the default one
+
+inject_load_failure (uint)
+  Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)
+
+invert_brightness (int)
+  Invert backlight brightness (-1 force normal, 0 machine defaults, 1 force inversion), please report PCI device ID, subsystem vendor and subsystem device ID to dri-devel@xxxxxxxxxxxxxxxxxxxxx, if your machine needs it. It will then be included in an upcoming module version.
+
+load_detect_test (bool)
+  Force-enable the VGA load detect code for testing (default:false). For developers only.
+
+lvds_channel_mode (int)
+  Specify LVDS channel mode (0=probe BIOS [default], 1=single-channel, 2=dual-channel)
+
+lvds_use_ssc (int)
+  Use Spread Spectrum Clock with panels [LVDS/eDP] (default: auto from VBT)
+
+mmio_debug (int)
+  Enable the MMIO debug code for the first N failures (default: off). This may negatively affect performance.
+
+modeset (int)
+  Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default])
+
+nuclear_pageflip (bool)
+  Force enable atomic functionality on platforms that don't have full support yet.
+
+panel_ignore_lid (int)
+  Override lid status (0=autodetect, 1=autodetect disabled [default], -1=force lid closed, -2=force lid open)
+
+prefault_disable (bool)
+  Disable page prefaulting for pread/pwrite/reloc (default:false). For developers only.
+
+reset (int)
+  Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])
+
+semaphores (int)
+  Use semaphores for inter-ring sync (default: -1 (use per-chip defaults))
+
+use_mmio_flip (int)
+  use MMIO flips (-1=never, 0=driver discretion [default], 1=always)
+
+vbt_sdvo_panel_type (int)
+  Override/Ignore selection of SDVO panel mode in the VBT (-2=ignore, -1=auto [default], index in VBT BIOS table)
+
+verbose_state_checks (bool)
+  Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions.
+
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux