Lines Matching refs:crtc

53 nv04_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
57 crtc_wr_cio_state(struct drm_crtc *crtc, struct nv04_crtc_reg *crtcstate, int index) in crtc_wr_cio_state() argument
59 NVWriteVgaCrtc(crtc->dev, nouveau_crtc(crtc)->index, index, in crtc_wr_cio_state()
63 static void nv_crtc_set_digital_vibrance(struct drm_crtc *crtc, int level) in nv_crtc_set_digital_vibrance() argument
65 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_set_digital_vibrance()
66 struct drm_device *dev = crtc->dev; in nv_crtc_set_digital_vibrance()
70 if (nv_crtc->saturation && nv_gf4_disp_arch(crtc->dev)) { in nv_crtc_set_digital_vibrance()
73 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_5B); in nv_crtc_set_digital_vibrance()
75 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_CSB); in nv_crtc_set_digital_vibrance()
78 static void nv_crtc_set_image_sharpening(struct drm_crtc *crtc, int level) in nv_crtc_set_image_sharpening() argument
80 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_set_image_sharpening()
81 struct drm_device *dev = crtc->dev; in nv_crtc_set_image_sharpening()
88 NVWriteRAMDAC(crtc->dev, nv_crtc->index, NV_PRAMDAC_634, regp->ramdac_634); in nv_crtc_set_image_sharpening()
117 static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mode * mode, int dot_c… in nv_crtc_calc_state_ext() argument
119 struct drm_device *dev = crtc->dev; in nv_crtc_calc_state_ext()
123 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_calc_state_ext()
175 nv_crtc_dpms(struct drm_crtc *crtc, int mode) in nv_crtc_dpms() argument
177 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_dpms()
178 struct drm_device *dev = crtc->dev; in nv_crtc_dpms()
237 nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) in nv_crtc_mode_set_vga() argument
239 struct drm_device *dev = crtc->dev; in nv_crtc_mode_set_vga()
240 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_mode_set_vga()
242 struct drm_framebuffer *fb = crtc->primary->fb; in nv_crtc_mode_set_vga()
264 if (encoder->crtc == crtc && in nv_crtc_mode_set_vga()
461 nv_crtc_mode_set_regs(struct drm_crtc *crtc, struct drm_display_mode * mode) in nv_crtc_mode_set_regs() argument
463 struct drm_device *dev = crtc->dev; in nv_crtc_mode_set_regs()
465 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_mode_set_regs()
468 const struct drm_framebuffer *fb = crtc->primary->fb; in nv_crtc_mode_set_regs()
477 if (encoder->crtc != crtc) in nv_crtc_mode_set_regs()
534 nv_crtc_set_digital_vibrance(crtc, nv_crtc->saturation); in nv_crtc_mode_set_regs()
600 nv_crtc_set_image_sharpening(crtc, nv_crtc->sharpness); in nv_crtc_mode_set_regs()
610 nv_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb) in nv_crtc_swap_fbs() argument
612 struct nv04_display *disp = nv04_display(crtc->dev); in nv_crtc_swap_fbs()
613 struct drm_framebuffer *fb = crtc->primary->fb; in nv_crtc_swap_fbs()
615 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_swap_fbs()
637 nv_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, in nv_crtc_mode_set() argument
641 struct drm_device *dev = crtc->dev; in nv_crtc_mode_set()
642 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_mode_set()
649 ret = nv_crtc_swap_fbs(crtc, old_fb); in nv_crtc_mode_set()
656 nv_crtc_mode_set_vga(crtc, adjusted_mode); in nv_crtc_mode_set()
660 nv_crtc_mode_set_regs(crtc, adjusted_mode); in nv_crtc_mode_set()
661 nv_crtc_calc_state_ext(crtc, mode, adjusted_mode->clock); in nv_crtc_mode_set()
665 static void nv_crtc_save(struct drm_crtc *crtc) in nv_crtc_save() argument
667 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_save()
668 struct drm_device *dev = crtc->dev; in nv_crtc_save()
674 if (nv_two_heads(crtc->dev)) in nv_crtc_save()
675 NVSetOwner(crtc->dev, nv_crtc->index); in nv_crtc_save()
677 nouveau_hw_save_state(crtc->dev, nv_crtc->index, saved); in nv_crtc_save()
686 static void nv_crtc_restore(struct drm_crtc *crtc) in nv_crtc_restore() argument
688 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_restore()
689 struct drm_device *dev = crtc->dev; in nv_crtc_restore()
693 if (nv_two_heads(crtc->dev)) in nv_crtc_restore()
694 NVSetOwner(crtc->dev, head); in nv_crtc_restore()
696 nouveau_hw_load_state(crtc->dev, head, &nv04_display(dev)->saved_reg); in nv_crtc_restore()
697 nv_lock_vga_crtc_shadow(crtc->dev, head, saved_cr21); in nv_crtc_restore()
702 static void nv_crtc_prepare(struct drm_crtc *crtc) in nv_crtc_prepare() argument
704 struct drm_device *dev = crtc->dev; in nv_crtc_prepare()
706 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_prepare()
707 const struct drm_crtc_helper_funcs *funcs = crtc->helper_private; in nv_crtc_prepare()
712 drm_crtc_vblank_off(crtc); in nv_crtc_prepare()
713 funcs->dpms(crtc, DRM_MODE_DPMS_OFF); in nv_crtc_prepare()
725 static void nv_crtc_commit(struct drm_crtc *crtc) in nv_crtc_commit() argument
727 struct drm_device *dev = crtc->dev; in nv_crtc_commit()
728 const struct drm_crtc_helper_funcs *funcs = crtc->helper_private; in nv_crtc_commit()
729 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_commit()
732 nv04_crtc_mode_set_base(crtc, crtc->x, crtc->y, NULL); in nv_crtc_commit()
743 funcs->dpms(crtc, DRM_MODE_DPMS_ON); in nv_crtc_commit()
744 drm_crtc_vblank_on(crtc); in nv_crtc_commit()
747 static void nv_crtc_destroy(struct drm_crtc *crtc) in nv_crtc_destroy() argument
749 struct nv04_display *disp = nv04_display(crtc->dev); in nv_crtc_destroy()
750 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_destroy()
755 drm_crtc_cleanup(crtc); in nv_crtc_destroy()
770 nv_crtc_gamma_load(struct drm_crtc *crtc) in nv_crtc_gamma_load() argument
772 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_gamma_load()
779 r = crtc->gamma_store; in nv_crtc_gamma_load()
780 g = r + crtc->gamma_size; in nv_crtc_gamma_load()
781 b = g + crtc->gamma_size; in nv_crtc_gamma_load()
793 nv_crtc_disable(struct drm_crtc *crtc) in nv_crtc_disable() argument
795 struct nv04_display *disp = nv04_display(crtc->dev); in nv_crtc_disable()
796 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_disable()
803 nv_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, in nv_crtc_gamma_set() argument
807 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv_crtc_gamma_set()
819 nv_crtc_gamma_load(crtc); in nv_crtc_gamma_set()
825 nv04_crtc_do_mode_set_base(struct drm_crtc *crtc, in nv04_crtc_do_mode_set_base() argument
829 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv04_crtc_do_mode_set_base()
830 struct drm_device *dev = crtc->dev; in nv04_crtc_do_mode_set_base()
840 if (!atomic && !crtc->primary->fb) { in nv04_crtc_do_mode_set_base()
851 drm_fb = crtc->primary->fb; in nv04_crtc_do_mode_set_base()
859 nv_crtc_gamma_load(crtc); in nv04_crtc_do_mode_set_base()
868 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_PIXEL_INDEX); in nv04_crtc_do_mode_set_base()
877 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_RPC0_INDEX); in nv04_crtc_do_mode_set_base()
878 crtc_wr_cio_state(crtc, regp, NV_CIO_CR_OFFSET_INDEX); in nv04_crtc_do_mode_set_base()
879 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_42); in nv04_crtc_do_mode_set_base()
887 nouveau_calc_arb(dev, crtc->mode.clock, drm_fb->format->cpp[0] * 8, in nv04_crtc_do_mode_set_base()
892 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_FF_INDEX); in nv04_crtc_do_mode_set_base()
893 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_FFLWM__INDEX); in nv04_crtc_do_mode_set_base()
897 crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_47); in nv04_crtc_do_mode_set_base()
904 nv04_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, in nv04_crtc_mode_set_base() argument
907 int ret = nv_crtc_swap_fbs(crtc, old_fb); in nv04_crtc_mode_set_base()
910 return nv04_crtc_do_mode_set_base(crtc, old_fb, x, y, false); in nv04_crtc_mode_set_base()
914 nv04_crtc_mode_set_base_atomic(struct drm_crtc *crtc, in nv04_crtc_mode_set_base_atomic() argument
918 return nv04_crtc_do_mode_set_base(crtc, fb, x, y, true); in nv04_crtc_mode_set_base_atomic()
982 nv04_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, in nv04_crtc_cursor_set() argument
985 struct nouveau_drm *drm = nouveau_drm(crtc->dev); in nv04_crtc_cursor_set()
987 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv04_crtc_cursor_set()
1024 nv04_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) in nv04_crtc_cursor_move() argument
1026 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); in nv04_crtc_cursor_move()
1035 struct drm_crtc *crtc; member
1060 drm_crtc_arm_vblank_event(s->crtc, s->event); in nv04_finish_page_flip()
1063 drm_crtc_vblank_put(s->crtc); in nv04_finish_page_flip()
1084 nv_set_crtc_base(drm->dev, drm_crtc_index(state.crtc), in nv04_flip_complete()
1085 state.offset + state.crtc->y * in nv04_flip_complete()
1086 state.pitch + state.crtc->x * in nv04_flip_complete()
1138 nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, in nv04_crtc_page_flip() argument
1143 struct drm_device *dev = crtc->dev; in nv04_crtc_page_flip()
1145 struct drm_framebuffer *old_fb = crtc->primary->fb; in nv04_crtc_page_flip()
1154 int head = nouveau_crtc(crtc)->index; in nv04_crtc_page_flip()
1195 { { }, event, crtc, fb->format->cpp[0] * 8, fb->pitches[0], in nv04_crtc_page_flip()
1199 drm_crtc_vblank_get(crtc); in nv04_crtc_page_flip()
1221 crtc->primary->fb = fb; in nv04_crtc_page_flip()
1231 drm_crtc_vblank_put(crtc); in nv04_crtc_page_flip()