>From 7c94667f1434383c2531a249aa28b15a0e660efe Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Fri, 19 Feb 2010 02:13:56 -0500
Subject: [PATCH] drm/radeon/kms: fix shared ddc detection

Just compare the i2c id since the i2c structs
may be slighly different.

Fixes fdo bug 26616.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_connectors.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 6e9e7b5..bca8ce2 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -766,7 +766,7 @@ static enum drm_connector_status
radeon_dvi_detect(struct drm_connector *connect
                         * connected and the DVI port disconnected.  If the 
edid doesn't
                         * say HDMI, vice versa.
                         */
-                       if (radeon_connector->shared_ddc && 
connector_status_connected) {
+                       if (radeon_connector->shared_ddc && (ret == 
connector_status_connected)) {
                                struct drm_device *dev = connector->dev;
                                struct drm_connector *list_connector;
                                struct radeon_connector *list_radeon_connector;
@@ -1044,8 +1044,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                        return;
                }
                if (radeon_connector->ddc_bus && i2c_bus->valid) {
-                       if (memcmp(&radeon_connector->ddc_bus->rec, i2c_bus,
-                                   sizeof(struct radeon_i2c_bus_rec)) == 0) {
+                       if (radeon_connector->ddc_bus->rec.i2c_id == 
i2c_bus->i2c_id) {
                                radeon_connector->shared_ddc = true;
                                shared_ddc = true;
                        }
-- 
1.5.6.3

Attachment: 0001-drm-radeon-kms-fix-shared-ddc-detection.patch
Description: application/mbox

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to