--- /usr/src/model_with-radeon-r400/aty/radeon_i2c.c 2007-04-13 13:35:49.000000000 +0200 +++ radeon_i2c.c 2007-04-13 22:07:16.000000000 +0200 @@ -163,7 +163,7 @@ mon_type = MT_NONE; goto done; } - if ((edid[EDID_STRUCT_DISPLAY] & 0x80) && (conn->ddc_type == ddc_dvi)) { + if ((edid[EDID_STRUCT_DISPLAY] & 0x80) && ((conn->ddc_type == ddc_dvi) || (conn->ddc_type == ddc_monid))) { RTRACE("radeonfb: I2C (port %d) ... found TMDS panel\n", conn->ddc_type); mon_type = MT_DFP; goto done; --- /usr/src/model_with-radeon-r400/aty/radeon_monitor.c 2007-04-13 13:35:49.000000000 +0200 +++ radeon_monitor.c 2007-04-13 14:00:11.000000000 +0200 @@ -610,6 +610,105 @@ } #endif /* CONFIG_PPC_OF */ +#if 1 +int __devinit radeon_get_conn_info_atom(struct radeonfb_info *rinfo) +{ + int i = 0, j, tmp, tmp0=0, tmp1=0; + + if(!rinfo->bios_seg) return -ENODEV; + + if (rinfo->is_atom_bios) { + if((tmp = BIOS_IN16 (rinfo->atom_data_start + 22))) { + int crtc = 0, id[2]; + tmp1 = BIOS_IN16 (tmp + 4); + for (i=0; i<8; i++) { + if(tmp1 & (1<>8) & 0xf) == id[0]) { + if (i == 3) + rinfo->connectors[0].tmds_type = tmds_internal; + else if (i == 7) + rinfo->connectors[0].tmds_type = tmds_external; + + if (rinfo->connectors[0].dac_type == dac_unknown) + rinfo->connectors[0].dac_type = (portinfo & 0xf) - 1; + continue; + } + } + + /* crtc == 0 */ + id[crtc] = (portinfo>>8) & 0xf; + rinfo->connectors[crtc].dac_type = (portinfo & 0xf) - 1; + rinfo->connectors[crtc].conn_type = (portinfo>>4) & 0xf; + if (i == 3) + rinfo->connectors[crtc].tmds_type = tmds_internal; + else if (i == 7) + rinfo->connectors[crtc].tmds_type = tmds_external; + + if((tmp0 = BIOS_IN16 (rinfo->atom_data_start + 24)) && id[crtc]) { + int gpio; + switch (gpio = BIOS_IN16 (tmp0 + 4 + 27 * id[crtc]) * 4) + { + case GPIO_MONID: + rinfo->connectors[crtc].ddc_type = ddc_monid; + break; + case GPIO_DVI_DDC: + rinfo->connectors[crtc].ddc_type = ddc_dvi; + break; + case GPIO_VGA_DDC: + rinfo->connectors[crtc].ddc_type = ddc_vga; + break; + case GPIO_CRT2_DDC: + rinfo->connectors[crtc].ddc_type = ddc_crt2; + break; + default: + rinfo->connectors[crtc].ddc_type = ddc_none; + break; + } + RTRACE("id=%d GPIO: 0x%x+0x%x\n",id[crtc],tmp0,gpio); + + } else { + rinfo->connectors[crtc].ddc_type = ddc_none; + } + crtc++; + } else { + /* we have already had two CRTCs assigned. the rest may share the same + * * port with the existing connector, fill in them accordingly. + * */ + for (j=0; j<2; j++) { + if (((portinfo>>8) & 0xf) == id[j]) { + if (i == 3) + rinfo->connectors[j].tmds_type = tmds_internal; + else if (i == 7) + rinfo->connectors[j].tmds_type = tmds_external; + + if (rinfo->connectors[j].dac_type == dac_unknown) + rinfo->connectors[j].dac_type = (portinfo & 0xf) - 1; + } + } + } + } + } + + for (i=0; i<2; i++) { + RTRACE("Port %d: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n", i, + rinfo->connectors[i].ddc_type, rinfo->connectors[i].dac_type, + rinfo->connectors[i].tmds_type, rinfo->connectors[i].conn_type); + } + } else { + RTRACE("No Device Info Table found!\n"); + return -ENODEV; + } + } + return 0; +} +#endif +#if 0 int __devinit radeon_get_conn_info_atom(struct radeonfb_info *rinfo) { int i, j, offset, valids; @@ -727,6 +826,7 @@ return 0; } +#endif /* Try to extract the connector informations from the BIOS. This * doesn't quite work yet, but it's output is still useful for