提交 d3932d6c 编写于 作者: A Alex Deucher 提交者: Dave Airlie

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: NAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 c86a9038
...@@ -780,7 +780,7 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect ...@@ -780,7 +780,7 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect
* connected and the DVI port disconnected. If the edid doesn't * connected and the DVI port disconnected. If the edid doesn't
* say HDMI, vice versa. * 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_device *dev = connector->dev;
struct drm_connector *list_connector; struct drm_connector *list_connector;
struct radeon_connector *list_radeon_connector; struct radeon_connector *list_radeon_connector;
...@@ -1060,8 +1060,7 @@ radeon_add_atom_connector(struct drm_device *dev, ...@@ -1060,8 +1060,7 @@ radeon_add_atom_connector(struct drm_device *dev,
return; return;
} }
if (radeon_connector->ddc_bus && i2c_bus->valid) { if (radeon_connector->ddc_bus && i2c_bus->valid) {
if (memcmp(&radeon_connector->ddc_bus->rec, i2c_bus, if (radeon_connector->ddc_bus->rec.i2c_id == i2c_bus->i2c_id) {
sizeof(struct radeon_i2c_bus_rec)) == 0) {
radeon_connector->shared_ddc = true; radeon_connector->shared_ddc = true;
shared_ddc = true; shared_ddc = true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册