[Intel-gfx] [PATCH] drm/i915: Kill cross-module option depencies
Jani Nikula
jani.nikula at linux.intel.com
Tue Jun 30 01:00:50 PDT 2015
On Mon, 29 Jun 2015, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> Makes it really hard to reason about these since there are dependency
> loops. Also if you touch them and don't know what you're doing you get
> to keep all the pieces.
>
> Also sweep over all options and mark everything which isn't clearly
> just a harmless debug helper thing of one of the official functions to
> disable parts of the driver (modeset and disable_display are the only
> ones) as unsafe.
I'd prefer these split to a separate patch.
BR,
Jani.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
> drivers/gpu/drm/i915/i915_params.c | 30 +++++++++++++++---------------
> drivers/gpu/drm/i915/intel_lrc.c | 3 +--
> 3 files changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index b94eebe81fd8..0e171edb2f33 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -140,7 +140,7 @@ static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
> return 0;
> }
>
> - if (INTEL_INFO(dev)->gen >= 8 && i915.enable_execlists)
> + if (INTEL_INFO(dev)->gen >= 8)
> return 2;
> else
> return has_aliasing_ppgtt ? 1 : 0;
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 7983fe48a654..562622f36081 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -60,7 +60,7 @@ MODULE_PARM_DESC(modeset,
> "Use kernel modesetting [KMS] (0=disable, "
> "1=on, -1=force vga console preference [default])");
>
> -module_param_named(panel_ignore_lid, i915.panel_ignore_lid, int, 0600);
> +module_param_named_unsafe(panel_ignore_lid, i915.panel_ignore_lid, int, 0600);
> MODULE_PARM_DESC(panel_ignore_lid,
> "Override lid status (0=autodetect, 1=autodetect disabled [default], "
> "-1=force lid closed, -2=force lid open)");
> @@ -83,17 +83,17 @@ MODULE_PARM_DESC(enable_fbc,
> "Enable frame buffer compression for power savings "
> "(default: -1 (use per-chip default))");
>
> -module_param_named(lvds_channel_mode, i915.lvds_channel_mode, int, 0600);
> +module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0600);
> MODULE_PARM_DESC(lvds_channel_mode,
> "Specify LVDS channel mode "
> "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
>
> -module_param_named(lvds_use_ssc, i915.panel_use_ssc, int, 0600);
> +module_param_named_unsafe(lvds_use_ssc, i915.panel_use_ssc, int, 0600);
> MODULE_PARM_DESC(lvds_use_ssc,
> "Use Spread Spectrum Clock with panels [LVDS/eDP] "
> "(default: auto from VBT)");
>
> -module_param_named(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0600);
> +module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0600);
> MODULE_PARM_DESC(vbt_sdvo_panel_type,
> "Override/Ignore selection of SDVO panel mode in the VBT "
> "(-2=ignore, -1=auto [default], index in VBT BIOS table)");
> @@ -101,7 +101,7 @@ MODULE_PARM_DESC(vbt_sdvo_panel_type,
> module_param_named_unsafe(reset, i915.reset, bool, 0600);
> MODULE_PARM_DESC(reset, "Attempt GPU resets (default: true)");
>
> -module_param_named(enable_hangcheck, i915.enable_hangcheck, bool, 0644);
> +module_param_named_unsafe(enable_hangcheck, i915.enable_hangcheck, bool, 0644);
> MODULE_PARM_DESC(enable_hangcheck,
> "Periodically check GPU activity for detecting hangs. "
> "WARNING: Disabling this can cause system wide hangs. "
> @@ -112,26 +112,26 @@ MODULE_PARM_DESC(enable_ppgtt,
> "Override PPGTT usage. "
> "(-1=auto [default], 0=disabled, 1=aliasing, 2=full)");
>
> -module_param_named(enable_execlists, i915.enable_execlists, int, 0400);
> +module_param_named_unsafe(enable_execlists, i915.enable_execlists, int, 0400);
> MODULE_PARM_DESC(enable_execlists,
> "Override execlists usage. "
> "(-1=auto [default], 0=disabled, 1=enabled)");
>
> -module_param_named(enable_psr, i915.enable_psr, int, 0600);
> +module_param_named_unsafe(enable_psr, i915.enable_psr, int, 0600);
> MODULE_PARM_DESC(enable_psr, "Enable PSR (default: false)");
>
> -module_param_named(preliminary_hw_support, i915.preliminary_hw_support, int, 0600);
> +module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0600);
> MODULE_PARM_DESC(preliminary_hw_support,
> "Enable preliminary hardware support.");
>
> -module_param_named(disable_power_well, i915.disable_power_well, int, 0600);
> +module_param_named_unsafe(disable_power_well, i915.disable_power_well, int, 0600);
> MODULE_PARM_DESC(disable_power_well,
> "Disable the power well when possible (default: true)");
>
> -module_param_named(enable_ips, i915.enable_ips, int, 0600);
> +module_param_named_unsafe(enable_ips, i915.enable_ips, int, 0600);
> MODULE_PARM_DESC(enable_ips, "Enable IPS (default: true)");
>
> -module_param_named(fastboot, i915.fastboot, bool, 0600);
> +module_param_named_unsafe(fastboot, i915.fastboot, bool, 0600);
> MODULE_PARM_DESC(fastboot,
> "Try to skip unnecessary mode sets at boot time (default: false)");
>
> @@ -145,7 +145,7 @@ MODULE_PARM_DESC(load_detect_test,
> "Force-enable the VGA load detect code for testing (default:false). "
> "For developers only.");
>
> -module_param_named(invert_brightness, i915.invert_brightness, int, 0600);
> +module_param_named_unsafe(invert_brightness, i915.invert_brightness, int, 0600);
> MODULE_PARM_DESC(invert_brightness,
> "Invert backlight brightness "
> "(-1 force normal, 0 machine defaults, 1 force inversion), please "
> @@ -156,14 +156,14 @@ MODULE_PARM_DESC(invert_brightness,
> module_param_named(disable_display, i915.disable_display, bool, 0600);
> MODULE_PARM_DESC(disable_display, "Disable display (default: false)");
>
> -module_param_named(disable_vtd_wa, i915.disable_vtd_wa, bool, 0600);
> +module_param_named_unsafe(disable_vtd_wa, i915.disable_vtd_wa, bool, 0600);
> MODULE_PARM_DESC(disable_vtd_wa, "Disable all VT-d workarounds (default: false)");
>
> -module_param_named(enable_cmd_parser, i915.enable_cmd_parser, int, 0600);
> +module_param_named_unsafe(enable_cmd_parser, i915.enable_cmd_parser, int, 0600);
> MODULE_PARM_DESC(enable_cmd_parser,
> "Enable command parsing (1=enabled [default], 0=disabled)");
>
> -module_param_named(use_mmio_flip, i915.use_mmio_flip, int, 0600);
> +module_param_named_unsafe(use_mmio_flip, i915.use_mmio_flip, int, 0600);
> MODULE_PARM_DESC(use_mmio_flip,
> "use MMIO flips (-1=never, 0=driver discretion [default], 1=always)");
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 8cac4cab1666..2dad1851d30d 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -234,8 +234,7 @@ int intel_sanitize_enable_execlists(struct drm_device *dev, int enable_execlists
> if (enable_execlists == 0)
> return 0;
>
> - if (HAS_LOGICAL_RING_CONTEXTS(dev) && USES_PPGTT(dev) &&
> - i915.use_mmio_flip >= 0)
> + if (HAS_LOGICAL_RING_CONTEXTS(dev))
> return 1;
>
> return 0;
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list