• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/video/matrox/

Lines Matching defs:minfo

83 static inline int *get_ctrl_ptr(struct matrox_fb_info *minfo, unsigned int idx)
85 return (int*)((char*)minfo + g450_controls[idx].control);
88 static void tvo_fill_defaults(struct matrox_fb_info *minfo)
93 *get_ctrl_ptr(minfo, i) = g450_controls[i].desc.default_value;
97 static int cve2_get_reg(struct matrox_fb_info *minfo, int reg)
103 matroxfb_DAC_out(minfo, 0x87, reg);
104 val = matroxfb_DAC_in(minfo, 0x88);
109 static void cve2_set_reg(struct matrox_fb_info *minfo, int reg, int val)
114 matroxfb_DAC_out(minfo, 0x87, reg);
115 matroxfb_DAC_out(minfo, 0x88, val);
119 static void cve2_set_reg10(struct matrox_fb_info *minfo, int reg, int val)
124 matroxfb_DAC_out(minfo, 0x87, reg);
125 matroxfb_DAC_out(minfo, 0x88, val >> 2);
126 matroxfb_DAC_out(minfo, 0x87, reg + 1);
127 matroxfb_DAC_out(minfo, 0x88, val & 3);
131 static void g450_compute_bwlevel(const struct matrox_fb_info *minfo, int *bl,
134 const int b = minfo->altout.tvo_params.brightness + BLMIN;
135 const int c = minfo->altout.tvo_params.contrast;
164 struct matrox_fb_info *minfo = md;
172 if (p->value == *get_ctrl_ptr(minfo, i)) return 0;
183 *get_ctrl_ptr(minfo, i) = p->value;
190 g450_compute_bwlevel(minfo, &blacklevel, &whitelevel);
191 cve2_set_reg10(minfo, 0x0e, blacklevel);
192 cve2_set_reg10(minfo, 0x1e, whitelevel);
196 cve2_set_reg(minfo, 0x20, p->value);
197 cve2_set_reg(minfo, 0x22, p->value);
200 cve2_set_reg(minfo, 0x25, p->value);
204 unsigned char val = cve2_get_reg(minfo, 0x05);
207 cve2_set_reg(minfo, 0x05, val);
218 struct matrox_fb_info *minfo = md;
222 p->value = *get_ctrl_ptr(minfo, i);
236 static void computeRegs(struct matrox_fb_info *minfo, struct mavenregs *r,
263 mnp = matroxfb_g450_setclk(minfo, piic, M_VIDEO_PLL);
266 mt->pixclock = g450_mnp2f(minfo, mnp);
502 #define LR(x) cve2_set_reg(minfo, (x), m->regs[(x)])
503 static void cve2_init_TV(struct matrox_fb_info *minfo,
512 cve2_set_reg(minfo, 0x3E, 0x01);
517 cve2_set_reg(minfo, 0x3E, 0x00);
521 struct matrox_fb_info *minfo = md;
523 dprintk(KERN_DEBUG "Computing, mode=%u\n", minfo->outputs[1].mode);
526 minfo->outputs[1].mode != MATROXFB_OUTPUT_MODE_MONITOR) {
529 cve2_init_TVdata(minfo->outputs[1].mode, &minfo->hw.maven, &outd);
532 g450_compute_bwlevel(minfo, &blacklevel, &whitelevel);
533 minfo->hw.maven.regs[0x0E] = blacklevel >> 2;
534 minfo->hw.maven.regs[0x0F] = blacklevel & 3;
535 minfo->hw.maven.regs[0x1E] = whitelevel >> 2;
536 minfo->hw.maven.regs[0x1F] = whitelevel & 3;
538 minfo->hw.maven.regs[0x20] =
539 minfo->hw.maven.regs[0x22] = minfo->altout.tvo_params.saturation;
541 minfo->hw.maven.regs[0x25] = minfo->altout.tvo_params.hue;
543 if (minfo->altout.tvo_params.testout) {
544 minfo->hw.maven.regs[0x05] |= 0x02;
547 computeRegs(minfo, &minfo->hw.maven, mt, outd);
551 mt->mnp = matroxfb_g450_setclk(minfo, mt->pixclock, (mt->crtc == MATROXFB_SRC_CRTC1) ? M_PIXEL_PLL_C : M_VIDEO_PLL);
552 mt->pixclock = g450_mnp2f(minfo, mt->mnp);
559 struct matrox_fb_info *minfo = md;
561 if (minfo->outputs[1].mode != MATROXFB_OUTPUT_MODE_MONITOR) {
562 cve2_init_TV(minfo, &minfo->hw.maven);
578 struct matrox_fb_info *minfo = md;
581 mt->mnp = matroxfb_g450_setclk(minfo, mt->pixclock, (mt->crtc == MATROXFB_SRC_CRTC1) ? M_PIXEL_PLL_C : M_VIDEO_PLL);
582 mt->pixclock = g450_mnp2f(minfo, mt->mnp);
602 void matroxfb_g450_connect(struct matrox_fb_info *minfo)
604 if (minfo->devflags.g450dac) {
605 down_write(&minfo->altout.lock);
606 tvo_fill_defaults(minfo);
607 minfo->outputs[1].src = minfo->outputs[1].default_src;
608 minfo->outputs[1].data = minfo;
609 minfo->outputs[1].output = &matroxfb_g450_altout;
610 minfo->outputs[1].mode = MATROXFB_OUTPUT_MODE_MONITOR;
611 minfo->outputs[2].src = minfo->outputs[2].default_src;
612 minfo->outputs[2].data = minfo;
613 minfo->outputs[2].output = &matroxfb_g450_dvi;
614 minfo->outputs[2].mode = MATROXFB_OUTPUT_MODE_MONITOR;
615 up_write(&minfo->altout.lock);
619 void matroxfb_g450_shutdown(struct matrox_fb_info *minfo)
621 if (minfo->devflags.g450dac) {
622 down_write(&minfo->altout.lock);
623 minfo->outputs[1].src = MATROXFB_SRC_NONE;
624 minfo->outputs[1].output = NULL;
625 minfo->outputs[1].data = NULL;
626 minfo->outputs[1].mode = MATROXFB_OUTPUT_MODE_MONITOR;
627 minfo->outputs[2].src = MATROXFB_SRC_NONE;
628 minfo->outputs[2].output = NULL;
629 minfo->outputs[2].data = NULL;
630 minfo->outputs[2].mode = MATROXFB_OUTPUT_MODE_MONITOR;
631 up_write(&minfo->altout.lock);