1ba55f2f5SFrançois Tigeot /* 2ba55f2f5SFrançois Tigeot * Copyright © 2014 Intel Corporation 3ba55f2f5SFrançois Tigeot * 4ba55f2f5SFrançois Tigeot * Permission is hereby granted, free of charge, to any person obtaining a 5ba55f2f5SFrançois Tigeot * copy of this software and associated documentation files (the 6ba55f2f5SFrançois Tigeot * "Software"), to deal in the Software without restriction, including 7ba55f2f5SFrançois Tigeot * without limitation the rights to use, copy, modify, merge, publish, 8ba55f2f5SFrançois Tigeot * distribute, sub license, and/or sell copies of the Software, and to 9ba55f2f5SFrançois Tigeot * permit persons to whom the Software is furnished to do so, subject to 10ba55f2f5SFrançois Tigeot * the following conditions: 11ba55f2f5SFrançois Tigeot * 12ba55f2f5SFrançois Tigeot * The above copyright notice and this permission notice (including the 13ba55f2f5SFrançois Tigeot * next paragraph) shall be included in all copies or substantial portions 14ba55f2f5SFrançois Tigeot * of the Software. 15ba55f2f5SFrançois Tigeot * 16ba55f2f5SFrançois Tigeot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17ba55f2f5SFrançois Tigeot * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18ba55f2f5SFrançois Tigeot * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19ba55f2f5SFrançois Tigeot * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20ba55f2f5SFrançois Tigeot * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21ba55f2f5SFrançois Tigeot * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22ba55f2f5SFrançois Tigeot * IN THE SOFTWARE. 23ba55f2f5SFrançois Tigeot */ 24ba55f2f5SFrançois Tigeot 25c0e85e96SFrançois Tigeot #include "i915_params.h" 26ba55f2f5SFrançois Tigeot #include "i915_drv.h" 27ba55f2f5SFrançois Tigeot 28*3f2dd94aSFrançois Tigeot #define i915_param_named(name, T, perm, desc) \ 29*3f2dd94aSFrançois Tigeot module_param_named(name, i915_modparams.name, T, perm); \ 30*3f2dd94aSFrançois Tigeot MODULE_PARM_DESC(name, desc) 31*3f2dd94aSFrançois Tigeot #define i915_param_named_unsafe(name, T, perm, desc) \ 32*3f2dd94aSFrançois Tigeot module_param_named_unsafe(name, i915_modparams.name, T, perm); \ 33*3f2dd94aSFrançois Tigeot MODULE_PARM_DESC(name, desc) 34*3f2dd94aSFrançois Tigeot 35*3f2dd94aSFrançois Tigeot struct i915_params i915_modparams __read_mostly = { 36*3f2dd94aSFrançois Tigeot #define MEMBER(T, member, value) .member = (value), 37*3f2dd94aSFrançois Tigeot I915_PARAMS_FOR_EACH(MEMBER) 38*3f2dd94aSFrançois Tigeot #undef MEMBER 39ba55f2f5SFrançois Tigeot }; 40ba55f2f5SFrançois Tigeot 41*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.modeset", &i915_modparams.modeset); 42*3f2dd94aSFrançois Tigeot i915_param_named(modeset, int, 0400, 43a05eeebfSFrançois Tigeot "Use kernel modesetting [KMS] (0=disable, " 44ba55f2f5SFrançois Tigeot "1=on, -1=force vga console preference [default])"); 45ba55f2f5SFrançois Tigeot 46*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.panel_ignore_lid", &i915_modparams.panel_ignore_lid); 47*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(panel_ignore_lid, int, 0600, 48ba55f2f5SFrançois Tigeot "Override lid status (0=autodetect, 1=autodetect disabled [default], " 49ba55f2f5SFrançois Tigeot "-1=force lid closed, -2=force lid open)"); 50ba55f2f5SFrançois Tigeot 51*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.semaphores", &i915_modparams.semaphores); 52*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(semaphores, int, 0400, 53ba55f2f5SFrançois Tigeot "Use semaphores for inter-ring sync " 54ba55f2f5SFrançois Tigeot "(default: -1 (use per-chip defaults))"); 55ba55f2f5SFrançois Tigeot 56*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.enable_rc6", &i915_modparams.enable_rc6); 57*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_rc6, int, 0400, 58ba55f2f5SFrançois Tigeot "Enable power-saving render C-state 6. " 59ba55f2f5SFrançois Tigeot "Different stages can be selected via bitmask values " 60ba55f2f5SFrançois Tigeot "(0 = disable; 1 = enable rc6; 2 = enable deep rc6; 4 = enable deepest rc6). " 61ba55f2f5SFrançois Tigeot "For example, 3 would enable rc6 and deep rc6, and 7 would enable everything. " 62ba55f2f5SFrançois Tigeot "default: -1 (use per-chip default)"); 63ba55f2f5SFrançois Tigeot 64*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.enable_dc", &i915_modparams.enable_dc); 65*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_dc, int, 0400, 66aee94f86SFrançois Tigeot "Enable power-saving display C-states. " 67aee94f86SFrançois Tigeot "(-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6)"); 68aee94f86SFrançois Tigeot 69*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.enable_fbc", &i915_modparams.enable_fbc); 70*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_fbc, int, 0600, 71ba55f2f5SFrançois Tigeot "Enable frame buffer compression for power savings " 72ba55f2f5SFrançois Tigeot "(default: -1 (use per-chip default))"); 73ba55f2f5SFrançois Tigeot 74*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.lvds_channel_mode", &i915_modparams.lvds_channel_mode); 75*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(lvds_channel_mode, int, 0400, 76ba55f2f5SFrançois Tigeot "Specify LVDS channel mode " 77ba55f2f5SFrançois Tigeot "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)"); 78ba55f2f5SFrançois Tigeot 79*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.panel_use_ssc", &i915_modparams.panel_use_ssc); 80*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(panel_use_ssc, int, 0600, 81ba55f2f5SFrançois Tigeot "Use Spread Spectrum Clock with panels [LVDS/eDP] " 82ba55f2f5SFrançois Tigeot "(default: auto from VBT)"); 83ba55f2f5SFrançois Tigeot 84*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.vbt_sdvo_panel_type", &i915_modparams.vbt_sdvo_panel_type); 85*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(vbt_sdvo_panel_type, int, 0400, 86ba55f2f5SFrançois Tigeot "Override/Ignore selection of SDVO panel mode in the VBT " 87ba55f2f5SFrançois Tigeot "(-2=ignore, -1=auto [default], index in VBT BIOS table)"); 88ba55f2f5SFrançois Tigeot 89*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(reset, int, 0600, 90*3f2dd94aSFrançois Tigeot "Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])"); 91*3f2dd94aSFrançois Tigeot 92*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(vbt_firmware, charp, 0400, 93*3f2dd94aSFrançois Tigeot "Load VBT from specified file under /lib/firmware"); 94ba55f2f5SFrançois Tigeot 951e12ee3bSFrançois Tigeot #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) 96*3f2dd94aSFrançois Tigeot i915_param_named(error_capture, bool, 0600, 971e12ee3bSFrançois Tigeot "Record the GPU state following a hang. " 981e12ee3bSFrançois Tigeot "This information in /sys/class/drm/card<N>/error is vital for " 991e12ee3bSFrançois Tigeot "triaging and debugging hangs."); 1001e12ee3bSFrançois Tigeot #endif 1011e12ee3bSFrançois Tigeot 102*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_hangcheck, bool, 0644, 103ba55f2f5SFrançois Tigeot "Periodically check GPU activity for detecting hangs. " 104ba55f2f5SFrançois Tigeot "WARNING: Disabling this can cause system wide hangs. " 105ba55f2f5SFrançois Tigeot "(default: true)"); 106ba55f2f5SFrançois Tigeot 107*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.enable_ppgtt", &i915_modparams.enable_ppgtt); 108*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_ppgtt, int, 0400, 109ba55f2f5SFrançois Tigeot "Override PPGTT usage. " 110aee94f86SFrançois Tigeot "(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)"); 111ba55f2f5SFrançois Tigeot 112*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.enable_execlists", &i915_modparams.enable_execlists); 113*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_execlists, int, 0400, 1141b13d190SFrançois Tigeot "Override execlists usage. " 1152c9916cdSFrançois Tigeot "(-1=auto [default], 0=disabled, 1=enabled)"); 1161b13d190SFrançois Tigeot 117*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.enable_psr", &i915_modparams.enable_psr); 118*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_psr, int, 0600, 119*3f2dd94aSFrançois Tigeot "Enable PSR " 120c0e85e96SFrançois Tigeot "(0=disabled, 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode) " 121c0e85e96SFrançois Tigeot "Default: -1 (use per-chip default)"); 122ba55f2f5SFrançois Tigeot 123*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(alpha_support, bool, 0400, 1244be47400SFrançois Tigeot "Enable alpha quality driver support for latest hardware. " 1254be47400SFrançois Tigeot "See also CONFIG_DRM_I915_ALPHA_SUPPORT."); 126ba55f2f5SFrançois Tigeot 127*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(disable_power_well, int, 0400, 128352ff8bdSFrançois Tigeot "Disable display power wells when possible " 129352ff8bdSFrançois Tigeot "(-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)"); 130ba55f2f5SFrançois Tigeot 131*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_ips, int, 0600, "Enable IPS (default: true)"); 132ba55f2f5SFrançois Tigeot 133*3f2dd94aSFrançois Tigeot i915_param_named(fastboot, bool, 0600, 134ba55f2f5SFrançois Tigeot "Try to skip unnecessary mode sets at boot time (default: false)"); 135ba55f2f5SFrançois Tigeot 136*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(prefault_disable, bool, 0600, 137ba55f2f5SFrançois Tigeot "Disable page prefaulting for pread/pwrite/reloc (default:false). " 138ba55f2f5SFrançois Tigeot "For developers only."); 139ba55f2f5SFrançois Tigeot 140*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(load_detect_test, bool, 0600, 141477eb7f9SFrançois Tigeot "Force-enable the VGA load detect code for testing (default:false). " 142477eb7f9SFrançois Tigeot "For developers only."); 143477eb7f9SFrançois Tigeot 144*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(force_reset_modeset_test, bool, 0600, 14571f41f3eSFrançois Tigeot "Force a modeset during gpu reset for testing (default:false). " 14671f41f3eSFrançois Tigeot "For developers only."); 14771f41f3eSFrançois Tigeot 148*3f2dd94aSFrançois Tigeot TUNABLE_INT("drm.i915.panel_invert_brightness", &i915_modparams.invert_brightness); 149*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(invert_brightness, int, 0600, 150ba55f2f5SFrançois Tigeot "Invert backlight brightness " 151ba55f2f5SFrançois Tigeot "(-1 force normal, 0 machine defaults, 1 force inversion), please " 152ba55f2f5SFrançois Tigeot "report PCI device ID, subsystem vendor and subsystem device ID " 153ba55f2f5SFrançois Tigeot "to dri-devel@lists.freedesktop.org, if your machine needs it. " 154ba55f2f5SFrançois Tigeot "It will then be included in an upcoming module version."); 155ba55f2f5SFrançois Tigeot 156*3f2dd94aSFrançois Tigeot i915_param_named(disable_display, bool, 0400, 157*3f2dd94aSFrançois Tigeot "Disable display (default: false)"); 158ba55f2f5SFrançois Tigeot 159*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_cmd_parser, bool, 0400, 160a85cb24fSFrançois Tigeot "Enable command parsing (true=enabled [default], false=disabled)"); 16124edb884SFrançois Tigeot 162*3f2dd94aSFrançois Tigeot i915_param_named(mmio_debug, int, 0600, 163477eb7f9SFrançois Tigeot "Enable the MMIO debug code for the first N failures (default: off). " 164477eb7f9SFrançois Tigeot "This may negatively affect performance."); 1652c9916cdSFrançois Tigeot 166*3f2dd94aSFrançois Tigeot i915_param_named(verbose_state_checks, bool, 0600, 1672c9916cdSFrançois Tigeot "Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions."); 1682c9916cdSFrançois Tigeot 169*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(nuclear_pageflip, bool, 0400, 170a85cb24fSFrançois Tigeot "Force enable atomic functionality on platforms that don't have full support yet."); 171352ff8bdSFrançois Tigeot 17219c468b4SFrançois Tigeot /* WA to get away with the default setting in VBT for early platforms.Will be removed */ 173*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(edp_vswing, int, 0400, 17419c468b4SFrançois Tigeot "Ignore/Override vswing pre-emph table selection from VBT " 17519c468b4SFrançois Tigeot "(0=use value from vbt [default], 1=low power swing(200mV)," 17619c468b4SFrançois Tigeot "2=default swing(400mV))"); 177a05eeebfSFrançois Tigeot 178*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_guc_loading, int, 0400, 1791487f786SFrançois Tigeot "Enable GuC firmware loading " 180bf017597SFrançois Tigeot "(-1=auto, 0=never [default], 1=if available, 2=required)"); 1811487f786SFrançois Tigeot 182*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_guc_submission, int, 0400, 1831487f786SFrançois Tigeot "Enable GuC submission " 184bf017597SFrançois Tigeot "(-1=auto, 0=never [default], 1=if available, 2=required)"); 185a05eeebfSFrançois Tigeot 186*3f2dd94aSFrançois Tigeot i915_param_named(guc_log_level, int, 0400, 187a05eeebfSFrançois Tigeot "GuC firmware logging level (-1:disabled (default), 0-3:enabled)"); 1888621f407SFrançois Tigeot 189*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(guc_firmware_path, charp, 0400, 190a85cb24fSFrançois Tigeot "GuC firmware path to use instead of the default one"); 191a85cb24fSFrançois Tigeot 192*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(huc_firmware_path, charp, 0400, 193a85cb24fSFrançois Tigeot "HuC firmware path to use instead of the default one"); 194a85cb24fSFrançois Tigeot 195*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(enable_dp_mst, bool, 0600, 1968621f407SFrançois Tigeot "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)"); 197*3f2dd94aSFrançois Tigeot 198*3f2dd94aSFrançois Tigeot i915_param_named_unsafe(inject_load_failure, uint, 0400, 1998621f407SFrançois Tigeot "Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)"); 200*3f2dd94aSFrançois Tigeot 201*3f2dd94aSFrançois Tigeot i915_param_named(enable_dpcd_backlight, bool, 0600, 2021487f786SFrançois Tigeot "Enable support for DPCD backlight control (default:false)"); 2031487f786SFrançois Tigeot 204*3f2dd94aSFrançois Tigeot i915_param_named(enable_gvt, bool, 0400, 2051487f786SFrançois Tigeot "Enable support for Intel GVT-g graphics virtualization host support(default:false)"); 206