drm/nouveau: Don't try DDC on the dummy I2C channel.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Francisco Jerez 2010-08-08 21:35:57 +02:00 committed by Ben Skeggs
parent 2dc5d2ec05
commit 4ca2b7120c
1 changed files with 4 additions and 2 deletions

View File

@ -104,7 +104,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector,
int i; int i;
for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
struct nouveau_i2c_chan *i2c; struct nouveau_i2c_chan *i2c = NULL;
struct nouveau_encoder *nv_encoder; struct nouveau_encoder *nv_encoder;
struct drm_mode_object *obj; struct drm_mode_object *obj;
int id; int id;
@ -117,6 +117,8 @@ nouveau_connector_ddc_detect(struct drm_connector *connector,
if (!obj) if (!obj)
continue; continue;
nv_encoder = nouveau_encoder(obj_to_encoder(obj)); nv_encoder = nouveau_encoder(obj_to_encoder(obj));
if (nv_encoder->dcb->i2c_index < 0xf)
i2c = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index); i2c = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
if (i2c && nouveau_probe_i2c_addr(i2c, 0x50)) { if (i2c && nouveau_probe_i2c_addr(i2c, 0x50)) {