diff options
author | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-05-13 19:49:10 -0400 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-05-13 19:49:10 -0400 |
commit | e187321ab8dd58d2b2fe92c062d070ba4820a2bf (patch) | |
tree | 636bbc7c9f6d902767faa88abd42ec2c4278cdae | |
parent | e60a7bcaf5611ad4706b1d1442ce4cae49145f42 (diff) |
RADEON: add new ConnectorTable option and re-add PanelSize option
-rw-r--r-- | src/radeon.h | 1 | ||||
-rw-r--r-- | src/radeon_display.c | 11 | ||||
-rw-r--r-- | src/radeon_driver.c | 1 | ||||
-rw-r--r-- | src/radeon_output.c | 39 | ||||
-rw-r--r-- | src/radeon_probe.h | 6 |
5 files changed, 44 insertions, 14 deletions
diff --git a/src/radeon.h b/src/radeon.h index 7922f1a..2a2a672 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -147,6 +147,7 @@ typedef enum { OPTION_LVDS_PROBE_PLL, OPTION_ACCELMETHOD, OPTION_CONSTANTDPI, + OPTION_CONNECTORTABLE, OPTION_DRI } RADEONOpts; diff --git a/src/radeon_display.c b/src/radeon_display.c index 737b170..c5caf9c 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -740,11 +740,20 @@ Bool RADEONGetLVDSInfo (xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); RADEONOutputPrivatePtr radeon_output = output->driver_private; + char* s; ErrorF("LVDS get info"); if (!RADEONGetLVDSInfoFromBIOS(output)) - RADEONGetPanelInfoFromReg(output); + RADEONGetPanelInfoFromReg(output); + + if ((s = xf86GetOptValString(info->Options, OPTION_PANEL_SIZE))) { + radeon_output->PanelPwrDly = 200; + if (sscanf (s, "%dx%d", &radeon_output->PanelXRes, &radeon_output->PanelYRes) != 2) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Invalid PanelSize option: %s\n", s); + RADEONGetPanelInfoFromReg(output); + } + } /* The panel size we collected from BIOS may not be the * maximum size supported by the panel. If not, we update diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 8626b89..ceea69d 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -189,6 +189,7 @@ static const OptionInfoRec RADEONOptions[] = { { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE }, { OPTION_CONSTANTDPI, "ConstantDPI", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_CONNECTORTABLE, "ConnectorTable", OPTV_STRING, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; diff --git a/src/radeon_output.c b/src/radeon_output.c index 18ef16d..e9e1aea 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -68,10 +68,11 @@ const RADEONMonitorType MonTypeID[7] = { MT_STV, /* STV -> STV */ }; -const char *TMDSTypeName[3] = { - "NONE", +const char *TMDSTypeName[4] = { + "Unknown", "Internal", - "External" + "External", + "None" }; const char *DDCTypeName[6] = { @@ -83,15 +84,16 @@ const char *DDCTypeName[6] = { "LCD_DDC" }; -const char *DACTypeName[3] = { +const char *DACTypeName[4] = { "Unknown", "Primary", "TVDAC/ExtDAC", + "None" }; const char *ConnectorTypeName[8] = { "None", - "Proprietary", + "Proprietary/LVDS", "VGA", "DVI-I", "DVI-D", @@ -473,7 +475,7 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); xf86OutputPtr output; - const char *s; + char *optstr; int i = 0, second = 0, max_mt = 5; @@ -553,6 +555,21 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) info->BiosConnector[0].DACType = DAC_PRIMARY; } + /* parse connector table option */ + if (optstr = (char *)xf86GetOptValString(info->Options, OPTION_CONNECTORTABLE)) { + if (sscanf(optstr, "%d,%d,%d,%d,%d,%d,%d,%d", + &info->BiosConnector[0].DDCType, + &info->BiosConnector[0].DACType, + &info->BiosConnector[0].TMDSType, + &info->BiosConnector[0].ConnectorType, + &info->BiosConnector[1].DDCType, + &info->BiosConnector[1].DACType, + &info->BiosConnector[1].TMDSType, + &info->BiosConnector[1].ConnectorType) != 8) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Invalid ConnectorTable option: %s\n", optstr); + } + } + for (i = 0 ; i < RADEON_MAX_BIOS_CONNECTOR; i++) { RADEONOutputPrivatePtr radeon_output = xnfcalloc(sizeof(RADEONOutputPrivateRec), 1); if (!radeon_output) { @@ -562,7 +579,7 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) radeon_output->ConnectorType = info->BiosConnector[i].ConnectorType; if ((info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_DVI_D_ATOM) || radeon_output->ConnectorType == CONNECTOR_DVI_D) - radeon_output->DACType = DAC_UNKNOWN; + radeon_output->DACType = DAC_NONE; else radeon_output->DACType = info->BiosConnector[i].DACType; radeon_output->DDCType = info->BiosConnector[i].DDCType; @@ -595,8 +612,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) } radeon_output->MonType = MT_UNKNOWN; radeon_output->DDCType = DDC_LCD; - radeon_output->DACType = DAC_UNKNOWN; - radeon_output->TMDSType = TMDS_UNKNOWN; + radeon_output->DACType = DAC_NONE; + radeon_output->TMDSType = TMDS_NONE; radeon_output->ConnectorType = CONNECTOR_LVDS_ATOM; RADEONSetOutputType(pScrn, radeon_output); output = xf86OutputCreate(pScrn, &radeon_output_funcs, OutputType[radeon_output->type]); @@ -620,8 +637,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) } radeon_output->MonType = MT_UNKNOWN; radeon_output->DDCType = DDC_LCD; - radeon_output->DACType = DAC_UNKNOWN; - radeon_output->TMDSType = TMDS_UNKNOWN; + radeon_output->DACType = DAC_NONE; + radeon_output->TMDSType = TMDS_NONE; radeon_output->ConnectorType = CONNECTOR_PROPRIETARY; RADEONSetOutputType(pScrn, radeon_output); output = xf86OutputCreate(pScrn, &radeon_output_funcs, OutputType[radeon_output->type]); diff --git a/src/radeon_probe.h b/src/radeon_probe.h index 2bb5b27..818a2dd 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -96,14 +96,16 @@ typedef enum { DAC_UNKNOWN = -1, DAC_PRIMARY = 0, - DAC_TVDAC = 1 + DAC_TVDAC = 1, + DAC_NONE = 2 } RADEONDacType; typedef enum { TMDS_UNKNOWN = -1, TMDS_INT = 0, - TMDS_EXT = 1 + TMDS_EXT = 1, + TMDS_NONE = 2 } RADEONTmdsType; typedef struct { |