summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-12-22 15:58:35 +1000
committerDave Airlie <airlied@redhat.com>2008-12-22 15:58:35 +1000
commit4e96278b581e296c1203d97a6d7aa3bff3977222 (patch)
tree5b385bf93afbac9960a69492bc4385352dcb13ee
parent435d996949185201a97493e131f9920a32863acd (diff)
atombios/tv: add an option to enable atom tv-out for users.
This code is still experimental but we will allow users to enable it for experimental reasons
-rw-r--r--man/radeon.man6
-rw-r--r--src/radeon.h3
-rw-r--r--src/radeon_atombios.c26
-rw-r--r--src/radeon_driver.c1
4 files changed, 27 insertions, 9 deletions
diff --git a/man/radeon.man b/man/radeon.man
index f8526dff..19ffb94e 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -550,6 +550,12 @@ controller has passed the destination region. It reduces tearing at the cost
of performance.
The default is
.B off.
+.TP
+.BI "Option \*qATOMTvOut\*q \*q" boolean \*q
+This option enables experimental TV-out support for r500 and r600 atombios chips.
+tv-out is experimental and may not function on these chips as well as hoped for.
+The default is
+.B off.
.SH SEE ALSO
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
diff --git a/src/radeon.h b/src/radeon.h
index 818ec4dc..f7f9c095 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -205,7 +205,8 @@ typedef enum {
OPTION_IGNORE_LID_STATUS,
OPTION_DEFAULT_TVDAC_ADJ,
OPTION_INT10,
- OPTION_EXA_VSYNC
+ OPTION_EXA_VSYNC,
+ OPTION_ATOM_TVOUT
} RADEONOpts;
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index c9c7ae26..3cd7eae9 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1572,6 +1572,10 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
ATOM_CONNECTOR_OBJECT_TABLE *con_obj;
ATOM_INTEGRATED_SYSTEM_INFO_V2 *igp_obj = NULL;
int i, j;
+ Bool enable_tv = FALSE;
+
+ if (xf86ReturnOptValBool(info->Options, OPTION_ATOM_TVOUT, FALSE))
+ enable_tv = TRUE;
atomDataPtr = info->atomBIOS->atomDataPtr;
if (!rhdAtomGetTableRevisionAndSize((ATOM_COMMON_TABLE_HEADER *)(atomDataPtr->Object_Header), &crev, &frev, &size))
@@ -1702,7 +1706,10 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
if (info->BiosConnector[i].ConnectorType == CONNECTOR_DIN ||
info->BiosConnector[i].ConnectorType == CONNECTOR_STV ||
info->BiosConnector[i].ConnectorType == CONNECTOR_CTV)
- info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_TV1_INDEX);
+ if (enable_tv)
+ info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_TV1_INDEX);
+ else
+ info->BiosConnector[i].valid = FALSE;
else
info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_CRT1_INDEX);
info->BiosConnector[i].DACType = DAC_PRIMARY;
@@ -1715,7 +1722,10 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
if (info->BiosConnector[i].ConnectorType == CONNECTOR_DIN ||
info->BiosConnector[i].ConnectorType == CONNECTOR_STV ||
info->BiosConnector[i].ConnectorType == CONNECTOR_CTV)
- info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_TV1_INDEX);
+ if (enable_tv)
+ info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_TV1_INDEX);
+ else
+ info->BiosConnector[i].valid = FALSE;
else
info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_CRT2_INDEX);
info->BiosConnector[i].DACType = DAC_TVDAC;
@@ -1978,6 +1988,10 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
atomDataTablesPtr atomDataPtr;
uint8_t crev, frev;
int i, j;
+ Bool enable_tv = FALSE;
+
+ if (xf86ReturnOptValBool(info->Options, OPTION_ATOM_TVOUT, FALSE))
+ enable_tv = TRUE;
atomDataPtr = info->atomBIOS->atomDataPtr;
@@ -1998,20 +2012,16 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
continue;
}
-#if 1
- if (i == ATOM_DEVICE_CV_INDEX) {
+ if (!enable_tv && (i == ATOM_DEVICE_CV_INDEX)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Skipping Component Video\n");
info->BiosConnector[i].valid = FALSE;
continue;
}
-#endif
-#if 1
- if (i == ATOM_DEVICE_TV1_INDEX) {
+ if (!enable_tv && (i == ATOM_DEVICE_TV1_INDEX)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Skipping TV-Out\n");
info->BiosConnector[i].valid = FALSE;
continue;
}
-#endif
info->BiosConnector[i].valid = TRUE;
info->BiosConnector[i].load_detection = TRUE;
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index d4148549..e53edbbe 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -192,6 +192,7 @@ static const OptionInfoRec RADEONOptions[] = {
{ OPTION_DEFAULT_TVDAC_ADJ, "DefaultTVDACAdj", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_INT10, "Int10", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_EXA_VSYNC, "EXAVSync", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_ATOM_TVOUT, "ATOMTVOut", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};