.gitignore | 6 Imakefile | 7 Makefile.am | 3 README | 152 +++ RadeonHD.am | 30 RadeonHD.tmpl | 32 autogen.sh | 8 configure.ac | 104 ++ git_version.sh | 309 +++++++ man/.gitignore | 2 man/Imakefile | 17 man/Makefile.am | 57 + man/radeonhd.man | 198 +++++ src/AtomBios/includes/CD_Common_Types.h | 2 src/Imakefile | 10 src/Makefile.am | 18 src/rhd.h | 69 + src/rhd_atombios.c | 1240 +++++++++++++++++++------------- src/rhd_atombios.h | 73 + src/rhd_atomwrapper.c | 6 src/rhd_card.h | 23 src/rhd_connector.c | 146 +++ src/rhd_connector.h | 5 src/rhd_crtc.c | 10 src/rhd_cursor.c | 70 - src/rhd_cursor.h | 2 src/rhd_dac.c | 28 src/rhd_driver.c | 710 +++++++++++------- src/rhd_edid.c | 31 src/rhd_helper.c | 49 + src/rhd_i2c.c | 284 +++++-- src/rhd_i2c.h | 1 src/rhd_id.c | 477 ++++++------ src/rhd_lvtma.c | 799 +++++++++++++++++--- src/rhd_modes.c | 158 +++- src/rhd_modes.h | 4 src/rhd_monitor.c | 280 +++++-- src/rhd_monitor.h | 14 src/rhd_output.c | 1 src/rhd_output.h | 4 src/rhd_pll.c | 171 +++- src/rhd_pll.h | 5 src/rhd_randr.c | 937 ++++++++++++++++++++++++ src/rhd_randr.h | 40 + src/rhd_regs.h | 74 + src/rhd_shadow.c | 6 src/rhd_tmds.c | 138 +-- src/rhd_vga.c | 6 utils/conntest/.gitignore | 1 utils/conntest/Imakefile | 17 utils/conntest/Makefile | 9 utils/conntest/Makefile.am | 20 utils/conntest/README | 33 utils/conntest/rhd_conntest.c | 344 +++++++- 54 files changed, 5580 insertions(+), 1660 deletions(-)
New commits: commit 75a6d7fb9c185a175bb877151f4012ac91457b79 Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 20:06:45 2007 +0100 Better detection of RandR 1.2 interface on compile time. diff --git a/src/rhd_randr.c b/src/rhd_randr.c index 8c84dd7..a00558c 100644 --- a/src/rhd_randr.c +++ b/src/rhd_randr.c @@ -35,19 +35,17 @@ /* Xserver interface */ #include "xf86.h" -#ifdef RANDR -# include "randrstr.h" -#endif /* Driver specific headers */ #include "rhd.h" #include "rhd_randr.h" -#ifdef RANDR_12_INTERFACE +#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 2) || RANDR_MAJOR >= 2 /* Xserver interface */ +#include "randrstr.h" #include "xf86i2c.h" /* Missing in old versions of xf86Crtc.h */ #include "xf86Crtc.h" #define DPMS_SERVER commit 23ad1ec735a779ed4cb30e0fec4bd5175afde567 Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 19:34:54 2007 +0100 Fix Imakefile (rhd_randr was missing). diff --git a/src/Imakefile b/src/Imakefile index cf57e38..1cc0666 100644 --- a/src/Imakefile +++ b/src/Imakefile @@ -35,6 +35,7 @@ rhd_modes.c \ rhd_monitor.c \ rhd_output.c \ rhd_pll.c \ +rhd_randr.c \ rhd_tmds.c \ rhd_vga.c \ rhd_shadow.c \ @@ -58,6 +59,7 @@ rhd_modes.o \ rhd_monitor.o \ rhd_output.o \ rhd_pll.o \ +rhd_randr.o \ rhd_tmds.o \ rhd_vga.o \ rhd_shadow.o \ commit f5ffe41a6c1ffa9418782b7059b075da06e7c496 Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 18:36:58 2007 +0100 Nuke another xf86Parser.h diff --git a/src/rhd_modes.c b/src/rhd_modes.c index 46dccae..cdd9fe5 100644 --- a/src/rhd_modes.c +++ b/src/rhd_modes.c @@ -29,7 +29,6 @@ #include "xf86.h" #include "xf86DDC.h" -#include "xf86Parser.h" #include "rhd.h" #include "rhd_crtc.h" commit 6895da057770e14968920469e87e2a244f5d7f6d Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 17:27:55 2007 +0100 Add ForceReduced and RRUseXF86Edid options. Made ForceReduced a global option and allow it in RandR mode as well. Added RRUseXF86Edid option to revert to old behavior. Some cleanup. diff --git a/src/rhd.h b/src/rhd.h index 50ce772..6931421 100644 --- a/src/rhd.h +++ b/src/rhd.h @@ -131,7 +131,9 @@ typedef struct RHDRec { RHDOpt noAccel; RHDOpt swCursor; RHDOpt shadowFB; + RHDOpt forceReduced; RHDOpt noRandr; + RHDOpt rrUseXF86Edid; RHDOpt rrOutputOrder; unsigned int FbMapSize; pointer FbBase; /* map base of fb */ diff --git a/src/rhd_driver.c b/src/rhd_driver.c index 7ed3748..35b47b0 100644 --- a/src/rhd_driver.c +++ b/src/rhd_driver.c @@ -190,6 +190,7 @@ typedef enum { OPTION_FORCEREDUCED, OPTION_USECONFIGUREDMONITOR, OPTION_NORANDR, + OPTION_RRUSEXF86EDID, OPTION_RROUTPUTORDER } RHDOpts; @@ -201,6 +202,7 @@ static const OptionInfoRec RHDOptions[] = { { OPTION_FORCEREDUCED, "forcereduced", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_USECONFIGUREDMONITOR, "useconfiguredmonitor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_NORANDR, "NoRandr", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_RRUSEXF86EDID, "RRUseXF86Edid", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_RROUTPUTORDER, "RROutputOrder", OPTV_ANYSTR, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -1295,7 +1297,6 @@ rhdModeLayoutSelect(RHDPtr rhdPtr) struct rhdConnector *Connector; Bool Found = FALSE; char *ignore = NULL; - RHDOpt ForceReduced; Bool ConnectorIsDMS59 = FALSE; int i = 0; @@ -1317,8 +1318,6 @@ rhdModeLayoutSelect(RHDPtr rhdPtr) /* quick and dirty option so that some output choice exists */ ignore = xf86GetOptValString(rhdPtr->Options, OPTION_IGNORECONNECTOR); - RhdGetOptValBool(rhdPtr->Options, OPTION_FORCEREDUCED, &ForceReduced, - FALSE); /* handle cards with DMS-59 connectors appropriately. The DMS-59 to VGA adapter does not raise HPD at all, so we need a fallback there. */ @@ -1391,8 +1390,8 @@ rhdModeLayoutSelect(RHDPtr rhdPtr) Monitor->ReducedAllowed = TRUE; /* allow user to override settings globally */ - if (ForceReduced.set) - Monitor->ReducedAllowed = ForceReduced.val.bool; + if (rhdPtr->forceReduced.set) + Monitor->ReducedAllowed = rhdPtr->forceReduced.val.bool; xf86DrvMsg(rhdPtr->scrnIndex, X_INFO, "Connector \"%s\" uses Monitor \"%s\":\n", @@ -1681,14 +1680,18 @@ rhdProcessOptions(ScrnInfoPtr pScrn) /* Process the options */ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, rhdPtr->Options); - RhdGetOptValBool(rhdPtr->Options, OPTION_NOACCEL, &rhdPtr->noAccel, - FALSE); - RhdGetOptValBool(rhdPtr->Options, OPTION_SW_CURSOR, &rhdPtr->swCursor, - FALSE); - RhdGetOptValBool(rhdPtr->Options, OPTION_SHADOWFB, &rhdPtr->shadowFB, - TRUE); - RhdGetOptValBool(rhdPtr->Options, OPTION_NORANDR, &rhdPtr->noRandr, - FALSE); + RhdGetOptValBool(rhdPtr->Options, OPTION_NOACCEL, + &rhdPtr->noAccel, FALSE); + RhdGetOptValBool(rhdPtr->Options, OPTION_SW_CURSOR, + &rhdPtr->swCursor, FALSE); + RhdGetOptValBool(rhdPtr->Options, OPTION_SHADOWFB, + &rhdPtr->shadowFB, TRUE); + RhdGetOptValBool(rhdPtr->Options, OPTION_FORCEREDUCED, + &rhdPtr->forceReduced, FALSE); + RhdGetOptValBool(rhdPtr->Options, OPTION_NORANDR, + &rhdPtr->noRandr, FALSE); + RhdGetOptValBool(rhdPtr->Options, OPTION_RRUSEXF86EDID, + &rhdPtr->rrUseXF86Edid, FALSE); RhdGetOptValString(rhdPtr->Options, OPTION_RROUTPUTORDER, &rhdPtr->rrOutputOrder, FALSE); } diff --git a/src/rhd_randr.c b/src/rhd_randr.c index 202637f..8c84dd7 100644 --- a/src/rhd_randr.c +++ b/src/rhd_randr.c @@ -644,31 +644,40 @@ rhdRROutputGetModes(xf86OutputPtr output) xf86MonPtr edid_mon = NULL; RHDDebug(rhdPtr->scrnIndex, "%s: Output %s\n", __func__, rout->Name); -#if 0 - if (rout->Connector->DDC) - edid_mon = xf86OutputGetEDID (output, rout->Connector->DDC); - xf86OutputSetEDID (output, edid_mon); - - return xf86OutputGetEDIDModes (output); -#endif + /* TODO: per-output options ForceReduced & UseXF86Edid */ + + /* Use RandR edid parsing if requested */ + if (rhdPtr->rrUseXF86Edid.set && rhdPtr->rrUseXF86Edid.val.bool) { + if (rout->Connector->DDC) + edid_mon = xf86OutputGetEDID (output, rout->Connector->DDC); + xf86OutputSetEDID (output, edid_mon); + return xf86OutputGetEDIDModes (output); + } + + /* Nuke old monitor */ if (rout->Connector->Monitor) { /* Modes and EDID are already freed by RandR (OutputSetEDID+return) */ rout->Connector->Monitor->Modes = NULL; rout->Connector->Monitor->EDID = NULL; RHDMonitorDestroy(rout->Connector->Monitor); } - /* TODO: use xf86OutputGetEDID/OutputSetEDID if requested */ - if ( (rout->Connector->Monitor = RHDMonitorInit(rout->Connector)) ) { - /* If digitally attached, enable reduced blanking */ - if (rout->Output->Id == RHD_OUTPUT_TMDSA || - rout->Output->Id == RHD_OUTPUT_LVTMA) - rout->Connector->Monitor->ReducedAllowed = TRUE; - /* TODO: per-output ForceReduced option */ - xf86OutputSetEDID (output, rout->Connector->Monitor->EDID); - return rout->Connector->Monitor->Modes; - } - xf86OutputSetEDID (output, NULL); - return NULL; + /* Get new one */ + if (! (rout->Connector->Monitor = RHDMonitorInit(rout->Connector)) ) { + xf86OutputSetEDID (output, NULL); + return NULL; + } + + /* If digitally attached, enable reduced blanking */ + if (rout->Output->Id == RHD_OUTPUT_TMDSA || + rout->Output->Id == RHD_OUTPUT_LVTMA) + rout->Connector->Monitor->ReducedAllowed = TRUE; + /* Allow user overrides */ + if (rhdPtr->forceReduced.set) + rout->Connector->Monitor->ReducedAllowed = + rhdPtr->forceReduced.val.bool; + + xf86OutputSetEDID (output, rout->Connector->Monitor->EDID); + return rout->Connector->Monitor->Modes; } /* An output's property has changed. */ commit 05e36063eb0231543aa6d34c74b6370b953256d3 Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 16:50:00 2007 +0100 Add rhdCrtcUnlock for later usage. diff --git a/src/rhd_randr.c b/src/rhd_randr.c index ae5c5ed..202637f 100644 --- a/src/rhd_randr.c +++ b/src/rhd_randr.c @@ -255,12 +255,10 @@ rhdRRCrtcLock(xf86CrtcPtr crtc) return FALSE; } -#if 0 /* Unlock CRTC after mode setting, mostly for DRI */ static void rhdRRCrtcUnlock (xf86CrtcPtr crtc) { } -#endif /* Helper: setup PLL and LUT for Crtc */ static void @@ -694,7 +692,7 @@ static const xf86CrtcConfigFuncsRec rhdRRCrtcConfigFuncs = { static const xf86CrtcFuncsRec rhdRRCrtcFuncs = { rhdRRCrtcDpms, NULL, NULL, /* Save,Restore */ - rhdRRCrtcLock, NULL, /* rhdRRCrtcUnlock */ + rhdRRCrtcLock, rhdRRCrtcUnlock, rhdRRCrtcModeFixupDUMMY, rhdRRCrtcPrepare, rhdRRCrtcModeSet, rhdRRCrtcCommit, NULL, /* CrtcGammaSet */ commit 622ff7623da0337a9822ba13509151f30be502d4 Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 16:45:58 2007 +0100 Use own monitor & EDID functions. Improves mode validation. Allows for panel information fetched from AtomBIOS. diff --git a/src/rhd_randr.c b/src/rhd_randr.c index 9e32ade..ae5c5ed 100644 --- a/src/rhd_randr.c +++ b/src/rhd_randr.c @@ -646,11 +646,31 @@ rhdRROutputGetModes(xf86OutputPtr output) xf86MonPtr edid_mon = NULL; RHDDebug(rhdPtr->scrnIndex, "%s: Output %s\n", __func__, rout->Name); +#if 0 if (rout->Connector->DDC) edid_mon = xf86OutputGetEDID (output, rout->Connector->DDC); xf86OutputSetEDID (output, edid_mon); return xf86OutputGetEDIDModes (output); +#endif + if (rout->Connector->Monitor) { + /* Modes and EDID are already freed by RandR (OutputSetEDID+return) */ + rout->Connector->Monitor->Modes = NULL; + rout->Connector->Monitor->EDID = NULL; + RHDMonitorDestroy(rout->Connector->Monitor); + } + /* TODO: use xf86OutputGetEDID/OutputSetEDID if requested */ + if ( (rout->Connector->Monitor = RHDMonitorInit(rout->Connector)) ) { + /* If digitally attached, enable reduced blanking */ + if (rout->Output->Id == RHD_OUTPUT_TMDSA || + rout->Output->Id == RHD_OUTPUT_LVTMA) + rout->Connector->Monitor->ReducedAllowed = TRUE; + /* TODO: per-output ForceReduced option */ + xf86OutputSetEDID (output, rout->Connector->Monitor->EDID); + return rout->Connector->Monitor->Modes; + } + xf86OutputSetEDID (output, NULL); + return NULL; } /* An output's property has changed. */ @@ -844,7 +864,7 @@ RHDRandrPreInit(ScrnInfoPtr pScrn) } rhdPtr->randr = randr; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "RandR 1.2 support enabled, but not finished yet\n"); + "RandR 1.2 support enabled\n"); return TRUE; } commit 746d876c29c0f333d20a29e1635e5a6d218157ae Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Fri Nov 23 16:45:01 2007 +0100 Keep EDID data for later usage. diff --git a/src/rhd_atombios.c b/src/rhd_atombios.c index e7a358d..78ecd84 100644 --- a/src/rhd_atombios.c +++ b/src/rhd_atombios.c @@ -30,6 +30,7 @@ #include "xf86_OSproc.h" #include "xf86_ansic.h" #include "xf86Pci.h" +#include "edid.h" #include "rhd.h" #include "rhd_atombios.h" #include "rhd_connector.h" diff --git a/src/rhd_connector.c b/src/rhd_connector.c index 51fb164..23f5218 100644 --- a/src/rhd_connector.c +++ b/src/rhd_connector.c @@ -28,6 +28,7 @@ #endif #include "xf86.h" +#include "edid.h" /* for usleep */ #include "xf86_ansic.h" diff --git a/src/rhd_monitor.c b/src/rhd_monitor.c index a0acb50..9289ba7 100644 --- a/src/rhd_monitor.c +++ b/src/rhd_monitor.c @@ -338,6 +338,7 @@ rhdMonitorPanel(struct rhdConnector *Connector) Monitor = xnfcalloc(sizeof(struct rhdMonitor), 1); Monitor->scrnIndex = Connector->scrnIndex; + Monitor->EDID = EDID; if (Mode) { Monitor->Name = xstrdup("LVDS Panel"); @@ -362,13 +363,9 @@ rhdMonitorPanel(struct rhdConnector *Connector) /* panel should be driven at native resolution only. */ Monitor->UseFixedModes = TRUE; - if (EDID) { + if (EDID) rhdMonitorPrintEDID(Monitor, EDID); - xfree(EDID->rawData); - xfree(EDID); - } - return Monitor; } @@ -389,12 +386,10 @@ RHDMonitorInit(struct rhdConnector *Connector) if (EDID) { Monitor = xnfcalloc(sizeof(struct rhdMonitor), 1); Monitor->scrnIndex = Connector->scrnIndex; + Monitor->EDID = EDID; RHDMonitorEDIDSet(Monitor, EDID); rhdMonitorPrintEDID(Monitor, EDID); - - xfree(EDID->rawData); - xfree(EDID); } } @@ -418,6 +413,9 @@ RHDMonitorDestroy(struct rhdMonitor *Monitor) Mode = Next; } + if (Monitor->EDID) + xfree(Monitor->EDID->rawData); + xfree(Monitor->EDID); xfree(Monitor->Name); xfree(Monitor); } diff --git a/src/rhd_monitor.h b/src/rhd_monitor.h index 6c19a7c..e6c5fd8 100644 --- a/src/rhd_monitor.h +++ b/src/rhd_monitor.h @@ -41,6 +41,8 @@ struct rhdMonitor { Bool UseFixedModes; DisplayModePtr Modes; /* default: NULL */ + + xf86MonPtr EDID; }; commit 9462fe518095e7f04a93319bb5142b83e2fb76dd Author: Egbert Eich <[EMAIL PROTECTED]> Date: Thu Nov 22 18:35:56 2007 +0100 Disable framebuffer tiling. AtomBIOS AsicInit seems to turn on tiling on some chips. Therefore we explicitely disable it. diff --git a/src/rhd_crtc.c b/src/rhd_crtc.c index b213bc7..05bf1e1 100644 --- a/src/rhd_crtc.c +++ b/src/rhd_crtc.c @@ -174,18 +174,18 @@ DxFBSet(struct rhdCrtc *Crtc, CARD16 Pitch, CARD16 Width, CARD16 Height, switch (bpp) { case 8: - RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0, 0x10703); + RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0, 0xF10703); break; case 15: - RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0x00001, 0x10703); + RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0x000001, 0xF10703); break; case 16: - RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0x00101, 0x10703); + RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0x000101, 0xF10703); break; case 24: case 32: default: - RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0x00002, 0x10703); + RHDRegMask(Crtc, RegOff + D1GRPH_CONTROL, 0x000002, 0xF10703); break; /* TODO: 64bpp ;p */ } commit 214e136a41e59d0af9de6c53bdab50b381812a80 Author: Egbert Eich <[EMAIL PROTECTED]> Date: Thu Nov 22 18:36:58 2007 +0100 Format the connector name for TVout better. diff --git a/src/rhd_connector.c b/src/rhd_connector.c index d9a9ab0..51fb164 100644 --- a/src/rhd_connector.c +++ b/src/rhd_connector.c @@ -127,6 +127,7 @@ rhdConnectorSynthName(struct rhdConnectorInfo *ConnectorInfo, { char *str = NULL; char *typec; + char *str1, *str2; assert(state != NULL); @@ -163,8 +164,16 @@ rhdConnectorSynthName(struct rhdConnectorInfo *ConnectorInfo, return str; case RHD_CONNECTOR_TV: - return strdup(ConnectorInfo->Name); + str1 = strdup(ConnectorInfo->Name); + str = xalloc(20); + str2 = strchr(str1, ' '); + if (str2) *(str2) = '\0'; + snprintf(str, 20, "TV %s",str1); + xfree(str1); + + return str; } + return NULL; } /* commit f7af7c8eed55b50d21dc3fade42118308d4082ee Author: Egbert Eich <[EMAIL PROTECTED]> Date: Thu Nov 22 13:20:22 2007 +0100 Use more user friendly connector names. While the present connector naming sceme is useful for debugging it is not generic enough to be used by users. diff --git a/src/rhd_connector.c b/src/rhd_connector.c index a9c82fd..d9a9ab0 100644 --- a/src/rhd_connector.c +++ b/src/rhd_connector.c @@ -113,6 +113,60 @@ RHDHPDCheck(struct rhdConnector *Connector) return (RHDRegRead(Connector, DC_GPIO_HPD_Y) & Connector->HPDMask); } +struct rhdCsState { + int vga_cnt; + int dvi_cnt; +}; + +/* + * + */ +static char * +rhdConnectorSynthName(struct rhdConnectorInfo *ConnectorInfo, + struct rhdCsState **state) +{ + char *str = NULL; + char *typec; + + assert(state != NULL); + + if (!*state) { + if (!(*state = xcalloc(sizeof(struct rhdCsState), 1))) + return NULL; + } + switch (ConnectorInfo->Type) { + case RHD_CONNECTOR_NONE: + return NULL; + case RHD_CONNECTOR_DVI: + if (ConnectorInfo->Output[0] && ConnectorInfo->Output[1]) + typec = "I"; + else if (ConnectorInfo->Output[0] == RHD_OUTPUT_DACA + || ConnectorInfo->Output[0] == RHD_OUTPUT_DACB + || ConnectorInfo->Output[1] == RHD_OUTPUT_DACA + || ConnectorInfo->Output[1] == RHD_OUTPUT_DACB + ) + typec = "A"; + else + typec = "D"; + str = xalloc(12); + snprintf(str, 11, "DVI-%s %i",typec, ++(*state)->dvi_cnt); + return str; + + case RHD_CONNECTOR_VGA: + str = xalloc(10); + snprintf(str, 9, "VGA %i",++(*state)->vga_cnt); + return str; + + case RHD_CONNECTOR_PANEL: + str = xalloc(10); + snprintf(str, 9, "PANEL"); + return str; + + case RHD_CONNECTOR_TV: + return strdup(ConnectorInfo->Name); + } +} + /* * */ @@ -122,6 +176,7 @@ RHDConnectorsInit(RHDPtr rhdPtr, struct rhdCard *Card) struct rhdConnectorInfo *ConnectorInfo; struct rhdConnector *Connector; struct rhdOutput *Output; + struct rhdCsState *csstate = NULL; int i, j, k, l; Bool InfoAllocated = FALSE; @@ -168,7 +223,7 @@ RHDConnectorsInit(RHDPtr rhdPtr, struct rhdCard *Card) Connector->scrnIndex = rhdPtr->scrnIndex; Connector->Type = ConnectorInfo[i].Type; - Connector->Name = xf86strdup(ConnectorInfo[i].Name); + Connector->Name = rhdConnectorSynthName(&ConnectorInfo[i], &csstate); /* Get the DDC bus of this connector */ if (ConnectorInfo[i].DDC != RHD_DDC_NONE) { @@ -252,6 +307,8 @@ RHDConnectorsInit(RHDPtr rhdPtr, struct rhdCard *Card) rhdPtr->Connector[j] = Connector; j++; } + if (csstate) + xfree(csstate); /* Deallocate what atombios code allocated */ if (ConnectorInfo && InfoAllocated) { commit 7043112600d8138d3a3bddbf86d6b6b0a199e244 Author: Egbert Eich <[EMAIL PROTECTED]> Date: Fri Nov 23 13:51:20 2007 +0100 Add a debug printout for R6XX_MC_VM_FB_LOCATION. diff --git a/src/rhd_driver.c b/src/rhd_driver.c index b639dc6..7ed3748 100644 --- a/src/rhd_driver.c +++ b/src/rhd_driver.c @@ -1227,7 +1227,9 @@ rhdMapFB(RHDPtr rhdPtr) "0x%08X while card Internal Address is 0x%08X\n", (unsigned int) membase, rhdPtr->FbIntAddress); - + if (rhdPtr->ChipSet >= RHD_R600) + xf86DrvMsg(rhdPtr->scrnIndex, X_INFO, "VM_FB_LOCATION: 0x%08X\n", + RHDRegRead(rhdPtr, R6XX_MC_VM_FB_LOCATION)); xf86DrvMsg(rhdPtr->scrnIndex, X_INFO, "Mapped FB at %p (size 0x%08X)\n", rhdPtr->FbBase, rhdPtr->FbMapSize); return TRUE; @@ -1743,7 +1745,7 @@ static unsigned int rhdR5XXDoReadPCIBios(RHDPtr rhdPtr, unsigned char **ptr) { unsigned int ret; -#ifdef NOT_YET +#ifdef NOTYET CARD32 save_198, save_c, save_8; save_198 = RHDRegRead(rhdPtr, 0x198); diff --git a/src/rhd_regs.h b/src/rhd_regs.h index 66c9058..ec7f63c 100644 --- a/src/rhd_regs.h +++ b/src/rhd_regs.h @@ -68,6 +68,7 @@ enum { PCLK_CRTC1_CNTL = 0x0480, PCLK_CRTC2_CNTL = 0x0484, + R6XX_MC_VM_FB_LOCATION = 0x2180, R6XX_CONFIG_MEMSIZE = 0x5428, R6XX_CONFIG_FB_BASE = 0x542C, /* AKA CONFIG_F0_BASE */ commit 60d0a3838effba288e1288b6dedd02016c8005fa Author: Egbert Eich <[EMAIL PROTECTED]> Date: Thu Nov 22 09:24:02 2007 +0100 Changing default depth to 24bpp. diff --git a/src/rhd_driver.c b/src/rhd_driver.c index 76061cb..b639dc6 100644 --- a/src/rhd_driver.c +++ b/src/rhd_driver.c @@ -492,7 +492,7 @@ RHDPreInit(ScrnInfoPtr pScrn, int flags) will SIGSEGV otherwise */ pScrn->monitor = pScrn->confScreen->monitor; - if (!xf86SetDepthBpp(pScrn, 16, 0, 0, Support32bppFb)) { + if (!xf86SetDepthBpp(pScrn, 24, 0, 0, Support32bppFb)) { goto error0; } else { /* Check that the returned depth is one we support */ commit 476e198706efda69a90261b4a467f00f866b5daf Author: Hans Ulrich Niedermann <[EMAIL PROTECTED]> Date: Thu Nov 22 18:27:02 2007 +0100 Comment on all git calls' compatibility diff --git a/git_version.sh b/git_version.sh index 63bc0f7..ba74c13 100644 --- a/git_version.sh +++ b/git_version.sh @@ -145,10 +145,12 @@ git_repo=no if [ "x$(git-rev-parse --git-dir 2> /dev/null)" != "x" ]; then git_repo=yes if [ "x$git_found" = "xyes" ]; then + # git-1.4 and probably earlier understand "git-rev-parse HEAD" git_shaid=`git-rev-parse HEAD | $SED -n 's/^\(.\{8\}\).*/\1/p'` if [ "x$git_shaid" = "x" ]; then git_errors="${git_errors+"${git_errors}; "}error running 'git-rev-parse HEAD'" fi + # git-1.4 and probably earlier understand "git-symbolic-ref HEAD" git_branch=`git-symbolic-ref HEAD | $SED -n 's|^refs/heads/||p'` if [ "x$git_branch" = "x" ]; then git_errors="${git_errors+"${git_errors}; "}error running 'git-symbolic-ref HEAD'" commit 00fb05b2931e63a9b036ecbafc29abb6a2783e06 Author: Hans Ulrich Niedermann <[EMAIL PROTECTED]> Date: Thu Nov 22 18:22:36 2007 +0100 Detect uncommitted changes with git 1.4.x diff --git a/git_version.sh b/git_version.sh index a56e1bb..63bc0f7 100644 --- a/git_version.sh +++ b/git_version.sh @@ -154,7 +154,9 @@ if [ "x$(git-rev-parse --git-dir 2> /dev/null)" != "x" ]; then git_errors="${git_errors+"${git_errors}; "}error running 'git-symbolic-ref HEAD'" fi git_dirty=yes - if git-diff-files --quiet && git-diff-index --cached --quiet HEAD; then + # git-1.4 does not understand "git-diff-files --quiet" + # git-1.4 does not understand "git-diff-index --cached --quiet HEAD" + if [ "x$(git-diff-files)" = "x" ] && [ "x$(git-diff-index --cached HEAD)" = "x" ]; then git_dirty=no fi fi commit ff796eba071341aad9235520a53f2c33456447fe Author: Hans Ulrich Niedermann <[EMAIL PROTECTED]> Date: Thu Nov 22 17:56:38 2007 +0100 Get rid of redundant broken GIT_DIR hack diff --git a/RadeonHD.am b/RadeonHD.am index 1c43d96..7324275 100644 --- a/RadeonHD.am +++ b/RadeonHD.am @@ -13,7 +13,7 @@ git_version.stamp: cp "$(srcdir)/git_version.h" "git_version.h"; \ fi; \ fi - env GIT_DIR="$(top_srcdir)/.git" $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h + $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h @if test -s "$(srcdir)/git_version.h"; then \ if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \ else \ diff --git a/RadeonHD.tmpl b/RadeonHD.tmpl index f56bb6f..214fa2c 100644 --- a/RadeonHD.tmpl +++ b/RadeonHD.tmpl @@ -23,7 +23,7 @@ RHD_VERSION_DEFINES = \ */ GIT_VERSION_CMD = $(SHELL) $(TOP)/git_version.sh RHD_GIT_DEFINES = \ - `env GIT_DIR="$(TOP)/.git" $(GIT_VERSION_CMD) -q -k -s $(TOP) -o git_version.h` + `$(GIT_VERSION_CMD) -q -k -s $(TOP) -o git_version.h` clean:: RemoveFile(git_version.h) diff --git a/git_version.sh b/git_version.sh index cc1c560..a56e1bb 100644 --- a/git_version.sh +++ b/git_version.sh @@ -25,11 +25,10 @@ Options: -s, --srcdir DIRNAME Set source tree dir name. -x, --example Print complete example program." -# The caller may have found these programs for us -SED="${SED-sed}" +# The caller may have set these for us +SED="${SED-"sed"}" # Initialize -GIT_DIR=".git" working_dir="$(pwd)" # Who am I? @@ -142,7 +141,8 @@ if [ "x$git_found" = "xyes" ]; then fi git_repo=no -if [ -e "$GIT_DIR/index" ]; then +# "git-rev-parse --git-dir" since git-0.99.7 +if [ "x$(git-rev-parse --git-dir 2> /dev/null)" != "x" ]; then git_repo=yes if [ "x$git_found" = "xyes" ]; then git_shaid=`git-rev-parse HEAD | $SED -n 's/^\(.\{8\}\).*/\1/p'` commit 5a9dd7fd682eba6b183f0de234f6441f3db0b8ed Author: Luc Verhaegen <[EMAIL PROTECTED]> Date: Thu Nov 22 16:25:00 2007 +0100 TMDSA: actually use IDCLK. This fixes a jittery mode at certain dotclocks on the dell X1300. Reported by Ivo Couckuyt. diff --git a/src/rhd_tmds.c b/src/rhd_tmds.c index 2d8a4f7..655c8a6 100644 --- a/src/rhd_tmds.c +++ b/src/rhd_tmds.c @@ -238,7 +238,7 @@ TMDSASet(struct rhdOutput *Output) TMDSAVoltageControl(Output); /* use IDCLK */ - RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0, 0x00000010); + RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0x00000010, 0x00000010); /* reset transmitter */ RHDRegMask(Output, TMDSA_TRANSMITTER_CONTROL, 0x00000002, 0x00000002); commit eee815e19c730b95fa63954e4695b2e4edd50135 Author: Luc Verhaegen <[EMAIL PROTECTED]> Date: Wed Nov 21 16:18:30 2007 +0100 Connector table fix for Sapphire HD2400XT. 2 DVI-I reported, 1 VGA and 1 DVI-I present. This means that HPD isn't there and that the load of the DAC on the VGA connector is not checked at all. diff --git a/src/rhd_id.c b/src/rhd_id.c index 7184fa4..17e79eb 100644 --- a/src/rhd_id.c +++ b/src/rhd_id.c @@ -280,6 +280,13 @@ RHDIdentify(int flags) { {RHD_CONNECTOR_NONE, "NULL", RHD_DDC_NONE, RHD_HPD_NONE, \ { RHD_OUTPUT_NONE, RHD_OUTPUT_NONE}}} +/* Sapphire HD2400XT reports 2 DVI-I, while it is one VGA and one DVI-I */ +#define VGA_B1_DVI_AB00 \ + { {RHD_CONNECTOR_VGA, "VGA", RHD_DDC_1, RHD_HPD_NONE, \ + { RHD_OUTPUT_DACB, RHD_OUTPUT_NONE}}, \ + {RHD_CONNECTOR_DVI, "DVI-I", RHD_DDC_0, RHD_HPD_0, \ + { RHD_OUTPUT_DACA, RHD_OUTPUT_LVTMA}}} + /* * MacBook Pro provides a weird atombios connector table. */ @@ -321,12 +328,6 @@ RHDIdentify(int flags) {RHD_CONNECTOR_DVI, "DVI-I", RHD_DDC_0, RHD_HPD_1, \ { RHD_OUTPUT_DACA, RHD_OUTPUT_LVTMA}}} -#define VGA_B1_DVI_AB00 \ - { {RHD_CONNECTOR_VGA, "VGA", RHD_DDC_1, RHD_HPD_NONE, \ - { RHD_OUTPUT_DACB, RHD_OUTPUT_NONE}}, \ - {RHD_CONNECTOR_DVI, "DVI-I", RHD_DDC_0, RHD_HPD_0, \ - { RHD_OUTPUT_DACA, RHD_OUTPUT_LVTMA}}} - #define DVI_AA00_DVI_BB11 \ { {RHD_CONNECTOR_DVI, "DVI-I 1", RHD_DDC_0, RHD_HPD_0, \ { RHD_OUTPUT_DACA, RHD_OUTPUT_TMDSA}}, \ @@ -384,7 +385,6 @@ RHDIdentify(int flags) #define VGA_A0_DVI_BB11 ID_CONNECTORINFO_EMPTY #define VGA_B1_DVI_AA00 ID_CONNECTORINFO_EMPTY #define VGA_B1_DVI_AB01 ID_CONNECTORINFO_EMPTY -#define VGA_B1_DVI_AB00 ID_CONNECTORINFO_EMPTY #define DVI_AA00_DVI_BB11 ID_CONNECTORINFO_EMPTY #define DVI_BA10_DVI_AB01 ID_CONNECTORINFO_EMPTY #define DVI_BB11_DVI_AA00 ID_CONNECTORINFO_EMPTY commit 23aec9b4d25c060003eb76351bff80f7c8ad517d Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Thu Nov 22 12:31:44 2007 +0100 Nuked xf86Parser.h diff --git a/src/rhd_randr.c b/src/rhd_randr.c index 35fc7ae..9e32ade 100644 --- a/src/rhd_randr.c +++ b/src/rhd_randr.c @@ -50,7 +50,6 @@ /* Xserver interface */ #include "xf86i2c.h" /* Missing in old versions of xf86Crtc.h */ #include "xf86Crtc.h" -#include "xf86Parser.h" #define DPMS_SERVER #include "X11/extensions/dpms.h" #include "X11/Xatom.h" commit 3aeb91663629708cacc9800d792513aa5b736bf7 Author: Matthias Hopf <[EMAIL PROTECTED]> Date: Thu Nov 22 12:30:53 2007 +0100 Check rout->Connector->DDC before using it. diff --git a/src/rhd_randr.c b/src/rhd_randr.c index b154252..35fc7ae 100644 --- a/src/rhd_randr.c +++ b/src/rhd_randr.c @@ -644,10 +644,11 @@ rhdRROutputGetModes(xf86OutputPtr output) { RHDPtr rhdPtr = RHDPTR(output->scrn); rhdRandrOutputPtr rout = (rhdRandrOutputPtr) output->driver_private; - xf86MonPtr edid_mon; + xf86MonPtr edid_mon = NULL; RHDDebug(rhdPtr->scrnIndex, "%s: Output %s\n", __func__, rout->Name); - edid_mon = xf86OutputGetEDID (output, rout->Connector->DDC); + if (rout->Connector->DDC) + edid_mon = xf86OutputGetEDID (output, rout->Connector->DDC); xf86OutputSetEDID (output, edid_mon); return xf86OutputGetEDIDModes (output); commit 43af6cc8bc959495073c6309b69e2f525c164ed6 Author: Hans Ulrich Niedermann <[EMAIL PROTECTED]> Date: Wed Nov 21 20:46:26 2007 +0100 man: Add link to bugzilla diff --git a/man/radeonhd.man b/man/radeonhd.man index 426e60d..dd46a2c 100644 --- a/man/radeonhd.man +++ b/man/radeonhd.man @@ -183,6 +183,11 @@ The radeonhd wiki (home) page .RS 4 \%http://wiki.x.org/wiki/radeonhd .RE +.IP " 4." 4 +Query the bugtracker for radeonhd bugs +.RS 4 +\%https://bugs.freedesktop.org/query.cgi?product=xorg&component=Driver/radeonhd +.RE .\" .\" .SH AUTHORS commit 20818bdb21440dbf24cc6ccf28909961803f9394 Author: Hans Ulrich Niedermann <[EMAIL PROTECTED]> Date: Wed Nov 21 20:45:21 2007 +0100 man: Add link to radeonhd wiki page diff --git a/man/radeonhd.man b/man/radeonhd.man index 68da181..426e60d 100644 --- a/man/radeonhd.man +++ b/man/radeonhd.man @@ -178,6 +178,11 @@ Overview about radeonhd development code .RS 4 \%http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-radeonhd .RE +.IP " 3." 4 +The radeonhd wiki (home) page +.RS 4 +\%http://wiki.x.org/wiki/radeonhd +.RE .\" .\" .SH AUTHORS commit 71f312cf0e243cb0c3242f78bcd5e127e155a26a Author: Hans Ulrich Niedermann <[EMAIL PROTECTED]> Date: Wed Nov 21 20:32:26 2007 +0100 I have only written the man page, not the driver. diff --git a/man/radeonhd.man b/man/radeonhd.man index cb23afb..68da181 100644 --- a/man/radeonhd.man -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]