Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218099
b: refs/heads/master
c: 270eea0
h: refs/heads/master
i:
  218097: e827f8a
  218095: d560910
v: v3
  • Loading branch information
Chris Wilson committed Sep 24, 2010
1 parent 0495bee commit f67f2a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6c3a2a6d358a726c2c52cb0132c9ad8f6f37486
refs/heads/master: 270eea0fd71ae95654606ff7448f195fa22d12c5
21 changes: 13 additions & 8 deletions trunk/drivers/gpu/drm/i915/intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,8 @@ static void intel_find_lvds_downclock(struct drm_device *dev,
* If it is not present, return false.
* If no child dev is parsed from VBT, it assumes that the LVDS is present.
*/
static bool lvds_is_present_in_vbt(struct drm_device *dev)
static bool lvds_is_present_in_vbt(struct drm_device *dev,
u8 *i2c_pin)
{
struct drm_i915_private *dev_priv = dev->dev_private;
int i;
Expand All @@ -790,6 +791,9 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
child->device_type != DEVICE_TYPE_LFP)
continue;

if (child->i2c_pin)
*i2c_pin = child->i2c_pin;

/* However, we cannot trust the BIOS writers to populate
* the VBT correctly. Since LVDS requires additional
* information from AIM blocks, a non-zero addin offset is
Expand All @@ -810,7 +814,7 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
return false;
}

static bool intel_lvds_ddc_probe(struct drm_device *dev)
static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u8 buf = 0;
Expand All @@ -822,7 +826,7 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev)
.buf = &buf,
},
};
struct i2c_adapter *i2c = &dev_priv->gmbus[GMBUS_PORT_PANEL].adapter;
struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter;
return i2c_transfer(i2c, msgs, 1) == 1;
}

Expand All @@ -844,13 +848,15 @@ void intel_lvds_init(struct drm_device *dev)
struct drm_display_mode *scan; /* *modes, *bios_mode; */
struct drm_crtc *crtc;
u32 lvds;
int pipe, gpio = GPIOC;
int pipe;
u8 pin;

/* Skip init on machines we know falsely report LVDS */
if (dmi_check_system(intel_no_lvds))
return;

if (!lvds_is_present_in_vbt(dev)) {
pin = GMBUS_PORT_PANEL;
if (!lvds_is_present_in_vbt(dev, &pin)) {
DRM_DEBUG_KMS("LVDS is not present in VBT\n");
return;
}
Expand All @@ -862,10 +868,9 @@ void intel_lvds_init(struct drm_device *dev)
DRM_DEBUG_KMS("disable LVDS for eDP support\n");
return;
}
gpio = PCH_GPIOC;
}

if (!intel_lvds_ddc_probe(dev)) {
if (!intel_lvds_ddc_probe(dev, pin)) {
DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n");
return;
}
Expand Down Expand Up @@ -930,7 +935,7 @@ void intel_lvds_init(struct drm_device *dev)
* preferred mode is the right one.
*/
intel_lvds->edid = drm_get_edid(connector,
&dev_priv->gmbus[GMBUS_PORT_PANEL].adapter);
&dev_priv->gmbus[pin].adapter);

if (!intel_lvds->edid) {
/* Didn't get an EDID, so
Expand Down

0 comments on commit f67f2a0

Please sign in to comment.