diff options
author | Alex Deucher <alex@samba.(none)> | 2008-01-02 16:41:06 -0500 |
---|---|---|
committer | Alex Deucher <alex@samba.(none)> | 2008-01-02 16:41:06 -0500 |
commit | 2180f04b6fb94a638f6274cb4455d5688b324dbc (patch) | |
tree | 60ecb4d99530bf9b3531b314e383bcb9101118a1 /src/atombios_output.c | |
parent | dab4dc285154d40303aadaa849b85f8e251e578e (diff) |
RADEON: preliminary support for ATOM RMX
not functional yet.
Diffstat (limited to 'src/atombios_output.c')
-rw-r--r-- | src/atombios_output.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index 3b9cfbfe..c9633682 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) { |