summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-10-13 10:49:31 -0400
committerAdam Jackson <ajax@redhat.com>2011-10-13 10:49:31 -0400
commitb0217d003c24c08c7c45fff82b1c751e35c30e2a (patch)
tree5bb439ac053f3103f165df46398fb0ebe187f580
parentc681662fdabf47fcaab12919f7c2295a951cc630 (diff)
downloadkernel-b0217d003c24c08c7c45fff82b1c751e35c30e2a.tar.gz
kernel-b0217d003c24c08c7c45fff82b1c751e35c30e2a.tar.xz
kernel-b0217d003c24c08c7c45fff82b1c751e35c30e2a.zip
drm/i915: Treat SDVO LVDS as digital when parsing EDID (#729882)
-rw-r--r--drm-i915-sdvo-lvds-is-digital.patch83
-rw-r--r--kernel.spec6
2 files changed, 89 insertions, 0 deletions
diff --git a/drm-i915-sdvo-lvds-is-digital.patch b/drm-i915-sdvo-lvds-is-digital.patch
new file mode 100644
index 000000000..68d0c4b31
--- /dev/null
+++ b/drm-i915-sdvo-lvds-is-digital.patch
@@ -0,0 +1,83 @@
+From 64015d6d16d7ed5b6ffcec95dc13e8694bd2a4d6 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 20 Jun 2011 22:35:24 +0100
+Subject: [PATCH] drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
+
+We were checking whether the supplied edid matched the connector it was
+read from. We do this in case a DDC read returns an EDID for another
+device on a multifunction or otherwise interesting card. However, we
+failed to include LVDS as a digital device and so rejecting an otherwise
+valid EDID.
+
+Fixes the detection of the secondary SDVO LVDS panel on the Libretto
+W105.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+ drivers/gpu/drm/i915/intel_sdvo.c | 28 ++++++++++++++++++++--------
+ 1 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
+index f96975c..26eff9f 100644
+--- a/drivers/gpu/drm/i915/intel_sdvo.c
++++ b/drivers/gpu/drm/i915/intel_sdvo.c
+@@ -49,6 +49,7 @@
+ #define IS_TMDS(c) (c->output_flag & SDVO_TMDS_MASK)
+ #define IS_LVDS(c) (c->output_flag & SDVO_LVDS_MASK)
+ #define IS_TV_OR_LVDS(c) (c->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
++#define IS_DIGITAL(c) (c->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))
+
+
+ static const char *tv_format_names[] = {
+@@ -1363,6 +1364,18 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
+ return status;
+ }
+
++static bool
++intel_sdvo_connector_matches_edid(struct intel_sdvo_connector *sdvo,
++ struct edid *edid)
++{
++ bool monitor_is_digital = !!(edid->input & DRM_EDID_INPUT_DIGITAL);
++ bool connector_is_digital = !!IS_DIGITAL(sdvo);
++
++ DRM_DEBUG_KMS("connector_is_digital? %d, monitor_is_digital? %d\n",
++ connector_is_digital, monitor_is_digital);
++ return connector_is_digital == monitor_is_digital;
++}
++
+ static enum drm_connector_status
+ intel_sdvo_detect(struct drm_connector *connector, bool force)
+ {
+@@ -1407,10 +1420,12 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
+ if (edid == NULL)
+ edid = intel_sdvo_get_analog_edid(connector);
+ if (edid != NULL) {
+- if (edid->input & DRM_EDID_INPUT_DIGITAL)
+- ret = connector_status_disconnected;
+- else
++ if (intel_sdvo_connector_matches_edid(intel_sdvo_connector,
++ edid))
+ ret = connector_status_connected;
++ else
++ ret = connector_status_disconnected;
++
+ connector->display_info.raw_edid = NULL;
+ kfree(edid);
+ } else
+@@ -1451,11 +1466,8 @@ static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
+ edid = intel_sdvo_get_analog_edid(connector);
+
+ if (edid != NULL) {
+- struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
+- bool monitor_is_digital = !!(edid->input & DRM_EDID_INPUT_DIGITAL);
+- bool connector_is_digital = !!IS_TMDS(intel_sdvo_connector);
+-
+- if (connector_is_digital == monitor_is_digital) {
++ if (intel_sdvo_connector_matches_edid(to_intel_sdvo_connector(connector),
++ edid)) {
+ drm_mode_connector_update_edid_property(connector, edid);
+ drm_add_edid_modes(connector, edid);
+ }
+--
+1.7.5.4
+
diff --git a/kernel.spec b/kernel.spec
index 2a6bc954a..1e3ac8c09 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -685,6 +685,8 @@ Patch1810: drm-nouveau-updates.patch
Patch1824: drm-intel-next.patch
# make sure the lvds comes back on lid open
Patch1825: drm-intel-make-lvds-work.patch
+# rhbz#729882, https://bugs.freedesktop.org/attachment.cgi?id=49069
+Patch1826: drm-i915-sdvo-lvds-is-digital.patch
Patch1900: linux-2.6-intel-iommu-igfx.patch
@@ -1308,6 +1310,7 @@ ApplyOptionalPatch drm-nouveau-updates.patch
# Intel DRM
ApplyOptionalPatch drm-intel-next.patch
ApplyPatch drm-intel-make-lvds-work.patch
+ApplyPatch drm-i915-sdvo-lvds-is-digital.patch
ApplyPatch linux-2.6-intel-iommu-igfx.patch
# silence the ACPI blacklist code
@@ -2063,6 +2066,9 @@ fi
# ||----w |
# || ||
%changelog
+* Thu Oct 13 2011 Adam Jackson <ajax@redhat.com>
+- drm/i915: Treat SDVO LVDS as digital when parsing EDID (#729882)
+
* Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
- Add patch from Stanislaw Gruszka to fix iwlagn NULL dereference (rhbz 744155)