kernel-5.15/i915_hack_bug_97822.patch

55 lines
1.7 KiB
Diff
Raw Normal View History

A hack used when investigating https://bugs.freedesktop.org/show_bug.cgi?id=97822.
From 8f6bd6297a9c62f03aa3ff3855ff4a159fddd55a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
Date: Thu, 6 Oct 2016 18:30:38 +0300
Subject: [PATCH] drm/i915/hack: Abuse i915.vbt_sdvo_panel_type also for
LVDS/eDP/DSI
---
drivers/gpu/drm/i915/intel_bios.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 1f8af87..0404478 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -218,19 +218,25 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
dev_priv->vbt.lvds_dither = lvds_options->pixel_dither;
- ret = intel_opregion_get_panel_type(dev_priv);
- if (ret >= 0) {
- WARN_ON(ret > 0xf);
- panel_type = ret;
- DRM_DEBUG_KMS("Panel type: %d (OpRegion)\n", panel_type);
- } else {
- if (lvds_options->panel_type > 0xf) {
- DRM_DEBUG_KMS("Invalid VBT panel type 0x%x\n",
- lvds_options->panel_type);
- return;
+ panel_type = i915.vbt_sdvo_panel_type;
+ if (panel_type == -2)
+ return;
+
+ if (panel_type < 0) {
+ ret = intel_opregion_get_panel_type(dev_priv);
+ if (ret >= 0) {
+ WARN_ON(ret > 0xf);
+ panel_type = ret;
+ DRM_DEBUG_KMS("Panel type: %d (OpRegion)\n", panel_type);
+ } else {
+ if (lvds_options->panel_type > 0xf) {
+ DRM_DEBUG_KMS("Invalid VBT panel type 0x%x\n",
+ lvds_options->panel_type);
+ return;
+ }
+ panel_type = lvds_options->panel_type;
+ DRM_DEBUG_KMS("Panel type: %d (VBT)\n", panel_type);
}
- panel_type = lvds_options->panel_type;
- DRM_DEBUG_KMS("Panel type: %d (VBT)\n", panel_type);
}
dev_priv->vbt.panel_type = panel_type;