Lines Matching refs:minfo
69 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_restore() local
85 if (minfo->outputs[1].src == MATROXFB_SRC_CRTC2) { in matroxfb_dh_restore()
86 if (minfo->devflags.g450dac) { in matroxfb_dh_restore()
89 if (minfo->outputs[1].mode != MATROXFB_OUTPUT_MODE_MONITOR) { in matroxfb_dh_restore()
97 } else if (minfo->outputs[0].src == MATROXFB_SRC_CRTC2) { in matroxfb_dh_restore()
101 if (minfo->outputs[0].src == MATROXFB_SRC_CRTC2) { in matroxfb_dh_restore()
150 minfo->hw.crtc2.ctl = tmp; in matroxfb_dh_restore()
161 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_disable() local
164 minfo->hw.crtc2.ctl = 0x00000004; in matroxfb_dh_disable()
172 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_pan_var() local
264 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_open() local
266 if (minfo) { in matroxfb_dh_open()
269 if (minfo->dead) { in matroxfb_dh_open()
272 err = minfo->fbops.fb_open(&minfo->fbcon, user); in matroxfb_dh_open()
284 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_release() local
286 if (minfo) { in matroxfb_dh_release()
287 err = minfo->fbops.fb_release(&minfo->fbcon, user); in matroxfb_dh_release()
330 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_set_par() local
356 down_read(&minfo->altout.lock); in matroxfb_dh_set_par()
358 if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2) { in matroxfb_dh_set_par()
360 if (minfo->outputs[out].output->compute) { in matroxfb_dh_set_par()
361 minfo->outputs[out].output->compute(minfo->outputs[out].data, &mt); in matroxfb_dh_set_par()
365 minfo->crtc2.pixclock = mt.pixclock; in matroxfb_dh_set_par()
366 minfo->crtc2.mnp = mt.mnp; in matroxfb_dh_set_par()
367 up_read(&minfo->altout.lock); in matroxfb_dh_set_par()
373 DAC1064_global_init(minfo); in matroxfb_dh_set_par()
374 DAC1064_global_restore(minfo); in matroxfb_dh_set_par()
375 down_read(&minfo->altout.lock); in matroxfb_dh_set_par()
377 if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2 && in matroxfb_dh_set_par()
378 minfo->outputs[out].output->program) { in matroxfb_dh_set_par()
379 minfo->outputs[out].output->program(minfo->outputs[out].data); in matroxfb_dh_set_par()
383 if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2 && in matroxfb_dh_set_par()
384 minfo->outputs[out].output->start) { in matroxfb_dh_set_par()
385 minfo->outputs[out].output->start(minfo->outputs[out].data); in matroxfb_dh_set_par()
388 up_read(&minfo->altout.lock); in matroxfb_dh_set_par()
403 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_get_vblank() local
405 matroxfb_enable_irq(minfo, 0); in matroxfb_dh_get_vblank()
413 if (test_bit(0, &minfo->irq_flags)) { in matroxfb_dh_get_vblank()
417 vblank->count = minfo->crtc2.vsync.cnt; in matroxfb_dh_get_vblank()
427 struct matrox_fb_info *minfo = m2info->primary_dev; in matroxfb_dh_ioctl() local
453 return matroxfb_wait_for_sync(minfo, 1); in matroxfb_dh_ioctl()
459 return minfo->fbcon.fbops->fb_ioctl(&minfo->fbcon, cmd, arg); in matroxfb_dh_ioctl()
473 if (!minfo->outputs[out].output) in matroxfb_dh_ioctl()
475 switch (minfo->outputs[out].src) { in matroxfb_dh_ioctl()
484 if (minfo->devflags.panellink) { in matroxfb_dh_ioctl()
487 if ((minfo->outputs[2].src == MATROXFB_SRC_CRTC1) && tmp) in matroxfb_dh_ioctl()
493 if (minfo->outputs[out].src != MATROXFB_SRC_CRTC2) { in matroxfb_dh_ioctl()
495 minfo->outputs[out].src = MATROXFB_SRC_CRTC2; in matroxfb_dh_ioctl()
497 } else if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2) { in matroxfb_dh_ioctl()
499 minfo->outputs[out].src = MATROXFB_SRC_NONE; in matroxfb_dh_ioctl()
513 if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2) { in matroxfb_dh_ioctl()
527 if (minfo->outputs[out].output) { in matroxfb_dh_ioctl()
528 switch (minfo->outputs[out].src) { in matroxfb_dh_ioctl()
536 if (minfo->devflags.panellink) { in matroxfb_dh_ioctl()
538 if (minfo->outputs[2].src == MATROXFB_SRC_CRTC1) { in matroxfb_dh_ioctl()
598 static int matroxfb_dh_regit(const struct matrox_fb_info *minfo, in matroxfb_dh_regit() argument
601 #define minfo (m2info->primary_dev) in matroxfb_dh_regit() macro
616 if (minfo->video.len_usable + mem <= minfo->video.len) in matroxfb_dh_regit()
617 m2info->video.offbase = minfo->video.len - mem; in matroxfb_dh_regit()
618 else if (minfo->video.len < mem) { in matroxfb_dh_regit()
622 minfo->video.len_usable -= mem; in matroxfb_dh_regit()
623 m2info->video.offbase = minfo->video.len_usable; in matroxfb_dh_regit()
625 m2info->video.base = minfo->video.base + m2info->video.offbase; in matroxfb_dh_regit()
627 m2info->video.vbase.vaddr = vaddr_va(minfo->video.vbase) + m2info->video.offbase; in matroxfb_dh_regit()
628 m2info->mmio.base = minfo->mmio.base; in matroxfb_dh_regit()
629 m2info->mmio.vbase = minfo->mmio.vbase; in matroxfb_dh_regit()
630 m2info->mmio.len = minfo->mmio.len; in matroxfb_dh_regit()
638 down_write(&minfo->crtc2.lock); in matroxfb_dh_regit()
639 oldcrtc2 = minfo->crtc2.info; in matroxfb_dh_regit()
640 minfo->crtc2.info = m2info; in matroxfb_dh_regit()
641 up_write(&minfo->crtc2.lock); in matroxfb_dh_regit()
647 #undef minfo in matroxfb_dh_regit()
653 #define minfo (m2info->primary_dev) in matroxfb_dh_registerfb() macro
654 if (matroxfb_dh_regit(minfo, m2info)) { in matroxfb_dh_registerfb()
659 minfo->fbcon.node, m2info->fbcon.node); in matroxfb_dh_registerfb()
662 #undef minfo in matroxfb_dh_registerfb()
666 #define minfo (m2info->primary_dev) in matroxfb_dh_deregisterfb() macro
671 down_write(&minfo->crtc2.lock); in matroxfb_dh_deregisterfb()
672 crtc2 = minfo->crtc2.info; in matroxfb_dh_deregisterfb()
674 minfo->crtc2.info = NULL; in matroxfb_dh_deregisterfb()
675 up_write(&minfo->crtc2.lock); in matroxfb_dh_deregisterfb()
685 minfo->video.len_usable += m2info->video.borrowed; in matroxfb_dh_deregisterfb()
689 #undef minfo in matroxfb_dh_deregisterfb()
692 static void* matroxfb_crtc2_probe(struct matrox_fb_info* minfo) { in matroxfb_crtc2_probe() argument
696 if (!minfo->devflags.crtc2) in matroxfb_crtc2_probe()
703 m2info->primary_dev = minfo; in matroxfb_crtc2_probe()
712 static void matroxfb_crtc2_remove(struct matrox_fb_info* minfo, void* crtc2) { in matroxfb_crtc2_remove() argument