]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.1/drm-gma500-cdv-check-vbt-config-bits-when-detecting-lvds-panels.patch
8a0e758a22421ffb0e2e1e5e24ae95c0946abbaf
[thirdparty/kernel/stable-queue.git] / queue-5.1 / drm-gma500-cdv-check-vbt-config-bits-when-detecting-lvds-panels.patch
1 From 7c420636860a719049fae9403e2c87804f53bdde Mon Sep 17 00:00:00 2001
2 From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
3 Date: Tue, 16 Apr 2019 13:46:07 +0200
4 Subject: drm/gma500/cdv: Check vbt config bits when detecting lvds panels
5
6 From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
7
8 commit 7c420636860a719049fae9403e2c87804f53bdde upstream.
9
10 Some machines have an lvds child device in vbt even though a panel is
11 not attached. To make detection more reliable we now also check the lvds
12 config bits available in the vbt.
13
14 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1665766
15 Cc: stable@vger.kernel.org
16 Reviewed-by: Hans de Goede <hdegoede@redhat.com>
17 Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
18 Link: https://patchwork.freedesktop.org/patch/msgid/20190416114607.1072-1-patrik.r.jakobsson@gmail.com
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 +++
23 drivers/gpu/drm/gma500/intel_bios.c | 3 +++
24 drivers/gpu/drm/gma500/psb_drv.h | 1 +
25 3 files changed, 7 insertions(+)
26
27 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
28 +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
29 @@ -594,6 +594,9 @@ void cdv_intel_lvds_init(struct drm_devi
30 int pipe;
31 u8 pin;
32
33 + if (!dev_priv->lvds_enabled_in_vbt)
34 + return;
35 +
36 pin = GMBUS_PORT_PANEL;
37 if (!lvds_is_present_in_vbt(dev, &pin)) {
38 DRM_DEBUG_KMS("LVDS is not present in VBT\n");
39 --- a/drivers/gpu/drm/gma500/intel_bios.c
40 +++ b/drivers/gpu/drm/gma500/intel_bios.c
41 @@ -436,6 +436,9 @@ parse_driver_features(struct drm_psb_pri
42 if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
43 dev_priv->edp.support = 1;
44
45 + dev_priv->lvds_enabled_in_vbt = driver->lvds_config != 0;
46 + DRM_DEBUG_KMS("LVDS VBT config bits: 0x%x\n", driver->lvds_config);
47 +
48 /* This bit means to use 96Mhz for DPLL_A or not */
49 if (driver->primary_lfp_id)
50 dev_priv->dplla_96mhz = true;
51 --- a/drivers/gpu/drm/gma500/psb_drv.h
52 +++ b/drivers/gpu/drm/gma500/psb_drv.h
53 @@ -537,6 +537,7 @@ struct drm_psb_private {
54 int lvds_ssc_freq;
55 bool is_lvds_on;
56 bool is_mipi_on;
57 + bool lvds_enabled_in_vbt;
58 u32 mipi_ctrl_display;
59
60 unsigned int core_freq;