diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c index d1a89b2bd5c1..c4e1f085ee10 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c | |||
| @@ -74,7 +74,11 @@ dcb_i2c_parse(struct nvkm_bios *bios, u8 idx, struct dcb_i2c_entry *info) | |||
| 74 | u16 ent = dcb_i2c_entry(bios, idx, &ver, &len); | 74 | u16 ent = dcb_i2c_entry(bios, idx, &ver, &len); |
| 75 | if (ent) { | 75 | if (ent) { |
| 76 | if (ver >= 0x41) { | 76 | if (ver >= 0x41) { |
| 77 | if (!(nv_ro32(bios, ent) & 0x80000000)) | 77 | u32 ent_value = nv_ro32(bios, ent); |
| 78 | u8 i2c_port = (ent_value >> 27) & 0x1f; | ||
| 79 | u8 dpaux_port = (ent_value >> 22) & 0x1f; | ||
| 80 | /* value 0x1f means unused according to DCB 4.x spec */ | ||
| 81 | if (i2c_port == 0x1f && dpaux_port == 0x1f) | ||
| 78 | info->type = DCB_I2C_UNUSED; | 82 | info->type = DCB_I2C_UNUSED; |
| 79 | else | 83 | else |
| 80 | info->type = DCB_I2C_PMGR; | 84 | info->type = DCB_I2C_PMGR; |
