diff options
author | Dave Airlie <airlied@linux.ie> | 2007-11-16 15:19:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-11-16 15:19:00 +1000 |
commit | 3e62730f79a13883a65a568bc821bc56055a4ab7 (patch) | |
tree | 2a24056c447b84c94752f4ee09713c007271c9c9 | |
parent | cca7af3c4910983f7f090792986fcbfa0dc97cfb (diff) |
atombios: fixup warnings in atombios files
-rw-r--r-- | src/atombios_crtc.c | 17 | ||||
-rw-r--r-- | src/atombios_output.c | 22 |
2 files changed, 8 insertions, 31 deletions
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c index 34dd65c9..9305592e 100644 --- a/src/atombios_crtc.c +++ b/src/atombios_crtc.c @@ -260,21 +260,18 @@ atombios_crtc_set_pll(xf86CrtcPtr crtc, DisplayModePtr mode) { RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; RADEONInfoPtr info = RADEONPTR(crtc->scrn); - unsigned char *RADEONMMIO = info->MMIO; int index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); - double c; - int div1, div2, clock; - int sclock; - uint16_t ref_div, fb_div; - uint8_t post_div; - int mul; + int sclock = mode->Clock; + uint16_t ref_div = 0, fb_div = 0; + uint8_t post_div = 0; int major, minor; SET_PIXEL_CLOCK_PS_ALLOCATION spc_param; void *ptr; AtomBIOSArg data; unsigned char *space; RADEONSavePtr save = &info->ModeReg; - + + sclock = mode->Clock; if (IS_AVIVO_VARIANT) { PLLCalculate(mode->Clock, &ref_div, &fb_div, &post_div); } else { @@ -339,7 +336,6 @@ atombios_set_crtc_source(xf86CrtcPtr crtc) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; RADEONInfoPtr info = RADEONPTR(pScrn); - unsigned char *RADEONMMIO = info->MMIO; AtomBIOSArg data; unsigned char *space; SELECT_CRTC_SOURCE_PS_ALLOCATION crtc_src_param; @@ -412,9 +408,6 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc, RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; unsigned long fb_location = crtc->scrn->fbOffset + info->fbLocation; - int regval; - AtomBiosResult atom_res; - RADEONSavePtr restore = &info->ModeReg; Bool tilingOld = info->tilingEnabled; SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION crtc_timing; diff --git a/src/atombios_output.c b/src/atombios_output.c index 6c269823..28934550 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -48,7 +48,6 @@ atom_bios_display_device_control(atomBIOSHandlePtr atomBIOS, int device, Bool st DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION disp_data; AtomBIOSArg data; unsigned char *space; - AtomBiosResult ret; disp_data.ucAction = state; data.exec.index = device; @@ -84,7 +83,6 @@ atombios_output_dac_setup(xf86OutputPtr output, DisplayModePtr mode) DAC_ENCODER_CONTROL_PS_ALLOCATION disp_data; AtomBIOSArg data; unsigned char *space; - AtomBiosResult ret; disp_data.ucAction = 1; disp_data.ucDacStandard = 1; @@ -115,12 +113,10 @@ atombios_output_dac_setup(xf86OutputPtr output, DisplayModePtr mode) int atombios_external_tmds_setup(xf86OutputPtr output, DisplayModePtr mode) { - RADEONOutputPrivatePtr radeon_output = output->driver_private; RADEONInfoPtr info = RADEONPTR(output->scrn); ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION disp_data; AtomBIOSArg data; unsigned char *space; - AtomBiosResult ret; disp_data.sXTmdsEncoder.ucEnable = 1; @@ -141,21 +137,17 @@ atombios_external_tmds_setup(xf86OutputPtr output, DisplayModePtr mode) return ATOM_SUCCESS; } - ErrorF("External TMDS enable failed\n", radeon_output->DACType); + ErrorF("External TMDS enable failed\n"); return ATOM_NOT_IMPLEMENTED; } static int atombios_output_tmds1_setup(xf86OutputPtr output, DisplayModePtr mode) { - RADEONOutputPrivatePtr radeon_output = output->driver_private; RADEONInfoPtr info = RADEONPTR(output->scrn); - unsigned char *RADEONMMIO = info->MMIO; - unsigned int tmp; TMDS1_ENCODER_CONTROL_PS_ALLOCATION disp_data; AtomBIOSArg data; unsigned char *space; - AtomBiosResult ret; disp_data.ucAction = 1; if (mode->Clock > 165000) @@ -183,16 +175,13 @@ atombios_output_tmds1_setup(xf86OutputPtr output, DisplayModePtr mode) #endif } -static void +static int atombios_output_tmds2_setup(xf86OutputPtr output, DisplayModePtr mode) { - RADEONOutputPrivatePtr radeon_output = output->driver_private; RADEONInfoPtr info = RADEONPTR(output->scrn); - unsigned int tmp; TMDS2_ENCODER_CONTROL_PS_ALLOCATION disp_data; AtomBIOSArg data; unsigned char *space; - AtomBiosResult ret; disp_data.ucAction = 1; if (mode->Clock > 165000) @@ -234,7 +223,6 @@ atombios_output_dac_dpms(xf86OutputPtr output, int mode) static void atombios_output_tmds1_dpms(xf86OutputPtr output, int mode) { - RADEONOutputPrivatePtr avivo_output = output->driver_private; RADEONInfoPtr info = RADEONPTR(output->scrn); switch(mode) { @@ -255,9 +243,7 @@ atombios_output_tmds1_dpms(xf86OutputPtr output, int mode) static void atombios_output_tmds2_dpms(xf86OutputPtr output, int mode) { - RADEONOutputPrivatePtr avivo_output = output->driver_private; RADEONInfoPtr info = RADEONPTR(output->scrn); - unsigned char *RADEONMMIO = info->MMIO; switch(mode) { case DPMSModeOn: @@ -331,8 +317,6 @@ atombios_output_mode_set(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode) { - RADEONInfoPtr info = RADEONPTR(output->scrn); - unsigned char *RADEONMMIO = info->MMIO; RADEONOutputPrivatePtr radeon_output = output->driver_private; if (radeon_output->MonType == MT_CRT) { @@ -384,7 +368,7 @@ atombios_dac_detect(ScrnInfoPtr pScrn, xf86OutputPtr output) ret = atom_bios_dac_load_detect(info->atomBIOS, radeon_output->DACType); if (ret == ATOM_SUCCESS) { - ErrorF("DAC connect %08X\n", INREG(0x10)); + ErrorF("DAC connect %08X\n", (unsigned int)INREG(0x10)); bios_0_scratch = INREG(RADEON_BIOS_0_SCRATCH); if (radeon_output->DACType == DAC_PRIMARY) { |