From: <st...@ke...> - 2008-03-27 19:44:42
|
src/nv_crtc.c | 10 +++++----- src/nv_driver.c | 2 ++ src/nv_output.c | 21 +++++++++------------ 3 files changed, 16 insertions(+), 17 deletions(-) New commits: commit 43ff98cd89e3dc43c281e41f3a36a76bcd3e5a65 Author: Stuart Bennett <sb...@ca...> Date: Wed Mar 26 18:35:14 2008 +0000 randr12: tidy-up 3/3 - TMDS04 twiddling Code commented for easy reinstatement should problems arise diff --git a/src/nv_driver.c b/src/nv_driver.c index 42cfc64..fcafbf3 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -712,6 +712,7 @@ NVEnterVT(int scrnIndex, int flags) NVCrtcLockUnlock(xf86_config->crtc[i], 0); } +#if 0 /* Reassign outputs so disabled outputs don't get stuck on the wrong crtc */ for (i = 0; i < xf86_config->num_output; i++) { NVOutputPrivatePtr nv_output = xf86_config->output[i]->driver_private; @@ -727,6 +728,7 @@ NVEnterVT(int scrnIndex, int flags) nv_dcb_write_tmds(pNv, nv_output->dcb_entry, 0, 0x4, tmds04 ^ 8); } } +#endif if (!xf86SetDesiredModes(pScrn)) return FALSE; commit 9491ee3f3fbb8b50244444424ef6148217ace944 Author: Stuart Bennett <sb...@ca...> Date: Wed Mar 26 18:34:28 2008 +0000 randr12: tidy-up 2/3 - DPMS CR57/58 twiddling Code commented for easy reinstatement should problems arise diff --git a/src/nv_output.c b/src/nv_output.c index 4d969e4..9de7f58 100644 --- a/src/nv_output.c +++ b/src/nv_output.c @@ -104,7 +104,7 @@ static Bool dpms_common(xf86OutputPtr output, int mode) return TRUE; nv_crtc = crtc->driver_private; - if (pNv->NVArch >= 0x17 && pNv->twoHeads) { + if (0) { //pNv->NVArch >= 0x17 && pNv->twoHeads) { /* We may be going for modesetting, so we must reset our output binding */ if (mode == DPMSModeOff) { NVWriteVgaCrtc5758(pNv, nv_crtc->head, 0, 0x7f); commit 2e001c140eacc5d5f02435b9c81b13e5d40db71f Author: Stuart Bennett <sb...@ca...> Date: Wed Mar 26 18:33:59 2008 +0000 randr12: tidy-up 1/3 - FP_DEBUG_0 twiddling Code commented for easy reinstatement should problems arise diff --git a/src/nv_crtc.c b/src/nv_crtc.c index 130a99d..7607c12 100644 --- a/src/nv_crtc.c +++ b/src/nv_crtc.c @@ -139,14 +139,14 @@ static void nv40_crtc_load_state_pll(xf86CrtcPtr crtc, RIVA_HW_STATE *state) ScrnInfoPtr pScrn = crtc->scrn; NVPtr pNv = NVPTR(pScrn); /* The TMDS_PLL switch is on the actual ramdac */ - int fp_head = nv_crtc->head ^ state->crosswired; - uint32_t fp_debug_0 = NVReadRAMDAC(pNv, fp_head, NV_RAMDAC_FP_DEBUG_0); +// int fp_head = nv_crtc->head ^ state->crosswired; +// uint32_t fp_debug_0 = NVReadRAMDAC(pNv, fp_head, NV_RAMDAC_FP_DEBUG_0); if (regp->vpll_changed) { uint32_t savedc040 = nvReadMC(pNv, 0xc040); - NVWriteRAMDAC(pNv, fp_head, NV_RAMDAC_FP_DEBUG_0, - fp_debug_0 | NV_RAMDAC_FP_DEBUG_0_PWRDOWN_TMDS_PLL); +// NVWriteRAMDAC(pNv, fp_head, NV_RAMDAC_FP_DEBUG_0, +// fp_debug_0 | NV_RAMDAC_FP_DEBUG_0_PWRDOWN_TMDS_PLL); /* Wait for the situation to stabilise */ usleep(5000); @@ -164,7 +164,7 @@ static void nv40_crtc_load_state_pll(xf86CrtcPtr crtc, RIVA_HW_STATE *state) usleep(5000); nvWriteMC(pNv, 0xc040, savedc040); - NVWriteRAMDAC(pNv, fp_head, NV_RAMDAC_FP_DEBUG_0, fp_debug_0); +// NVWriteRAMDAC(pNv, fp_head, NV_RAMDAC_FP_DEBUG_0, fp_debug_0); } } commit ec9fa3c958d6763ff96d8b884ed36c80d911475a Author: Stuart Bennett <sb...@ca...> Date: Thu Mar 27 19:24:04 2008 +0000 randr12: allow doublescan and low clock modes 320x240 ftw. Also improved mode rejection error messages diff --git a/src/nv_output.c b/src/nv_output.c index 0ccd7ad..4d969e4 100644 --- a/src/nv_output.c +++ b/src/nv_output.c @@ -305,13 +305,10 @@ static void nv_output_restore(xf86OutputPtr output) } static int -nv_output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) +nv_analog_output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) { - if (pMode->Flags & V_DBLSCAN) - return MODE_NO_DBLESCAN; - - if (pMode->Clock > 400000 || pMode->Clock < 25000) - return MODE_CLOCK_RANGE; + if (pMode->Clock > 400000) + return MODE_CLOCK_HIGH; return MODE_OK; } @@ -702,7 +699,7 @@ static const xf86OutputFuncsRec nv_analog_output_funcs = { .dpms = nv_analog_output_dpms, .save = nv_output_save, .restore = nv_output_restore, - .mode_valid = nv_output_mode_valid, + .mode_valid = nv_analog_output_mode_valid, .mode_fixup = nv_output_mode_fixup, .mode_set = nv_output_mode_set, .detect = nv_analog_output_detect, @@ -868,13 +865,13 @@ nv_tmds_output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) if (pNv->dcb_table.entry[nv_output->dcb_entry].duallink_possible) { if (pMode->Clock > 330000) /* 2x165 MHz */ - return MODE_CLOCK_RANGE; + return MODE_CLOCK_HIGH; } else { if (pMode->Clock > 165000) /* 165 MHz */ - return MODE_CLOCK_RANGE; + return MODE_CLOCK_HIGH; } - return nv_output_mode_valid(output, pMode); + return MODE_OK; } static const xf86OutputFuncsRec nv_tmds_output_funcs = { @@ -902,7 +899,7 @@ static int nv_lvds_output_mode_valid if (pMode->HDisplay > nv_output->fpWidth || pMode->VDisplay > nv_output->fpHeight) return MODE_PANEL; - return nv_output_mode_valid(output, pMode); + return MODE_OK; } static xf86OutputStatus |