From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Chris Wilson <chris@chris-wilson.co.uk>
Subject: [04/70] drm/i915/sdvo: If we have an EDID confirm it matches the mode of the connection
Date: Tue, 22 Feb 2011 14:16:43 -0800 [thread overview]
Message-ID: <20110222221837.449687285@clark.kroah.org> (raw)
In-Reply-To: <20110222222003.GA15831@kroah.com>
2.6.37-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Wilson <chris@chris-wilson.co.uk>
commit 139467433e50926d22338e9dc754feaaf94b9db0 upstream.
If we have an EDID for a digital panel, but we are probing a non-TMDS
connector then we know that this is a false detection, and vice versa.
This should reduce the number of bogus outputs on multi-function
adapters that report the same output on multiple connectors.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34101
Reported-by: Sebastien Caty <sebastien.caty@mrnf.gouv.qc.ca>
Tested-by: Sebastien Caty <sebastien.caty@mrnf.gouv.qc.ca>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_sdvo.c | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -46,6 +46,7 @@
SDVO_TV_MASK)
#define IS_TV(c) (c->output_flag & SDVO_TV_MASK)
+#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))
@@ -1356,7 +1357,8 @@ intel_sdvo_hdmi_sink_detect(struct drm_c
intel_sdvo->has_hdmi_monitor = drm_detect_hdmi_monitor(edid);
intel_sdvo->has_hdmi_audio = drm_detect_monitor_audio(edid);
}
- }
+ } else
+ status = connector_status_disconnected;
connector->display_info.raw_edid = NULL;
kfree(edid);
}
@@ -1404,10 +1406,25 @@ intel_sdvo_detect(struct drm_connector *
if ((intel_sdvo_connector->output_flag & response) == 0)
ret = connector_status_disconnected;
- else if (response & SDVO_TMDS_MASK)
+ else if (IS_TMDS(intel_sdvo_connector))
ret = intel_sdvo_hdmi_sink_detect(connector);
- else
- ret = connector_status_connected;
+ else {
+ struct edid *edid;
+
+ /* if we have an edid check it matches the connection */
+ edid = intel_sdvo_get_edid(connector);
+ 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
+ ret = connector_status_connected;
+ connector->display_info.raw_edid = NULL;
+ kfree(edid);
+ } else
+ ret = connector_status_connected;
+ }
/* May update encoder flag for like clock for SDVO TV, etc.*/
if (ret == connector_status_connected) {
@@ -1443,10 +1460,15 @@ static void intel_sdvo_get_ddc_modes(str
edid = intel_sdvo_get_analog_edid(connector);
if (edid != NULL) {
- if (edid->input & DRM_EDID_INPUT_DIGITAL) {
+ 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) {
drm_mode_connector_update_edid_property(connector, edid);
drm_add_edid_modes(connector, edid);
}
+
connector->display_info.raw_edid = NULL;
kfree(edid);
}
next prev parent reply other threads:[~2011-02-22 22:21 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 22:20 [00/70] 2.6.37.2-stable review Greg KH
2011-02-22 22:16 ` [01/70] NFSD: memory corruption due to writing beyond the stat array Greg KH
2011-02-22 22:16 ` [02/70] [SCSI] mptfusion: mptctl_release is required in mptctl.c Greg KH
2011-02-22 22:16 ` [03/70] [SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset Greg KH
2011-02-22 22:16 ` Greg KH [this message]
2011-02-22 22:16 ` [05/70] drm/radeon/kms: fix interlaced modes on dce4+ Greg KH
2011-02-22 22:16 ` [06/70] drm/radeon: fix memory debugging since d961db75ce86a84f1f04e91ad1014653ed7d9f46 Greg KH
2011-02-22 22:16 ` [07/70] drm/radeon/kms: add connector table for mac g5 9600 Greg KH
2011-02-22 22:16 ` [08/70] drm/radeon/kms: improve 6xx/7xx CS error output Greg KH
2011-02-22 22:16 ` [09/70] drm/radeon/kms: add bounds checking to avivo pll algo Greg KH
2011-02-22 22:16 ` [10/70] drm/radeon/kms: hopefully fix pll issues for real (v3) Greg KH
2011-02-22 22:16 ` [11/70] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met Greg KH
2011-02-22 22:16 ` [12/70] vt: fix issue when fbcon wants to takeover a second time Greg KH
2011-02-22 22:16 ` [13/70] ARM: 6606/1: sa1100: Fix platform device registration Greg KH
2011-02-22 22:16 ` [14/70] HID: magicmouse: Dont report REL_{X, Y} for Magic Trackpad Greg KH
2011-02-22 22:16 ` [15/70] perf timechart: Adjust perf timechart to the new power events Greg KH
2011-02-23 0:17 ` Thomas Renninger
2011-02-24 18:22 ` Greg KH
2011-02-22 22:16 ` [16/70] x86: Clear irqstack thread_info Greg KH
2011-02-22 22:16 ` [17/70] drm/i915: make DP training try a little harder Greg KH
2011-02-22 22:16 ` [18/70] xen: p2m: correctly initialize partial p2m leaf Greg KH
2011-02-22 22:16 ` [19/70] xen/p2m: Mark INVALID_P2M_ENTRY the mfn_list past max_pfn Greg KH
2011-02-22 22:16 ` [20/70] [media] [v3,media] av7110: check for negative array offset Greg KH
2011-02-22 22:17 ` [21/70] xfs: fix dquot shaker deadlock Greg KH
2011-02-22 22:17 ` [22/70] HID: add Add Cando touch screen 10.1-inch product id Greg KH
2011-02-22 22:17 ` [23/70] HID: Switch turbox/mosart touchscreen to hid-mosart Greg KH
2011-02-22 22:17 ` [24/70] CRED: Fix kernel panic upon security_file_alloc() failure Greg KH
2011-02-22 22:17 ` [25/70] btrfs: prevent heap corruption in btrfs_ioctl_space_info() Greg KH
2011-02-22 22:17 ` [26/70] CRED: Fix BUG() upon security_cred_alloc_blank() failure Greg KH
2011-02-22 22:17 ` [27/70] CRED: Fix memory and refcount leaks upon security_prepare_creds() failure Greg KH
2011-02-22 22:17 ` [28/70] staging: brcm80211: bugfix for softmac crash on multi cpu configurations Greg KH
2011-02-23 2:23 ` [Stable-review] " Ben Hutchings
2011-02-23 7:40 ` Arend van Spriel
2011-02-23 18:06 ` Greg KH
2011-02-23 20:24 ` Arend van Spriel
2011-02-24 13:10 ` Roland Vossen
2011-02-24 18:21 ` Greg KH
2011-02-24 20:47 ` Arend van Spriel
2011-02-25 0:13 ` [stable] " Greg KH
2011-02-22 22:17 ` [29/70] security: add cred argument to security_capable() Greg KH
2011-02-22 22:17 ` [30/70] pci: use security_capable() when checking capablities during config space read Greg KH
2011-02-22 22:17 ` [31/70] ACPI / Wakeup: Enable button GPEs unconditionally during initialization Greg KH
2011-02-22 22:17 ` [32/70] nfsd: correctly handle return value from nfsd_map_name_to_* Greg KH
2011-02-22 22:17 ` [33/70] x86, hotplug: Fix powersavings with offlined cores on AMD Greg KH
2011-02-22 22:17 ` [34/70] s390: remove task_show_regs Greg KH
2011-02-22 22:17 ` [35/70] x86, mrst: Set correct APB timer IRQ affinity for secondary cpu Greg KH
2011-02-22 22:17 ` [36/70] PM / Hibernate: Return error code when alloc_image_page() fails Greg KH
2011-02-22 22:17 ` [37/70] drm/radeon/kms: add missing frac fb div flag for dce4+ Greg KH
2011-02-22 22:17 ` [38/70] fs/partitions: Validate map_count in Mac partition tables Greg KH
2011-02-22 22:17 ` [39/70] workqueue: wake up a worker when a rescuer is leaving a gcwq Greg KH
2011-02-22 22:17 ` [40/70] workqueue: make sure MAYDAY_INITIAL_TIMEOUT is at least 2 jiffies long Greg KH
2011-02-22 22:17 ` [41/70] net: deinit automatic LIST_HEAD Greg KH
2011-02-22 22:17 ` [42/70] iwl3945: remove plcp check Greg KH
2011-02-22 22:17 ` [43/70] ALSA: HDA: Add position_fix quirk for an Asus device Greg KH
2011-02-22 22:17 ` [44/70] ALSA: caiaq - Fix possible string-buffer overflow Greg KH
2011-02-22 22:17 ` [45/70] ALSA: HDA: Do not announce false surround in Conexant auto Greg KH
2011-02-22 22:17 ` [46/70] hwmon: (lm85) extend to support EMC6D103 chips Greg KH
2011-02-22 22:17 ` [47/70] x86, AMD, PCI: Add AMD northbridge PCI device id for CPU families 12h and 14h Greg KH
2011-02-22 22:17 ` [48/70] hwmon: (k10temp) add support for AMD Family 12h/14h CPUs Greg KH
2011-02-22 22:17 ` [49/70] hwmon: (jc42) fix type mismatch Greg KH
2011-02-22 22:17 ` [50/70] hwmon: (jc42) more helpful documentation Greg KH
2011-02-22 22:17 ` [51/70] hwmon: (jc42) do not allow writing to locked registers Greg KH
2011-02-22 22:17 ` [52/70] netfilter: fix race in conntrack between dump_table and destroy Greg KH
2011-02-22 22:17 ` [53/70] netfilter: ctnetlink: fix missing refcount increment during dumps Greg KH
2011-02-22 22:17 ` [54/70] [media] radio-aimslab.c needs #include <linux/delay.h> Greg KH
2011-02-22 22:17 ` [55/70] ARM: Ensure predictable endian state on signal handler entry Greg KH
2011-02-22 22:17 ` [56/70] ARM: Keep exit text/data around for SMP_ON_UP Greg KH
2011-02-22 22:17 ` [57/70] cifs: fix handling of scopeid in cifs_convert_address Greg KH
2011-02-22 22:17 ` [58/70] cifs: Fix regression in LANMAN (LM) auth code Greg KH
2011-02-22 22:17 ` [59/70] acer-wmi: Fix capitalisation of GUID Greg KH
2011-02-22 22:17 ` [60/70] pcmcia: re-enable Zoomed Video support Greg KH
2011-02-22 22:17 ` [61/70] eCryptfs: Copy up lower inode attrs in getattr Greg KH
2011-02-22 22:17 ` [62/70] genirq: Prevent access beyond allocated_irqs bitmap Greg KH
2011-02-22 22:17 ` [63/70] genirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now Greg KH
2011-02-22 22:17 ` [64/70] perf: Fix throttle logic Greg KH
2011-02-22 22:17 ` [65/70] ASoC: WM8903: Fix mic detection enable logic Greg KH
2011-02-22 22:17 ` [66/70] net: can: janz-ican3: world-writable sysfs termination file Greg KH
2011-02-22 22:17 ` [67/70] platform: x86: acer-wmi: world-writable sysfs threeg file Greg KH
2011-02-22 22:17 ` [68/70] platform: x86: asus_acpi: world-writable procfs files Greg KH
2011-02-22 22:17 ` [69/70] platform: x86: tc1100-wmi: world-writable sysfs wireless and jogdial files Greg KH
2011-02-22 22:17 ` [70/70] Revert: tpm_tis: Use timeouts returned from TPM Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110222221837.449687285@clark.kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=chris@chris-wilson.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®