Lines Matching refs:m
253 unsigned int m; in matroxfb_PLL_mavenclock() local
256 for (m = pll->in_div_min; m <= pll->in_div_max; m++) { in matroxfb_PLL_mavenclock()
261 n = (fwant * m) / fxtal; in matroxfb_PLL_mavenclock()
268 dvd = m << p; in matroxfb_PLL_mavenclock()
279 dprintk(KERN_DEBUG "Match: %u / %u / %u / %u\n", n, m, p, ln); in matroxfb_PLL_mavenclock()
284 *in = m; in matroxfb_PLL_mavenclock()
523 #define LR(x) maven_set_reg(c, (x), m->regs[(x)])
524 #define LRP(x) maven_set_reg_pair(c, (x), m->regs[(x)] | (m->regs[(x)+1] << 8))
525 static void maven_init_TV(struct i2c_client* c, const struct mavenregs* m) { in maven_init_TV() argument
561 if (m->mode == MATROXFB_OUTPUT_MODE_PAL) { in maven_init_TV()
599 if (m->mode == MATROXFB_OUTPUT_MODE_PAL) in maven_init_TV()
699 if (m->mode == MATROXFB_OUTPUT_MODE_PAL) in maven_init_TV()
724 struct mavenregs* m) { in maven_find_exact_clocks() argument
729 m->regs[0x80] = 0x0F; in maven_find_exact_clocks()
730 m->regs[0x81] = 0x07; in maven_find_exact_clocks()
731 m->regs[0x82] = 0x81; in maven_find_exact_clocks()
739 …if (!matroxfb_mavenclock((m->mode == MATROXFB_OUTPUT_MODE_PAL) ? &maven_PAL : &maven_NTSC, h, vt, … in maven_find_exact_clocks()
744 m->regs[0x80] = a - 1; in maven_find_exact_clocks()
745 m->regs[0x81] = b - 1; in maven_find_exact_clocks()
746 m->regs[0x82] = c | 0x80; in maven_find_exact_clocks()
747 m->hcorr = h2 - 2; in maven_find_exact_clocks()
748 m->htotal = h - 2; in maven_find_exact_clocks()
757 struct mavenregs* m) { in maven_compute_timming() argument
762 m->mode = minfo->outputs[1].mode; in maven_compute_timming()
763 if (m->mode != MATROXFB_OUTPUT_MODE_MONITOR) { in maven_compute_timming()
770 maven_init_TVdata(md, m); in maven_compute_timming()
772 if (maven_find_exact_clocks(mt->HTotal, mt->VTotal, m) == 0) in maven_compute_timming()
781 if (m->hcorr < mt->HTotal) in maven_compute_timming()
782 hcrt += m->hcorr; in maven_compute_timming()
790 m->regs[0x96] = m->hcorr; in maven_compute_timming()
791 m->regs[0x97] = m->hcorr >> 8; in maven_compute_timming()
793 m->regs[0x98] = 0x00; m->regs[0x99] = 0x00; in maven_compute_timming()
795 m->regs[0x9A] = lmargin; /* 100% */ in maven_compute_timming()
796 m->regs[0x9B] = lmargin >> 8; /* 100% */ in maven_compute_timming()
798 m->regs[0x9C] = 0x04; in maven_compute_timming()
799 m->regs[0x9D] = 0x00; in maven_compute_timming()
801 m->regs[0xA0] = m->htotal; in maven_compute_timming()
802 m->regs[0xA1] = m->htotal >> 8; in maven_compute_timming()
804 m->regs[0xA2] = mt->VTotal - mt->VSyncStart - 1; /* stop vblanking */ in maven_compute_timming()
805 m->regs[0xA3] = (mt->VTotal - mt->VSyncStart - 1) >> 8; in maven_compute_timming()
808 m->regs[0xA4] = 0x04; in maven_compute_timming()
809 m->regs[0xA5] = 0x00; in maven_compute_timming()
811 m->regs[0xA4] = 0x01; in maven_compute_timming()
812 m->regs[0xA5] = 0x00; in maven_compute_timming()
815 m->regs[0xA6] = 0x00; in maven_compute_timming()
816 m->regs[0xA7] = 0x00; in maven_compute_timming()
818 m->regs[0xA8] = mt->VTotal - 1; in maven_compute_timming()
819 m->regs[0xA9] = (mt->VTotal - 1) >> 8; in maven_compute_timming()
821 m->regs[0xAA] = hcrt; /* 0 <= hcrt <= htotal - 2 */ in maven_compute_timming()
822 m->regs[0xAB] = hcrt >> 8; in maven_compute_timming()
824 m->regs[0xAC] = mt->VTotal - 2; in maven_compute_timming()
825 m->regs[0xAD] = (mt->VTotal - 2) >> 8; in maven_compute_timming()
827 m->regs[0xAE] = 0x01; /* Fix this... 0..VTotal */ in maven_compute_timming()
828 m->regs[0xAF] = 0x00; in maven_compute_timming()
873 if (ib >= m->htotal + 2) { in maven_compute_timming()
877 m->regs[0x90] = hdec; /* < 0x40 || > 0x80 is bad... 0x80 is questionable */ in maven_compute_timming()
878 m->regs[0xC2] = hlen; in maven_compute_timming()
880 m->regs[0x9E] = ib; in maven_compute_timming()
881 m->regs[0x9F] = ib >> 8; in maven_compute_timming()
894 a = m->vlines * (m->htotal + 2); in maven_compute_timming()
895 b = (mt->VTotal - 1) * (m->htotal + 2) + m->hcorr + 2; in maven_compute_timming()
901 vdec = m->vlines * 32768 / mt->VTotal; in maven_compute_timming()
914 m->regs[0x91] = vdec; in maven_compute_timming()
915 m->regs[0x92] = vdec >> 8; in maven_compute_timming()
916 m->regs[0xBE] = vlen; in maven_compute_timming()
918 m->regs[0xB0] = 0x08; /* output: SVideo/Composite */ in maven_compute_timming()
923 m->regs[0x80] = a; in maven_compute_timming()
924 m->regs[0x81] = bv; in maven_compute_timming()
925 m->regs[0x82] = c | 0x80; in maven_compute_timming()
927 m->regs[0xB3] = 0x01; in maven_compute_timming()
928 m->regs[0x94] = 0xB2; in maven_compute_timming()
931 m->regs[0x96] = mt->HTotal; in maven_compute_timming()
932 m->regs[0x97] = mt->HTotal >> 8; in maven_compute_timming()
934 m->regs[0x98] = 0x00; in maven_compute_timming()
935 m->regs[0x99] = 0x00; in maven_compute_timming()
938 m->regs[0x9A] = tmpi; in maven_compute_timming()
939 m->regs[0x9B] = tmpi >> 8; in maven_compute_timming()
942 m->regs[0x9C] = tmpi; in maven_compute_timming()
943 m->regs[0x9D] = tmpi >> 8; in maven_compute_timming()
946 m->regs[0x9E] = tmpi; in maven_compute_timming()
947 m->regs[0x9F] = tmpi >> 8; in maven_compute_timming()
950 m->regs[0xA0] = tmpi; in maven_compute_timming()
951 m->regs[0xA1] = tmpi >> 8; in maven_compute_timming()
954 m->regs[0xA2] = tmpi; in maven_compute_timming()
955 m->regs[0xA3] = tmpi >> 8; in maven_compute_timming()
958 m->regs[0xA4] = tmpi; in maven_compute_timming()
959 m->regs[0xA5] = tmpi >> 8; in maven_compute_timming()
962 m->regs[0xA6] = tmpi; in maven_compute_timming()
963 m->regs[0xA7] = tmpi >> 8; in maven_compute_timming()
965 m->regs[0xA8] = tmpi; in maven_compute_timming()
966 m->regs[0xA9] = tmpi >> 8; in maven_compute_timming()
969 m->regs[0xAA] = tmpi; in maven_compute_timming()
970 m->regs[0xAB] = tmpi >> 8; in maven_compute_timming()
973 m->regs[0xAC] = tmpi; in maven_compute_timming()
974 m->regs[0xAD] = tmpi >> 8; in maven_compute_timming()
976 m->regs[0xAE] = 0x00; in maven_compute_timming()
977 m->regs[0xAF] = 0x00; in maven_compute_timming()
979 m->regs[0xB0] = 0x03; /* output: monitor */ in maven_compute_timming()
980 m->regs[0xB1] = 0xA0; /* ??? */ in maven_compute_timming()
981 m->regs[0x8C] = 0x20; /* must be set... */ in maven_compute_timming()
982 m->regs[0x8D] = 0x04; /* defaults to 0x10: test signal */ in maven_compute_timming()
983 m->regs[0xB9] = 0x1A; /* defaults to 0x2C: too bright */ in maven_compute_timming()
984 m->regs[0xBF] = 0x22; /* makes picture stable */ in maven_compute_timming()
990 const struct mavenregs* m) { in maven_program_timming() argument
993 if (m->mode == MATROXFB_OUTPUT_MODE_MONITOR) { in maven_program_timming()
1022 maven_init_TV(c, m); in maven_program_timming()