summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alex@samba.(none)>2008-01-02 16:41:06 -0500
committerAlex Deucher <alex@samba.(none)>2008-01-02 16:41:06 -0500
commit2180f04b6fb94a638f6274cb4455d5688b324dbc (patch)
tree60ecb4d99530bf9b3531b314e383bcb9101118a1 /src
parentdab4dc285154d40303aadaa849b85f8e251e578e (diff)
RADEON: preliminary support for ATOM RMX
not functional yet.
Diffstat (limited to 'src')
-rw-r--r--src/atombios_output.c39
-rw-r--r--src/radeon_output.c5
2 files changed, 42 insertions, 2 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c
index 3b9cfbf..c963368 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -316,6 +316,44 @@ atombios_output_lvds_setup(xf86OutputPtr output, DisplayModePtr mode)
return ATOM_NOT_IMPLEMENTED;
}
+static int
+atombios_output_scaler_setup(xf86OutputPtr output, DisplayModePtr mode)
+{
+ RADEONInfoPtr info = RADEONPTR(output->scrn);
+ RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ RADEONCrtcPrivatePtr radeon_crtc = output->crtc->driver_private;
+ ENABLE_SCALER_PS_ALLOCATION disp_data;
+ AtomBiosArgRec data;
+ unsigned char *space;
+
+ disp_data.ucScaler = radeon_crtc->crtc_id;
+
+ if (mode->Flags & RADEON_USE_RMX) {
+ ErrorF("Using RMX\n");
+ if (radeon_output->rmx_type == RMX_FULL ||
+ radeon_output->rmx_type == RMX_ASPECT)
+ disp_data.ucEnable = ATOM_SCALER_EXPANSION;
+ else if (radeon_output->rmx_type == RMX_CENTER)
+ disp_data.ucEnable = ATOM_SCALER_CENTER;
+ } else {
+ ErrorF("Not using RMX\n");
+ disp_data.ucEnable = ATOM_SCALER_DISABLE;
+ }
+
+ data.exec.index = GetIndexIntoMasterTable(COMMAND, EnableScaler);
+ data.exec.dataSpace = (void *)&space;
+ data.exec.pspace = &disp_data;
+
+ if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ ErrorF("scaler %d setup success\n", radeon_crtc->crtc_id);
+ return ATOM_SUCCESS;
+ }
+
+ ErrorF("scaler %d setup failed\n", radeon_crtc->crtc_id);
+ return ATOM_NOT_IMPLEMENTED;
+
+}
+
static AtomBiosResult
atombios_display_device_control(atomBiosHandlePtr atomBIOS, int device, Bool state)
{
@@ -525,6 +563,7 @@ atombios_output_mode_set(xf86OutputPtr output,
{
RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ //atombios_output_scaler_setup(output, mode);
atombios_set_output_crtc_source(output);
if (radeon_output->MonType == MT_CRT) {
diff --git a/src/radeon_output.c b/src/radeon_output.c
index ecbc7b1..4c2df88 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -88,7 +88,7 @@ const char *DACTypeName[4] = {
"None"
};
-const char *ConnectorTypeName[16] = {
+const char *ConnectorTypeName[17] = {
"None",
"VGA",
"DVI-I",
@@ -543,6 +543,7 @@ static Bool
radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
+ RADEONInfoPtr info = RADEONPTR(output->scrn);
RADEONOutputPrivatePtr radeon_output = output->driver_private;
radeon_output->Flags &= ~RADEON_USE_RMX;
@@ -553,7 +554,7 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
xf86CrtcPtr crtc = output->crtc;
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
- if (radeon_crtc->crtc_id == 0) {
+ if (IS_AVIVO_VARIANT || radeon_crtc->crtc_id == 0) {
if (mode->HDisplay < radeon_output->PanelXRes ||
mode->VDisplay < radeon_output->PanelYRes)
radeon_output->Flags |= RADEON_USE_RMX;