2014-01-21 09:24:25 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2014 Intel Corporation
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
* of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
|
* IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2015-12-18 11:08:15 +00:00
|
|
|
#include "i915_params.h"
|
2014-01-21 09:24:25 +00:00
|
|
|
#include "i915_drv.h"
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
#define i915_param_named(name, T, perm, desc) \
|
2017-09-19 19:38:44 +00:00
|
|
|
module_param_named(name, i915_modparams.name, T, perm); \
|
2017-09-14 15:08:03 +00:00
|
|
|
MODULE_PARM_DESC(name, desc)
|
|
|
|
#define i915_param_named_unsafe(name, T, perm, desc) \
|
2017-09-19 19:38:44 +00:00
|
|
|
module_param_named_unsafe(name, i915_modparams.name, T, perm); \
|
2017-09-14 15:08:03 +00:00
|
|
|
MODULE_PARM_DESC(name, desc)
|
2017-09-14 15:08:02 +00:00
|
|
|
|
2017-09-19 19:38:44 +00:00
|
|
|
struct i915_params i915_modparams __read_mostly = {
|
2017-09-25 10:50:07 +00:00
|
|
|
#define MEMBER(T, member, value) .member = (value),
|
|
|
|
I915_PARAMS_FOR_EACH(MEMBER)
|
|
|
|
#undef MEMBER
|
2014-01-21 09:24:25 +00:00
|
|
|
};
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(modeset, int, 0400,
|
2015-06-23 11:57:47 +00:00
|
|
|
"Use kernel modesetting [KMS] (0=disable, "
|
2014-01-21 09:24:25 +00:00
|
|
|
"1=on, -1=force vga console preference [default])");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(panel_ignore_lid, int, 0600,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Override lid status (0=autodetect, 1=autodetect disabled [default], "
|
|
|
|
"-1=force lid closed, -2=force lid open)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_dc, int, 0400,
|
2015-11-16 14:01:06 +00:00
|
|
|
"Enable power-saving display C-states. "
|
|
|
|
"(-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_fbc, int, 0600,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Enable frame buffer compression for power savings "
|
|
|
|
"(default: -1 (use per-chip default))");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(lvds_channel_mode, int, 0400,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Specify LVDS channel mode "
|
|
|
|
"(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(panel_use_ssc, int, 0600,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Use Spread Spectrum Clock with panels [LVDS/eDP] "
|
|
|
|
"(default: auto from VBT)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(vbt_sdvo_panel_type, int, 0400,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Override/Ignore selection of SDVO panel mode in the VBT "
|
|
|
|
"(-2=ignore, -1=auto [default], index in VBT BIOS table)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(reset, int, 0600,
|
|
|
|
"Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])");
|
2014-01-21 09:24:25 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(vbt_firmware, charp, 0400,
|
|
|
|
"Load VBT from specified file under /lib/firmware");
|
2017-08-17 11:52:09 +00:00
|
|
|
|
2016-10-12 09:05:18 +00:00
|
|
|
#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR)
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(error_capture, bool, 0600,
|
2016-10-12 09:05:18 +00:00
|
|
|
"Record the GPU state following a hang. "
|
|
|
|
"This information in /sys/class/drm/card<N>/error is vital for "
|
|
|
|
"triaging and debugging hangs.");
|
|
|
|
#endif
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_hangcheck, bool, 0644,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Periodically check GPU activity for detecting hangs. "
|
|
|
|
"WARNING: Disabling this can cause system wide hangs. "
|
|
|
|
"(default: true)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_ppgtt, int, 0400,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Override PPGTT usage. "
|
2015-09-30 14:36:19 +00:00
|
|
|
"(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)");
|
2014-01-21 09:24:25 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_psr, int, 0600,
|
|
|
|
"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)");
|
2014-01-21 09:24:25 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(alpha_support, bool, 0400,
|
2016-10-31 10:18:28 +00:00
|
|
|
"Enable alpha quality driver support for latest hardware. "
|
|
|
|
"See also CONFIG_DRM_I915_ALPHA_SUPPORT.");
|
2014-01-21 09:24:25 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(disable_power_well, int, 0400,
|
2015-11-05 21:04:11 +00:00
|
|
|
"Disable display power wells when possible "
|
|
|
|
"(-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)");
|
2014-01-21 09:24:25 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_ips, int, 0600, "Enable IPS (default: true)");
|
2014-01-21 09:24:25 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(fastboot, bool, 0600,
|
2015-11-19 08:26:30 +00:00
|
|
|
"Try to skip unnecessary mode sets at boot time (default: false)");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(prefault_disable, bool, 0600,
|
2014-01-21 09:24:25 +00:00
|
|
|
"Disable page prefaulting for pread/pwrite/reloc (default:false). "
|
|
|
|
"For developers only.");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(load_detect_test, bool, 0600,
|
2015-03-03 17:03:47 +00:00
|
|
|
"Force-enable the VGA load detect code for testing (default:false). "
|
|
|
|
"For developers only.");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(force_reset_modeset_test, bool, 0600,
|
2016-08-05 20:28:28 +00:00
|
|
|
"Force a modeset during gpu reset for testing (default:false). "
|
|
|
|
"For developers only.");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(invert_brightness, int, 0600,
|
2014-01-21 09:24:25 +00:00
|
|
|
"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@lists.freedesktop.org, if your machine needs it. "
|
|
|
|
"It will then be included in an upcoming module version.");
|
2014-02-10 17:20:55 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(disable_display, bool, 0400,
|
|
|
|
"Disable display (default: false)");
|
2014-02-18 18:15:46 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_cmd_parser, bool, 0400,
|
|
|
|
"Enable command parsing (true=enabled [default], false=disabled)");
|
drm/i915: Replaced Blitter ring based flips with MMIO flips
This patch enables the framework for using MMIO based flip calls,
in contrast with the CS based flip calls which are being used currently.
MMIO based flip calls can be enabled on architectures where
Render and Blitter engines reside in different power wells. The
decision to use MMIO flips can be made based on workloads to give
100% residency for Media power well.
v2: The MMIO flips now use the interrupt driven mechanism for issuing the
flips when target seqno is reached. (Incorporating Ville's idea)
v3: Rebasing on latest code. Code restructuring after incorporating
Damien's comments
v4: Addressing Ville's review comments
-general cleanup
-updating only base addr instead of calling update_primary_plane
-extending patch for gen5+ platforms
v5: Addressed Ville's review comments
-Making mmio flip vs cs flip selection based on module parameter
-Adding check for DRIVER_MODESET feature in notify_ring before calling
notify mmio flip.
-Other changes mostly in function arguments
v6: -Having a seperate function to check condition for using mmio flips (Ville)
-propogating error code from i915_gem_check_olr (Ville)
v7: -Adding __must_check with i915_gem_check_olr (Chris)
-Renaming mmio_flip_data to mmio_flip (Chris)
-Rebasing on latest nightly
v8: -Rebasing on latest code
-squash 3rd patch in series(mmio setbase vs page flip race) with this patch
-Added new tiling mode update in intel_do_mmio_flip (Chris)
v9: -check for obj->last_write_seqno being 0 instead of obj->ring being NULL in
intel_postpone_flip, as this is a more restrictive condition (Chris)
v10: -Applied Chris's suggestions for squashing patches 2,3 into this patch.
These patches make the selection of CS vs MMIO flip at the page flip time, and
make the module parameter for using mmio flips as tristate, the states being
'force CS flips', 'force mmio flips', 'driver discretion'.
Changed the logic for driver discretion (Chris)
v11: Minor code cleanup(better readability, fixing whitespace errors, using
lockdep to check mutex locked status in postpone_flip, removal of __must_check
in function definition) (Chris)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Sourab Gupta <sourab.gupta@intel.com>
Signed-off-by: Akash Goel <akash.goel@intel.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk> # snb, ivb
[danvet: Fix up parameter alignement checkpatch spotted.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-02 11:17:17 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(mmio_debug, int, 0600,
|
2014-12-18 10:55:50 +00:00
|
|
|
"Enable the MMIO debug code for the first N failures (default: off). "
|
|
|
|
"This may negatively affect performance.");
|
2014-12-15 18:56:32 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(verbose_state_checks, bool, 0600,
|
2014-12-15 18:56:32 +00:00
|
|
|
"Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions.");
|
2015-01-23 00:53:12 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(nuclear_pageflip, bool, 0400,
|
|
|
|
"Force enable atomic functionality on platforms that don't have full support yet.");
|
2015-08-26 07:29:56 +00:00
|
|
|
|
2015-05-06 12:05:48 +00:00
|
|
|
/* WA to get away with the default setting in VBT for early platforms.Will be removed */
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(edp_vswing, int, 0400,
|
|
|
|
"Ignore/Override vswing pre-emph table selection from VBT "
|
|
|
|
"(0=use value from vbt [default], 1=low power swing(200mV),"
|
|
|
|
"2=default swing(400mV))");
|
|
|
|
|
2017-12-06 13:53:15 +00:00
|
|
|
i915_param_named_unsafe(enable_guc, int, 0400,
|
|
|
|
"Enable GuC load for GuC submission and/or HuC load. "
|
|
|
|
"Required functionality can be selected using bitmask values. "
|
|
|
|
"(-1=auto, 0=disable [default], 1=GuC submission, 2=HuC load)");
|
2017-09-14 15:08:03 +00:00
|
|
|
|
|
|
|
i915_param_named(guc_log_level, int, 0400,
|
2015-07-09 18:29:03 +00:00
|
|
|
"GuC firmware logging level (-1:disabled (default), 0-3:enabled)");
|
2016-03-15 15:14:05 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(guc_firmware_path, charp, 0400,
|
2017-03-14 14:28:14 +00:00
|
|
|
"GuC firmware path to use instead of the default one");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(huc_firmware_path, charp, 0400,
|
2017-03-14 14:28:14 +00:00
|
|
|
"HuC firmware path to use instead of the default one");
|
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named_unsafe(enable_dp_mst, bool, 0600,
|
2016-03-15 15:14:05 +00:00
|
|
|
"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");
|
2017-09-14 15:08:03 +00:00
|
|
|
|
|
|
|
i915_param_named_unsafe(inject_load_failure, uint, 0400,
|
2016-03-16 11:39:08 +00:00
|
|
|
"Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)");
|
2017-09-14 15:08:03 +00:00
|
|
|
|
|
|
|
i915_param_named(enable_dpcd_backlight, bool, 0600,
|
2017-07-20 09:25:17 +00:00
|
|
|
"Enable support for DPCD backlight control (default:false)");
|
drm/i915: gvt: Introduce the basic architecture of GVT-g
This patch introduces the very basic framework of GVT-g device model,
includes basic prototypes, definitions, initialization.
v12:
- Call intel_gvt_init() in driver early initialization stage. (Chris)
v8:
- Remove the GVT idr and mutex in intel_gvt_host. (Joonas)
v7:
- Refine the URL link in Kconfig. (Joonas)
- Refine the introduction of GVT-g host support in Kconfig. (Joonas)
- Remove the macro GVT_ALIGN(), use round_down() instead. (Joonas)
- Make "struct intel_gvt" a data member in struct drm_i915_private.(Joonas)
- Remove {alloc, free}_gvt_device()
- Rename intel_gvt_{create, destroy}_gvt_device()
- Expost intel_gvt_init_host()
- Remove the dummy "struct intel_gvt" declaration in intel_gvt.h (Joonas)
v6:
- Refine introduction in Kconfig. (Chris)
- The exposed API functions will take struct intel_gvt * instead of
void *. (Chris/Tvrtko)
- Remove most memebers of strct intel_gvt_device_info. Will add them
in the device model patches.(Chris)
- Remove gvt_info() and gvt_err() in debug.h. (Chris)
- Move GVT kernel parameter into i915_params. (Chris)
- Remove include/drm/i915_gvt.h, as GVT-g will be built within i915.
- Remove the redundant struct i915_gvt *, as the functions in i915
will directly take struct intel_gvt *.
- Add more comments for reviewer.
v5:
Take Tvrtko's comments:
- Fix the misspelled words in Kconfig
- Let functions take drm_i915_private * instead of struct drm_device *
- Remove redundant prints/local varible initialization
v3:
Take Joonas' comments:
- Change file name i915_gvt.* to intel_gvt.*
- Move GVT kernel parameter into intel_gvt.c
- Remove redundant debug macros
- Change error handling style
- Add introductions for some stub functions
- Introduce drm/i915_gvt.h.
Take Kevin's comments:
- Move GVT-g host/guest check into intel_vgt_balloon in i915_gem_gtt.c
v2:
- Introduce i915_gvt.c.
It's necessary to introduce the stubs between i915 driver and GVT-g host,
as GVT-g components is configurable in kernel config. When disabled, the
stubs here do nothing.
Take Joonas' comments:
- Replace boolean return value with int.
- Replace customized info/warn/debug macros with DRM macros.
- Document all non-static functions like i915.
- Remove empty and unused functions.
- Replace magic number with marcos.
- Set GVT-g in kernel config to "n" by default.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466078825-6662-5-git-send-email-zhi.a.wang@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-16 12:07:00 +00:00
|
|
|
|
2017-09-14 15:08:03 +00:00
|
|
|
i915_param_named(enable_gvt, bool, 0400,
|
drm/i915: gvt: Introduce the basic architecture of GVT-g
This patch introduces the very basic framework of GVT-g device model,
includes basic prototypes, definitions, initialization.
v12:
- Call intel_gvt_init() in driver early initialization stage. (Chris)
v8:
- Remove the GVT idr and mutex in intel_gvt_host. (Joonas)
v7:
- Refine the URL link in Kconfig. (Joonas)
- Refine the introduction of GVT-g host support in Kconfig. (Joonas)
- Remove the macro GVT_ALIGN(), use round_down() instead. (Joonas)
- Make "struct intel_gvt" a data member in struct drm_i915_private.(Joonas)
- Remove {alloc, free}_gvt_device()
- Rename intel_gvt_{create, destroy}_gvt_device()
- Expost intel_gvt_init_host()
- Remove the dummy "struct intel_gvt" declaration in intel_gvt.h (Joonas)
v6:
- Refine introduction in Kconfig. (Chris)
- The exposed API functions will take struct intel_gvt * instead of
void *. (Chris/Tvrtko)
- Remove most memebers of strct intel_gvt_device_info. Will add them
in the device model patches.(Chris)
- Remove gvt_info() and gvt_err() in debug.h. (Chris)
- Move GVT kernel parameter into i915_params. (Chris)
- Remove include/drm/i915_gvt.h, as GVT-g will be built within i915.
- Remove the redundant struct i915_gvt *, as the functions in i915
will directly take struct intel_gvt *.
- Add more comments for reviewer.
v5:
Take Tvrtko's comments:
- Fix the misspelled words in Kconfig
- Let functions take drm_i915_private * instead of struct drm_device *
- Remove redundant prints/local varible initialization
v3:
Take Joonas' comments:
- Change file name i915_gvt.* to intel_gvt.*
- Move GVT kernel parameter into intel_gvt.c
- Remove redundant debug macros
- Change error handling style
- Add introductions for some stub functions
- Introduce drm/i915_gvt.h.
Take Kevin's comments:
- Move GVT-g host/guest check into intel_vgt_balloon in i915_gem_gtt.c
v2:
- Introduce i915_gvt.c.
It's necessary to introduce the stubs between i915 driver and GVT-g host,
as GVT-g components is configurable in kernel config. When disabled, the
stubs here do nothing.
Take Joonas' comments:
- Replace boolean return value with int.
- Replace customized info/warn/debug macros with DRM macros.
- Document all non-static functions like i915.
- Remove empty and unused functions.
- Replace magic number with marcos.
- Set GVT-g in kernel config to "n" by default.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466078825-6662-5-git-send-email-zhi.a.wang@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-16 12:07:00 +00:00
|
|
|
"Enable support for Intel GVT-g graphics virtualization host support(default:false)");
|