diff mbox series

[1/1,SRU,OEM-5.10] UBUNTU: SAUCE: drm/i915/dp add a quirk for backlight issue

Message ID 20210412082802.162849-2-acelan.kao@canonical.com
State New
Headers show
Series Can't adjust brightness on HP ZBook Fury 17 G7 | expand

Commit Message

AceLan Kao April 12, 2021, 8:28 a.m. UTC
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1923000

It looks like below commit in oem-5.10 introduces the backlight regression
   ade9f1d9f14ef drm/i915/dp: Program source OUI on eDP panels
But it's not the culprit as mainline kernel doesn't have this issue.
So, adding a quirk on this commit to make it only affect on a certain Dell
platform to avoid the issue temporarily. Will figure out the problem and
submit a formal fix later.

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index e0dbf285b7b6a..78440d4224732 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -24,7 +24,7 @@ 
  *    Keith Packard <keithp@keithp.com>
  *
  */
-
+#include <linux/dmi.h>
 #include <linux/export.h>
 #include <linux/i2c.h>
 #include <linux/notifier.h>
@@ -154,6 +154,16 @@  static void vlv_steal_power_sequencer(struct drm_i915_private *dev_priv,
 				      enum pipe pipe);
 static void intel_dp_unset_edid(struct intel_dp *intel_dp);
 
+static const struct dmi_system_id dpcd_backlight_quirk[] = {
+	{
+	    .matches = {
+		    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+		    DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7560"),
+	    },
+	},
+	{},
+};
+
 /* update sink rates from dpcd */
 static void intel_dp_set_sink_rates(struct intel_dp *intel_dp)
 {
@@ -3554,7 +3564,8 @@  void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode)
 
 		/* Write the source OUI as early as possible */
 		if (intel_dp_is_edp(intel_dp))
-			intel_edp_init_source_oui(intel_dp, false);
+			if (dmi_check_system(dpcd_backlight_quirk))
+				intel_edp_init_source_oui(intel_dp, false);
 
 		/*
 		 * When turning on, we need to retry for 1ms to give the sink