[PATCH 02/11] drm/i915: add config option to enable/disable DP MST
Jani Nikula
jani.nikula at linux.intel.com
Tue Sep 9 00:51:06 PDT 2014
On Tue, 09 Sep 2014, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Since DP MST has new userspace requirements and any effort at trying
> to shoehorn things into the something the current userspace can handle are
> doomed, lets just put this behind a config option.
>
> This also adds a command line arg to switch it on as well.
>
> Distros should probably turn it on when they have a new enough Xorg intel driver.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> drivers/gpu/drm/i915/Kconfig | 10 ++++++++++
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_params.c | 5 +++++
> drivers/gpu/drm/i915/intel_dp_mst.c | 3 +++
> 4 files changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index 4e39ab3..94a9094 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -69,3 +69,13 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
> option changes the default for that module option.
>
> If in doubt, say "N".
> +
> +config DRM_I915_DP_MST
> + bool "Enable DisplayPort 1.2 MST support by default"
> + depends on DRM_I915
> + default n
> + help
> + Choose this option if you want to support DP 1.2 MST and have a new
> + enough userspace to use it. DP 1.2 MST is required for multi-head
> + support on many laptop docks when combined with Haswell or later
> + chipsets.
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 7a830ea..86759ea 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2149,6 +2149,7 @@ struct i915_params {
> bool disable_vtd_wa;
> int use_mmio_flip;
> bool mmio_debug;
> + bool dp_mst;
> };
> extern struct i915_params i915 __read_mostly;
>
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 7f84dd26..973c773 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -50,6 +50,7 @@ struct i915_params i915 __read_mostly = {
> .disable_vtd_wa = 0,
> .use_mmio_flip = 0,
> .mmio_debug = 0,
> + .dp_mst = IS_ENABLED(CONFIG_DRM_I915_DP_MST),
> };
>
> module_param_named(modeset, i915.modeset, int, 0400);
> @@ -167,3 +168,7 @@ module_param_named(mmio_debug, i915.mmio_debug, bool, 0600);
> MODULE_PARM_DESC(mmio_debug,
> "Enable the MMIO debug code (default: false). This may negatively "
> "affect performance.");
> +
> +module_param_named(dp_mst, i915.dp_mst, bool, 0600);
The permissions should be 0400.
Jani.
> +MODULE_PARM_DESC(dp_mst,
> + "Enable DP MST support (1=enabled, 0=disabled, default depends on CONFIG_DRM_I915_DP_MST.");
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index d9a7a78..116b656 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -522,6 +522,9 @@ intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_ba
> struct drm_device *dev = intel_dig_port->base.base.dev;
> int ret;
>
> + if (i915.dp_mst == false)
> + return 0;
> +
> intel_dp->can_mst = true;
> intel_dp->mst_mgr.cbs = &mst_cbs;
>
> --
> 1.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Jani Nikula, Intel Open Source Technology Center
More information about the dri-devel
mailing list