home *** CD-ROM | disk | FTP | other *** search
- diff -p /home/kmg/xtemp/xc/programs/Xserver/hw/xfree86/common_hw/CirrusClk.c common_hw/CirrusClk.c
- *** /home/kmg/xtemp/xc/programs/Xserver/hw/xfree86/common_hw/CirrusClk.c Sat Jan 28 16:58:08 1995
- --- common_hw/CirrusClk.c Sun Oct 29 17:35:12 1995
- ***************
- *** 14,22 ****
- /* CLOCK_FACTOR is double the osc freq in kHz (osc = 14.31818 MHz) */
- #define CLOCK_FACTOR 28636
-
- /* clock in kHz is (numer * CLOCK_FACTOR / (denom & 0x3E)) >> (denom & 1) */
- #define CLOCKVAL(n, d) \
- ! ((((n) & 0x7F) * CLOCK_FACTOR / ((d) & 0x3E)) >> ((d) & 1))
-
- #define NU_FIXED_CLOCKS 19
-
- --- 14,29 ----
- /* CLOCK_FACTOR is double the osc freq in kHz (osc = 14.31818 MHz) */
- #define CLOCK_FACTOR 28636
-
- + /* stability constraints for internal VCO -- MAX_VCO also determines the maximum Video pixel clock */
- + #define MIN_VCO CLOCK_FACTOR
- + #define MAX_VCO 111000
- +
- /* clock in kHz is (numer * CLOCK_FACTOR / (denom & 0x3E)) >> (denom & 1) */
- + #define VCOVAL(n, d) \
- + ((((n) & 0x7F) * CLOCK_FACTOR / ((d) & 0x3E)) )
- +
- #define CLOCKVAL(n, d) \
- ! (VCOVAL(n, d) >> ((d) & 1))
-
- #define NU_FIXED_CLOCKS 19
-
- *************** int CirrusFindClock(freq, num_out, den_o
- *** 86,92 ****
- for (d = 0x14; d < 0x3f; d++) {
- int c, diff;
- /* Avoid combinations that can be unstable. */
- ! if (n < d && (d & 1) == 0)
- continue;
- c = CLOCKVAL(n, d);
- diff = abs(c - freq);
- --- 93,99 ----
- for (d = 0x14; d < 0x3f; d++) {
- int c, diff;
- /* Avoid combinations that can be unstable. */
- ! if ((VCOVAL(n, d) < MIN_VCO) || (VCOVAL(n, d) > MAX_VCO))
- continue;
- c = CLOCKVAL(n, d);
- diff = abs(c - freq);
-