Lines Matching refs:crtc

485 static inline struct ltdc_device *crtc_to_ltdc(struct drm_crtc *crtc)  in crtc_to_ltdc()  argument
487 return (struct ltdc_device *)crtc->dev->dev_private; in crtc_to_ltdc()
689 struct drm_crtc *crtc) in ltdc_irq_crc_handle() argument
705 drm_crtc_add_crc_entry(crtc, true, drm_crtc_accurate_vblank_count(crtc), &crc); in ltdc_irq_crc_handle()
712 struct drm_crtc *crtc = drm_crtc_from_index(ddev, 0); in ltdc_irq_thread() local
716 drm_crtc_handle_vblank(crtc); in ltdc_irq_thread()
720 ltdc_irq_crc_handle(ldev, crtc); in ltdc_irq_thread()
755 static void ltdc_crtc_update_clut(struct drm_crtc *crtc) in ltdc_crtc_update_clut() argument
757 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_update_clut()
762 if (!crtc->state->color_mgmt_changed || !crtc->state->gamma_lut) in ltdc_crtc_update_clut()
765 lut = (struct drm_color_lut *)crtc->state->gamma_lut->data; in ltdc_crtc_update_clut()
774 static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc, in ltdc_crtc_atomic_enable() argument
777 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_atomic_enable()
778 struct drm_device *ddev = crtc->dev; in ltdc_crtc_atomic_enable()
794 drm_crtc_vblank_on(crtc); in ltdc_crtc_atomic_enable()
797 static void ltdc_crtc_atomic_disable(struct drm_crtc *crtc, in ltdc_crtc_atomic_disable() argument
800 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_atomic_disable()
801 struct drm_device *ddev = crtc->dev; in ltdc_crtc_atomic_disable()
806 drm_crtc_vblank_off(crtc); in ltdc_crtc_atomic_disable()
833 ltdc_crtc_mode_valid(struct drm_crtc *crtc, in ltdc_crtc_mode_valid() argument
836 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_mode_valid()
871 static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc, in ltdc_crtc_mode_fixup() argument
875 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_mode_fixup()
891 static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc) in ltdc_crtc_mode_set_nofb() argument
893 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_mode_set_nofb()
894 struct drm_device *ddev = crtc->dev; in ltdc_crtc_mode_set_nofb()
899 struct drm_display_mode *mode = &crtc->state->adjusted_mode; in ltdc_crtc_mode_set_nofb()
909 if (en_iter->crtc == crtc) { in ltdc_crtc_mode_set_nofb()
946 DRM_DEBUG_DRIVER("CRTC:%d mode:%s\n", crtc->base.id, mode->name); in ltdc_crtc_mode_set_nofb()
1033 static void ltdc_crtc_atomic_flush(struct drm_crtc *crtc, in ltdc_crtc_atomic_flush() argument
1036 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_atomic_flush()
1037 struct drm_device *ddev = crtc->dev; in ltdc_crtc_atomic_flush()
1038 struct drm_pending_vblank_event *event = crtc->state->event; in ltdc_crtc_atomic_flush()
1042 ltdc_crtc_update_clut(crtc); in ltdc_crtc_atomic_flush()
1049 crtc->state->event = NULL; in ltdc_crtc_atomic_flush()
1052 if (drm_crtc_vblank_get(crtc) == 0) in ltdc_crtc_atomic_flush()
1053 drm_crtc_arm_vblank_event(crtc, event); in ltdc_crtc_atomic_flush()
1055 drm_crtc_send_vblank_event(crtc, event); in ltdc_crtc_atomic_flush()
1060 static bool ltdc_crtc_get_scanout_position(struct drm_crtc *crtc, in ltdc_crtc_get_scanout_position() argument
1066 struct drm_device *ddev = crtc->dev; in ltdc_crtc_get_scanout_position()
1123 static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc) in ltdc_crtc_enable_vblank() argument
1125 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_enable_vblank()
1126 struct drm_crtc_state *state = crtc->state; in ltdc_crtc_enable_vblank()
1138 static void ltdc_crtc_disable_vblank(struct drm_crtc *crtc) in ltdc_crtc_disable_vblank() argument
1140 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_disable_vblank()
1146 static int ltdc_crtc_set_crc_source(struct drm_crtc *crtc, const char *source) in ltdc_crtc_set_crc_source() argument
1153 if (!crtc) in ltdc_crtc_set_crc_source()
1156 ldev = crtc_to_ltdc(crtc); in ltdc_crtc_set_crc_source()
1172 static int ltdc_crtc_verify_crc_source(struct drm_crtc *crtc, in ltdc_crtc_verify_crc_source() argument
1177 if (!crtc) in ltdc_crtc_verify_crc_source()
1182 source, crtc->name); in ltdc_crtc_verify_crc_source()
1193 struct drm_crtc *crtc = state->crtc; in ltdc_crtc_atomic_print_state() local
1194 struct ltdc_device *ldev = crtc_to_ltdc(crtc); in ltdc_crtc_atomic_print_state()
1276 if (!newstate->crtc || !fb) { in ltdc_plane_atomic_update()
1525 oldstate->crtc->base.id, plane->base.id); in ltdc_plane_atomic_disable()
1644 static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc) in ltdc_crtc_init() argument
1669 ret = drmm_crtc_init_with_planes(ddev, crtc, primary, NULL, in ltdc_crtc_init()
1672 ret = drmm_crtc_init_with_planes(ddev, crtc, primary, NULL, in ltdc_crtc_init()
1679 drm_crtc_helper_add(crtc, &ltdc_crtc_helper_funcs); in ltdc_crtc_init()
1681 drm_mode_crtc_set_gamma_size(crtc, CLUT_SIZE); in ltdc_crtc_init()
1682 drm_crtc_enable_color_mgmt(crtc, 0, false, CLUT_SIZE); in ltdc_crtc_init()
1684 DRM_DEBUG_DRIVER("CRTC:%d created\n", crtc->base.id); in ltdc_crtc_init()
1905 struct drm_crtc *crtc; in ltdc_load() local
2027 crtc = drmm_kzalloc(ddev, sizeof(*crtc), GFP_KERNEL); in ltdc_load()
2028 if (!crtc) { in ltdc_load()
2034 ret = ltdc_crtc_init(ddev, crtc); in ltdc_load()