summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon.h5
-rw-r--r--src/radeon_bios.c40
-rw-r--r--src/radeon_driver.c5
-rw-r--r--src/radeon_output.c9
4 files changed, 31 insertions, 28 deletions
diff --git a/src/radeon.h b/src/radeon.h
index f7ae1a81..13dc15b2 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -836,6 +836,9 @@ typedef struct {
Bool r600_shadow_fb;
void *fb_shadow;
+ /* some server chips have a hardcoded edid in the bios so that they work with KVMs */
+ Bool get_hardcoded_edid_from_bios;
+
} RADEONInfoRec, *RADEONInfoPtr;
#define RADEONWaitForFifo(pScrn, entries) \
@@ -926,7 +929,7 @@ extern Bool RADEONGetClockInfoFromBIOS(ScrnInfoPtr pScrn);
extern Bool RADEONGetConnectorInfoFromBIOS(ScrnInfoPtr pScrn);
extern Bool RADEONGetDAC2InfoFromBIOS(xf86OutputPtr output);
extern Bool RADEONGetExtTMDSInfoFromBIOS(xf86OutputPtr output);
-extern Bool RADEONGetHardCodedEDIDFromBIOS(xf86OutputPtr output);
+extern xf86MonPtr RADEONGetHardCodedEDIDFromBIOS(xf86OutputPtr output);
extern Bool RADEONGetBIOSInitTableOffsets(ScrnInfoPtr pScrn);
extern Bool RADEONGetLVDSInfoFromBIOS(xf86OutputPtr output);
extern Bool RADEONGetTMDSInfoFromBIOS(xf86OutputPtr output);
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 89c816c3..1b85e8dc 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -1053,39 +1053,27 @@ Bool RADEONGetLVDSInfoFromBIOS (xf86OutputPtr output)
return TRUE;
}
-Bool RADEONGetHardCodedEDIDFromBIOS (xf86OutputPtr output)
+xf86MonPtr RADEONGetHardCodedEDIDFromBIOS (xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
- RADEONInfoPtr info = RADEONPTR(pScrn);
- RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned long tmp;
- char EDID[256];
+ unsigned char edid[256];
+ xf86MonPtr mon = NULL;
- if (!info->VBIOS) return FALSE;
+ if (!info->VBIOS)
+ return mon;
- if (info->IsAtomBios) {
- /* Not yet */
- return FALSE;
- } else {
- if (!(tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x4c))) {
- return FALSE;
+ if (!info->IsAtomBios) {
+ tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x4c);
+ if (tmp) {
+ memcpy(edid, (unsigned char*)(info->VBIOS + tmp), 256);
+ if (edid[1] == 0xff)
+ mon = xf86InterpretEDID(output->scrn->scrnIndex, edid);
}
-
- memcpy(EDID, (char*)(info->VBIOS + tmp), 256);
-
- radeon_output->DotClock = (*(uint16_t*)(EDID+54)) * 10;
- radeon_output->PanelXRes = (*(uint8_t*)(EDID+56)) + ((*(uint8_t*)(EDID+58))>>4)*256;
- radeon_output->HBlank = (*(uint8_t*)(EDID+57)) + ((*(uint8_t*)(EDID+58)) & 0xf)*256;
- radeon_output->HOverPlus = (*(uint8_t*)(EDID+62)) + ((*(uint8_t*)(EDID+65)>>6)*256);
- radeon_output->HSyncWidth = (*(uint8_t*)(EDID+63)) + (((*(uint8_t*)(EDID+65)>>4) & 3)*256);
- radeon_output->PanelYRes = (*(uint8_t*)(EDID+59)) + ((*(uint8_t*)(EDID+61))>>4)*256;
- radeon_output->VBlank = ((*(uint8_t*)(EDID+60)) + ((*(uint8_t*)(EDID+61)) & 0xf)*256);
- radeon_output->VOverPlus = (((*(uint8_t*)(EDID+64))>>4) + (((*(uint8_t*)(EDID+65)>>2) & 3)*16));
- radeon_output->VSyncWidth = (((*(uint8_t*)(EDID+64)) & 0xf) + ((*(uint8_t*)(EDID+65)) & 3)*256);
- radeon_output->Flags = V_NHSYNC | V_NVSYNC; /**(uint8_t*)(EDID+71);*/
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Hardcoded EDID data will be used for TMDS panel\n");
}
- return TRUE;
+
+ return mon;
}
Bool RADEONGetTMDSInfoFromBIOS (xf86OutputPtr output)
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c759bd6a..61644171 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1688,6 +1688,7 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
info->IsDellServer = FALSE;
info->HasSingleDAC = FALSE;
info->InternalTVOut = TRUE;
+ info->get_hardcoded_edid_from_bios = FALSE;
for (i = 0; i < sizeof(RADEONCards) / sizeof(RADEONCardInfo); i++) {
if (info->Chipset == RADEONCards[i].pci_device_id) {
@@ -1705,6 +1706,10 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
switch (info->Chipset) {
case PCI_CHIP_RN50_515E: /* RN50 is based on the RV100 but 3D isn't guaranteed to work. YMMV. */
case PCI_CHIP_RN50_5969:
+ /* Some Sun servers have a hardcoded edid so KVMs work properly */
+ if ((PCI_SUB_VENDOR_ID(info->PciInfo) == 0x108e) &&
+ (PCI_SUB_DEVICE_ID(info->PciInfo) == 0x4133))
+ info->get_hardcoded_edid_from_bios = TRUE;
case PCI_CHIP_RV100_QY:
case PCI_CHIP_RV100_QZ:
/* DELL triple-head configuration. */
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 8c794fb3..bff65ad1 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -229,7 +229,14 @@ radeon_ddc_connected(xf86OutputPtr output)
(radeon_output->ddc_i2c.mask_clk_reg == RADEON_GPIO_VGA_DDC) &&
info->IsAtomBios)
MonInfo = radeon_atom_get_edid(output);
- else {
+ else if (info->get_hardcoded_edid_from_bios) {
+ MonInfo = RADEONGetHardCodedEDIDFromBIOS(output);
+ if (MonInfo == NULL) {
+ RADEONI2CDoLock(output, TRUE);
+ MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
+ RADEONI2CDoLock(output, FALSE);
+ }
+ } else {
RADEONI2CDoLock(output, TRUE);
MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
RADEONI2CDoLock(output, FALSE);