Lines Matching refs:crtc
15 static int dcss_enable_vblank(struct drm_crtc *crtc) in dcss_enable_vblank() argument
17 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc, in dcss_enable_vblank()
19 struct dcss_dev *dcss = crtc->dev->dev_private; in dcss_enable_vblank()
30 static void dcss_disable_vblank(struct drm_crtc *crtc) in dcss_disable_vblank() argument
32 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc, in dcss_disable_vblank()
55 static void dcss_crtc_atomic_begin(struct drm_crtc *crtc, in dcss_crtc_atomic_begin() argument
58 drm_crtc_vblank_on(crtc); in dcss_crtc_atomic_begin()
61 static void dcss_crtc_atomic_flush(struct drm_crtc *crtc, in dcss_crtc_atomic_flush() argument
64 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc, in dcss_crtc_atomic_flush()
68 spin_lock_irq(&crtc->dev->event_lock); in dcss_crtc_atomic_flush()
69 if (crtc->state->event) { in dcss_crtc_atomic_flush()
70 WARN_ON(drm_crtc_vblank_get(crtc)); in dcss_crtc_atomic_flush()
71 drm_crtc_arm_vblank_event(crtc, crtc->state->event); in dcss_crtc_atomic_flush()
72 crtc->state->event = NULL; in dcss_crtc_atomic_flush()
74 spin_unlock_irq(&crtc->dev->event_lock); in dcss_crtc_atomic_flush()
80 static void dcss_crtc_atomic_enable(struct drm_crtc *crtc, in dcss_crtc_atomic_enable() argument
84 crtc); in dcss_crtc_atomic_enable()
85 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc, in dcss_crtc_atomic_enable()
88 struct drm_display_mode *mode = &crtc->state->adjusted_mode; in dcss_crtc_atomic_enable()
116 static void dcss_crtc_atomic_disable(struct drm_crtc *crtc, in dcss_crtc_atomic_disable() argument
120 crtc); in dcss_crtc_atomic_disable()
121 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc, in dcss_crtc_atomic_disable()
124 struct drm_display_mode *mode = &crtc->state->adjusted_mode; in dcss_crtc_atomic_disable()
129 spin_lock_irq(&crtc->dev->event_lock); in dcss_crtc_atomic_disable()
130 if (crtc->state->event) { in dcss_crtc_atomic_disable()
131 drm_crtc_send_vblank_event(crtc, crtc->state->event); in dcss_crtc_atomic_disable()
132 crtc->state->event = NULL; in dcss_crtc_atomic_disable()
134 spin_unlock_irq(&crtc->dev->event_lock); in dcss_crtc_atomic_disable()
144 if (!drm_mode_equal(mode, old_mode) || !crtc->state->active) in dcss_crtc_atomic_disable()
155 drm_crtc_vblank_off(crtc); in dcss_crtc_atomic_disable()
184 int dcss_crtc_init(struct dcss_crtc *crtc, struct drm_device *drm) in dcss_crtc_init() argument
190 crtc->plane[0] = dcss_plane_init(drm, drm_crtc_mask(&crtc->base), in dcss_crtc_init()
192 if (IS_ERR(crtc->plane[0])) in dcss_crtc_init()
193 return PTR_ERR(crtc->plane[0]); in dcss_crtc_init()
195 crtc->base.port = dcss->of_port; in dcss_crtc_init()
197 drm_crtc_helper_add(&crtc->base, &dcss_helper_funcs); in dcss_crtc_init()
198 ret = drm_crtc_init_with_planes(drm, &crtc->base, &crtc->plane[0]->base, in dcss_crtc_init()
205 crtc->irq = platform_get_irq_byname(pdev, "vblank"); in dcss_crtc_init()
206 if (crtc->irq < 0) in dcss_crtc_init()
207 return crtc->irq; in dcss_crtc_init()
209 ret = request_irq(crtc->irq, dcss_crtc_irq_handler, in dcss_crtc_init()
210 0, "dcss_drm", crtc); in dcss_crtc_init()
216 disable_irq(crtc->irq); in dcss_crtc_init()
221 void dcss_crtc_deinit(struct dcss_crtc *crtc, struct drm_device *drm) in dcss_crtc_deinit() argument
223 free_irq(crtc->irq, crtc); in dcss_crtc_deinit()