• Home
  • Raw
  • Download

Lines Matching refs:minfo

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