Skip to contentSkip to conversation

Patch "drm/i915: Ignore OpRegion panel type except on select machines" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Sep 22, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/i915: Ignore OpRegion panel type except on select machines

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-i915-ignore-opregion-panel-type-except-on-select-machines.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From ea54ff4008892b46c7a3e6bc8ab8aaec9d198639 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Tue, 13 Sep 2016 12:22:19 +0300
Subject: drm/i915: Ignore OpRegion panel type except on select machines
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Ville Syrjälä <[email protected]>

commit ea54ff4008892b46c7a3e6bc8ab8aaec9d198639 upstream.

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 <[email protected]>
Cc: Martin van Es <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Marco Krüger <[email protected]>
Cc: Sean Greenslade <[email protected]>
Cc: Trudy Tective <[email protected]>
Cc: Robin Müller <[email protected]>
Cc: Alexander Kobel <[email protected]>
Cc: Alexey Shumitsky <[email protected]>
Cc: Emil Andersen Lauridsen <[email protected]>
Cc: [email protected]
Cc: James Hogan <[email protected]>
Cc: James Bottomley <[email protected]>
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
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

References: http://patchwork.freedesktop.org/patch/msgid/[email protected]

(cherry picked from commit c8ebfad7a063fe665417fa0eeb0da7cfe987d8ed)
---
 drivers/gpu/drm/i915/intel_opregion.c |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/gpu/drm/i915/intel_opregion.c +27 -0
@@ -1013,6 +1013,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_device *dev)
 {
@@ -1038,6 +1055,16 @@ intel_opregion_get_panel_type(struct drm
 		return -ENODEV;
 	}
 
+	/*
+	 * 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

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/drm-i915-ignore-opregion-panel-type-except-on-select-machines.patch