Skip to content

Commit

Permalink
drm/gma500/cdv: Check vbt config bits when detecting lvds panels
Browse files Browse the repository at this point in the history
commit 7c42063 upstream.

Some machines have an lvds child device in vbt even though a panel is
not attached. To make detection more reliable we now also check the lvds
config bits available in the vbt.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1665766
Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190416114607.1072-1-patrik.r.jakobsson@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Patrik Jakobsson authored and Greg Kroah-Hartman committed Jun 11, 2019
1 parent e087f75 commit 0f5fab8
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/gma500/cdv_intel_lvds.c
Original file line number Diff line number Diff line change
@@ -620,6 +620,9 @@ void cdv_intel_lvds_init(struct drm_device *dev,
int pipe;
u8 pin;

if (!dev_priv->lvds_enabled_in_vbt)
return;

pin = GMBUS_PORT_PANEL;
if (!lvds_is_present_in_vbt(dev, &pin)) {
DRM_DEBUG_KMS("LVDS is not present in VBT\n");
3 changes: 3 additions & 0 deletions drivers/gpu/drm/gma500/intel_bios.c
Original file line number Diff line number Diff line change
@@ -436,6 +436,9 @@ parse_driver_features(struct drm_psb_private *dev_priv,
if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
dev_priv->edp.support = 1;

dev_priv->lvds_enabled_in_vbt = driver->lvds_config != 0;
DRM_DEBUG_KMS("LVDS VBT config bits: 0x%x\n", driver->lvds_config);

/* This bit means to use 96Mhz for DPLL_A or not */
if (driver->primary_lfp_id)
dev_priv->dplla_96mhz = true;
1 change: 1 addition & 0 deletions drivers/gpu/drm/gma500/psb_drv.h
Original file line number Diff line number Diff line change
@@ -536,6 +536,7 @@ struct drm_psb_private {
int lvds_ssc_freq;
bool is_lvds_on;
bool is_mipi_on;
bool lvds_enabled_in_vbt;
u32 mipi_ctrl_display;

unsigned int core_freq;

0 comments on commit 0f5fab8

Please sign in to comment.