[Intel-gfx] drm/i915: Ignore OpRegion panel type except on select machines

Adrien Vergé adrienverge at gmail.com
Thu Sep 15 12:10:37 UTC 2016


> Tested-by: Marco Krüger <krgsch at gmail.com>
> Tested-by: Alexey Shumitsky <alexey.shumitsky at gmail.com>
> Tested-by: Sean Greenslade <sean at seangreenslade.com>
> Tested-by: Emil Andersen Lauridsen <mine809 at gmail.com>
> Tested-by: Robin Müller <rm1990 at gmx.de>
> Tested-by: oceans112 at gmail.com
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Acked-by: Jani Nikula <jani.nikula at intel.com>
> Tested-by: James Hogan <james at albanarts.com>

That works for me too on Terra Mobile Ultrabook 1450 II.
Thanks!

Tested-by: Adrien Vergé <adrienverge at gmail.com>

> ---
>  drivers/gpu/drm/i915/intel_opregion.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index adca262d591a..7acbbbf97833 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -1047,6 +1047,23 @@ err_out:
>  	return err;
>  }
>  
> +static int intel_use_opregion_panel_type_callback(const struct dmi_system_id *id)
> +{
> +	DRM_INFO("Using panel type from OpRegion on %s\n", id->ident);
> +	return 1;
> +}
> +
> +static const struct dmi_system_id intel_use_opregion_panel_type[] = {
> +	{
> +		.callback = intel_use_opregion_panel_type_callback,
> +		.ident = "Conrac GmbH IX45GM2",
> +		.matches = {DMI_MATCH(DMI_SYS_VENDOR, "Conrac GmbH"),
> +			    DMI_MATCH(DMI_PRODUCT_NAME, "IX45GM2"),
> +		},
> +	},
> +	{ }
> +};
> +
>  int
>  intel_opregion_get_panel_type(struct drm_i915_private *dev_priv)
>  {
> @@ -1073,6 +1090,16 @@ intel_opregion_get_panel_type(struct drm_i915_private *dev_priv)
>  	}
>  
>  	/*
> +	 * So far we know that some machined must use it, others must not use it.
> +	 * There doesn't seem to be any way to determine which way to go, except
> +	 * via a quirk list :(
> +	 */
> +	if (!dmi_check_system(intel_use_opregion_panel_type)) {
> +		DRM_DEBUG_KMS("Ignoring OpRegion panel type (%d)\n", ret - 1);
> +		return -ENODEV;
> +	}
> +
> +	/*
>  	 * FIXME On Dell XPS 13 9350 the OpRegion panel type (0) gives us
>  	 * low vswing for eDP, whereas the VBT panel type (2) gives us normal
>  	 * vswing instead. Low vswing results in some display flickers, so


More information about the Intel-gfx mailing list