diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-13 10:41:01 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-13 10:41:01 -0400 |
commit | 78890b5989d96ddce989cde929c45ceeded0fcaf (patch) | |
tree | 4e2da81fc7c97f11aee174b1eedac110c9a68b3a /drivers/gpu/drm/i915/intel_crt.c | |
parent | 1959ec5f82acbdf91425b41600f119ebecb5f6a8 (diff) | |
parent | 55d512e245bc7699a8800e23df1a24195dd08217 (diff) |
Merge commit 'v3.6-rc5' into next
* commit 'v3.6-rc5': (1098 commits)
Linux 3.6-rc5
HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
Remove user-triggerable BUG from mpol_to_str
xen/pciback: Fix proper FLR steps.
uml: fix compile error in deliver_alarm()
dj: memory scribble in logi_dj
Fix order of arguments to compat_put_time[spec|val]
xen: Use correct masking in xen_swiotlb_alloc_coherent.
xen: fix logical error in tlb flushing
xen/p2m: Fix one-off error in checking the P2M tree directory.
powerpc: Don't use __put_user() in patch_instruction
powerpc: Make sure IPI handlers see data written by IPI senders
powerpc: Restore correct DSCR in context switch
powerpc: Fix DSCR inheritance in copy_thread()
powerpc: Keep thread.dscr and thread.dscr_inherit in sync
powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
powerpc/powernv: Always go into nap mode when CPU is offline
powerpc: Give hypervisor decrementer interrupts their own handler
powerpc/vphn: Fix arch_update_cpu_topology() return value
ARM: gemini: fix the gemini build
...
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/rapidio/devices/tsi721.c
Diffstat (limited to 'drivers/gpu/drm/i915/intel_crt.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 7ed4a41c3965..23bdc8cd1458 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -326,6 +326,36 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector) | |||
326 | return ret; | 326 | return ret; |
327 | } | 327 | } |
328 | 328 | ||
329 | static struct edid *intel_crt_get_edid(struct drm_connector *connector, | ||
330 | struct i2c_adapter *i2c) | ||
331 | { | ||
332 | struct edid *edid; | ||
333 | |||
334 | edid = drm_get_edid(connector, i2c); | ||
335 | |||
336 | if (!edid && !intel_gmbus_is_forced_bit(i2c)) { | ||
337 | DRM_DEBUG_KMS("CRT GMBUS EDID read failed, retry using GPIO bit-banging\n"); | ||
338 | intel_gmbus_force_bit(i2c, true); | ||
339 | edid = drm_get_edid(connector, i2c); | ||
340 | intel_gmbus_force_bit(i2c, false); | ||
341 | } | ||
342 | |||
343 | return edid; | ||
344 | } | ||
345 | |||
346 | /* local version of intel_ddc_get_modes() to use intel_crt_get_edid() */ | ||
347 | static int intel_crt_ddc_get_modes(struct drm_connector *connector, | ||
348 | struct i2c_adapter *adapter) | ||
349 | { | ||
350 | struct edid *edid; | ||
351 | |||
352 | edid = intel_crt_get_edid(connector, adapter); | ||
353 | if (!edid) | ||
354 | return 0; | ||
355 | |||
356 | return intel_connector_update_modes(connector, edid); | ||
357 | } | ||
358 | |||
329 | static bool intel_crt_detect_ddc(struct drm_connector *connector) | 359 | static bool intel_crt_detect_ddc(struct drm_connector *connector) |
330 | { | 360 | { |
331 | struct intel_crt *crt = intel_attached_crt(connector); | 361 | struct intel_crt *crt = intel_attached_crt(connector); |
@@ -336,7 +366,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector) | |||
336 | BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG); | 366 | BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG); |
337 | 367 | ||
338 | i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); | 368 | i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); |
339 | edid = drm_get_edid(connector, i2c); | 369 | edid = intel_crt_get_edid(connector, i2c); |
340 | 370 | ||
341 | if (edid) { | 371 | if (edid) { |
342 | bool is_digital = edid->input & DRM_EDID_INPUT_DIGITAL; | 372 | bool is_digital = edid->input & DRM_EDID_INPUT_DIGITAL; |
@@ -544,13 +574,13 @@ static int intel_crt_get_modes(struct drm_connector *connector) | |||
544 | struct i2c_adapter *i2c; | 574 | struct i2c_adapter *i2c; |
545 | 575 | ||
546 | i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); | 576 | i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); |
547 | ret = intel_ddc_get_modes(connector, i2c); | 577 | ret = intel_crt_ddc_get_modes(connector, i2c); |
548 | if (ret || !IS_G4X(dev)) | 578 | if (ret || !IS_G4X(dev)) |
549 | return ret; | 579 | return ret; |
550 | 580 | ||
551 | /* Try to probe digital port for output in DVI-I -> VGA mode. */ | 581 | /* Try to probe digital port for output in DVI-I -> VGA mode. */ |
552 | i2c = intel_gmbus_get_adapter(dev_priv, GMBUS_PORT_DPB); | 582 | i2c = intel_gmbus_get_adapter(dev_priv, GMBUS_PORT_DPB); |
553 | return intel_ddc_get_modes(connector, i2c); | 583 | return intel_crt_ddc_get_modes(connector, i2c); |
554 | } | 584 | } |
555 | 585 | ||
556 | static int intel_crt_set_property(struct drm_connector *connector, | 586 | static int intel_crt_set_property(struct drm_connector *connector, |