summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/AtomBios/includes/atombios.h2
-rw-r--r--src/radeon_atombios.c69
-rw-r--r--src/radeon_atombios.h3
-rw-r--r--src/radeon_bios.c2
4 files changed, 74 insertions, 2 deletions
diff --git a/src/AtomBios/includes/atombios.h b/src/AtomBios/includes/atombios.h
index e58e302..863de2e 100644
--- a/src/AtomBios/includes/atombios.h
+++ b/src/AtomBios/includes/atombios.h
@@ -2009,7 +2009,7 @@ typedef struct _ATOM_SPREAD_SPECTRUM_INFO
typedef struct _ATOM_ANALOG_TV_INFO
{
ATOM_COMMON_TABLE_HEADER sHeader;
- UCHAR ucTV_SuppportedStandard;
+ UCHAR ucTV_SupportedStandard;
UCHAR ucTV_BootUpDefaultStandard;
UCHAR ucExt_TV_ASIC_ID;
UCHAR ucExt_TV_ASIC_SlaveAddr;
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index ae32753..0c0122e 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1460,6 +1460,75 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
return TRUE;
}
+Bool
+RADEONGetATOMTVInfo(xf86OutputPtr output)
+{
+ ScrnInfoPtr pScrn = output->scrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ ATOM_ANALOG_TV_INFO *tv_info;
+
+ tv_info = info->atomBIOS->atomDataPtr->AnalogTV_Info;
+
+ if (!tv_info)
+ return FALSE;
+
+ switch(tv_info->ucTV_BootUpDefaultStandard) {
+ case NTSC_SUPPORT:
+ radeon_output->default_tvStd = TV_STD_NTSC;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Default TV standard: NTSC\n");
+ break;
+ case NTSCJ_SUPPORT:
+ radeon_output->default_tvStd = TV_STD_NTSC_J;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Default TV standard: NTSC-J\n");
+ break;
+ case PAL_SUPPORT:
+ radeon_output->default_tvStd = TV_STD_PAL;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Default TV standard: PAL\n");
+ break;
+ case PALM_SUPPORT:
+ radeon_output->default_tvStd = TV_STD_PAL_M;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Default TV standard: PAL-M\n");
+ break;
+ case PAL60_SUPPORT:
+ radeon_output->default_tvStd = TV_STD_PAL_60;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Default TV standard: PAL-60\n");
+ break;
+ }
+
+ radeon_output->tvStd = radeon_output->default_tvStd;
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "TV standards supported by chip: ");
+ radeon_output->SupportedTVStds = radeon_output->default_tvStd;
+ if (tv_info->ucTV_SupportedStandard & NTSC_SUPPORT) {
+ ErrorF("NTSC ");
+ radeon_output->SupportedTVStds |= TV_STD_NTSC;
+ }
+ if (tv_info->ucTV_SupportedStandard & NTSCJ_SUPPORT) {
+ ErrorF("NTSC-J ");
+ radeon_output->SupportedTVStds |= TV_STD_NTSC_J;
+ }
+ if (tv_info->ucTV_SupportedStandard & PAL_SUPPORT) {
+ ErrorF("PAL ");
+ radeon_output->SupportedTVStds |= TV_STD_PAL;
+ }
+ if (tv_info->ucTV_SupportedStandard & PALM_SUPPORT) {
+ ErrorF("PAL-M ");
+ radeon_output->SupportedTVStds |= TV_STD_PAL_M;
+ }
+ if (tv_info->ucTV_SupportedStandard & PAL60_SUPPORT) {
+ ErrorF("PAL-60 ");
+ radeon_output->SupportedTVStds |= TV_STD_PAL_60;
+ }
+ ErrorF("\n");
+
+ if (tv_info->ucExt_TV_ASIC_ID) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unknown external TV ASIC\n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
Bool
RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
diff --git a/src/radeon_atombios.h b/src/radeon_atombios.h
index bfac93e..111fb45 100644
--- a/src/radeon_atombios.h
+++ b/src/radeon_atombios.h
@@ -115,6 +115,9 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn);
extern Bool
RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn);
+extern Bool
+RADEONGetATOMTVInfo(xf86OutputPtr output);
+
extern int
atombios_external_tmds_setup(xf86OutputPtr output, DisplayModePtr mode);
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 9253182..9b28b6f 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -524,7 +524,7 @@ Bool RADEONGetTVInfoFromBIOS (xf86OutputPtr output) {
if (info->IsAtomBios) {
/* no idea where TV table is on ATOM bios */
- return FALSE;
+ return RADEONGetATOMTVInfo(output);
} else {
offset = RADEON_BIOS16(info->ROMHeaderStart + 0x32);
if (offset) {