From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com ([134.134.136.65]:32102 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761832AbcINHpc (ORCPT ); Wed, 14 Sep 2016 03:45:32 -0400 Date: Wed, 14 Sep 2016 10:45:15 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jani Nikula 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: [Intel-gfx] [PATCH] drm/i915: Ignore OpRegion panel type except on select machines Message-ID: <20160914074515.GL4329@intel.com> References: <1473758539-21565-1-git-send-email-ville.syrjala@linux.intel.com> <87k2egta2b.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87k2egta2b.fsf@intel.com> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Sep 13, 2016 at 12:37:16PM +0300, Jani Nikula wrote: > On Tue, 13 Sep 2016, ville.syrjala@linux.intel.com wrote: > > From: Ville Syrj�l� > > > > Turns out > > commit a05628195a0d ("drm/i915: Get panel_type from OpRegion panel > > details") has regressed quite a few machines. So it looks like we > > can't use the panel type from OpRegion on all systems, and yet we > > absolutely must use it on some specific systems. > > > > Despite trying, I was unable to find any automagic way to determine > > if the OpRegion panel type is respectable or not. The only glimmer > > of hope I had was bit 8 in the SCIC response, but that turned out to > > not work either (it was always 0 on both types of systems). > > > > So, to fix the regressions without breaking the machine we know to need > > the OpRegion panel type, let's just add a quirk for this. Only specific > > machines known to require the OpRegion panel type will therefore use > > it. Everyone else will fall bck to the VBT panel type. > > > > The only known machine so far is a "Conrac GmbH IX45GM2". The PCI > > subsystem ID on this machine is just a generic 8086:2a42, so of no use. > > Instead we'll go with a DMI match. > > > > I suspect we can now also revert > > commit aeddda06c1a7 ("drm/i915: Ignore panel type from OpRegion on SKL") > > but let's leave that to a separate patch. > > > > v2: Do the DMI match in the opregion code directly, as dev_priv->quirks > > gets populated too late > > > > Cc: Rob Kramer > > Cc: Martin van Es > > Cc: Andrea Arcangeli > > Cc: Dave Airlie > > Cc: Marco Kr�ger > > Cc: Sean Greenslade > > Cc: Trudy Tective > > Cc: Robin M�ller > > Cc: Alexander Kobel > > Cc: Alexey Shumitsky > > Cc: Emil Andersen Lauridsen > > Cc: oceans112@gmail.com > > Cc: James Hogan > > Cc: James Bottomley > > Cc: stable@vger.kernel.org > > References: https://lists.freedesktop.org/archives/intel-gfx/2016-August/105545.html > > References: https://lists.freedesktop.org/archives/dri-devel/2016-August/116888.html > > References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html > > References: http://patchwork.freedesktop.org/patch/msgid/1473602239-15855-1-git-send-email-adrienverge@gmail.com > > Acked-by: Jani Nikula > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94825 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97060 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97443 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97363 > > Fixes: a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") > > 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� Slapped on another tested-by and pushed to dinq. Thanks for the broad testing, everyone. > > --- > > 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 > > -- > Jani Nikula, Intel Open Source Technology Center -- Ville Syrj�l� Intel OTC