From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:33279 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934145AbcIOMKl (ORCPT ); Thu, 15 Sep 2016 08:10:41 -0400 Received: by mail-lf0-f67.google.com with SMTP id l131so2080814lfl.0 for ; Thu, 15 Sep 2016 05:10:40 -0700 (PDT) Date: Thu, 15 Sep 2016 14:10:37 +0200 From: Adrien =?iso-8859-1?Q?Verg=E9?= To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org, Andrea Arcangeli , Sean Greenslade , Alexey Shumitsky , Martin van Es , Dave Airlie , James Hogan , stable@vger.kernel.org, Marco =?iso-8859-1?Q?Kr=FCger?= , Rob Kramer , Emil Andersen Lauridsen , Alexander Kobel , oceans112@gmail.com, James Bottomley , Robin =?iso-8859-1?Q?M=FCller?= , Trudy Tective Subject: Re: drm/i915: Ignore OpRegion panel type except on select machines Message-ID: <20160915121037.GA5357@terra> References: <1473758539-21565-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1473758539-21565-1-git-send-email-ville.syrjala@linux.intel.com> Sender: stable-owner@vger.kernel.org List-ID: > Tested-by: Marco Kr�ger > Tested-by: Alexey Shumitsky > Tested-by: Sean Greenslade > Tested-by: Emil Andersen Lauridsen > Tested-by: Robin M�ller > Tested-by: oceans112@gmail.com > Signed-off-by: Ville Syrj�l� > Acked-by: Jani Nikula > Tested-by: James Hogan That works for me too on Terra Mobile Ultrabook 1450 II. Thanks! Tested-by: Adrien Verg� > --- > 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