summaryrefslogtreecommitdiff
path: root/src/radeon_bios.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2007-09-17 23:04:17 -0400
committerAlex Deucher <alex@botch2.(none)>2007-09-17 23:04:17 -0400
commit4000a710c93dd2d82891e4082bc7fa922ba9c5f4 (patch)
tree39b36b44ca858212fd08d7a91dcaff65f42705db /src/radeon_bios.c
parent38515d402555eaa61c686d42973e59f659b07466 (diff)
RADEON: initial pass at external TMDS support
- Based on Dave Airlie's initial work and the dvo support in the intel driver. - Only sil164 is supported at the moment. - Once we get some testing and such, we ought to move the dvo drivers out of the drivers so they can be shared among all drivers - Doesn't seem to work on my card (r4xx ATOM) card ATM - Legacy bios table programming sequence not implemented yet
Diffstat (limited to 'src/radeon_bios.c')
-rw-r--r--src/radeon_bios.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index b24c4817..af98cf73 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -884,6 +884,47 @@ Bool RADEONGetTMDSInfoFromBIOS (xf86OutputPtr output)
return FALSE;
}
+Bool RADEONGetExtTMDSInfoFromBIOS (xf86OutputPtr output)
+{
+ ScrnInfoPtr pScrn = output->scrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ int offset, table_start, max_freq, gpio_reg, flags;
+
+ if (!info->VBIOS) return FALSE;
+
+ if (info->IsAtomBios) {
+ return FALSE;
+ } else {
+ offset = RADEON_BIOS16(info->ROMHeaderStart + 0x58);
+ if (offset) {
+ table_start = offset + 4;
+ max_freq = RADEON_BIOS16(table_start);
+ radeon_output->dvo_slave_addr = RADEON_BIOS8(table_start+2);
+ gpio_reg = RADEON_BIOS8(table_start+3);
+ if (gpio_reg == 1)
+ radeon_output->dvo_i2c_reg = RADEON_GPIO_MONID;
+ else if (gpio_reg == 2)
+ radeon_output->dvo_i2c_reg = RADEON_GPIO_DVI_DDC;
+ else if (gpio_reg == 3)
+ radeon_output->dvo_i2c_reg = RADEON_GPIO_VGA_DDC;
+ else if (gpio_reg == 4)
+ radeon_output->dvo_i2c_reg = RADEON_GPIO_CRT2_DDC;
+ /*else if (gpio_reg == 5)
+ radeon_output->dvo_i2c_reg = RADEON_GPIO_MM;*/
+ else {
+ ErrorF("unknown gpio reg: %d\n", gpio_reg);
+ return FALSE;
+ }
+ flags = RADEON_BIOS8(table_start+5);
+ /* XXX: init command list */
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
/* support for init from bios tables
*
* Based heavily on the netbsd radeonfb driver