Lines Matching refs:omap_crtc

29 #define to_omap_crtc(x) container_of(x, struct omap_crtc, base)
31 struct omap_crtc { struct
62 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in pipe2vbl() argument
64 return dispc_mgr_get_vsync_irq(omap_crtc->channel); in pipe2vbl()
69 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_timings() local
70 return &omap_crtc->timings; in omap_crtc_timings()
75 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_channel() local
76 return omap_crtc->channel; in omap_crtc_channel()
81 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_wait_pending() local
83 return wait_event_timeout(omap_crtc->pending_wait, in omap_crtc_wait_pending()
84 !omap_crtc->pending, in omap_crtc_wait_pending()
102 static struct omap_crtc *omap_crtcs[8];
135 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_set_enabled() local
136 enum omap_channel channel = omap_crtc->channel; in omap_crtc_set_enabled()
144 if (omap_crtc->channel == OMAP_DSS_CHANNEL_DIGIT) { in omap_crtc_set_enabled()
149 omap_crtc->ignore_digit_sync_lost = true; in omap_crtc_set_enabled()
178 omap_crtc->name, enable ? "enable" : "disable"); in omap_crtc_set_enabled()
181 if (omap_crtc->channel == OMAP_DSS_CHANNEL_DIGIT) { in omap_crtc_set_enabled()
182 omap_crtc->ignore_digit_sync_lost = false; in omap_crtc_set_enabled()
191 struct omap_crtc *omap_crtc = omap_crtcs[mgr->id]; in omap_crtc_dss_enable() local
200 dispc_mgr_setup(omap_crtc->channel, &info); in omap_crtc_dss_enable()
201 dispc_mgr_set_timings(omap_crtc->channel, in omap_crtc_dss_enable()
202 &omap_crtc->timings); in omap_crtc_dss_enable()
203 omap_crtc_set_enabled(&omap_crtc->base, true); in omap_crtc_dss_enable()
210 struct omap_crtc *omap_crtc = omap_crtcs[mgr->id]; in omap_crtc_dss_disable() local
212 omap_crtc_set_enabled(&omap_crtc->base, false); in omap_crtc_dss_disable()
218 struct omap_crtc *omap_crtc = omap_crtcs[mgr->id]; in omap_crtc_dss_set_timings() local
219 DBG("%s", omap_crtc->name); in omap_crtc_dss_set_timings()
220 omap_crtc->timings = *timings; in omap_crtc_dss_set_timings()
226 struct omap_crtc *omap_crtc = omap_crtcs[mgr->id]; in omap_crtc_dss_set_lcd_config() local
227 DBG("%s", omap_crtc->name); in omap_crtc_dss_set_lcd_config()
228 dispc_mgr_set_lcd_config(omap_crtc->channel, config); in omap_crtc_dss_set_lcd_config()
289 struct omap_crtc *omap_crtc = in omap_crtc_error_irq() local
290 container_of(irq, struct omap_crtc, error_irq); in omap_crtc_error_irq()
292 if (omap_crtc->ignore_digit_sync_lost) { in omap_crtc_error_irq()
298 DRM_ERROR_RATELIMITED("%s: errors: %08x\n", omap_crtc->name, irqstatus); in omap_crtc_error_irq()
303 struct omap_crtc *omap_crtc = in omap_crtc_vblank_irq() local
304 container_of(irq, struct omap_crtc, vblank_irq); in omap_crtc_vblank_irq()
305 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_vblank_irq()
307 if (dispc_mgr_go_busy(omap_crtc->channel)) in omap_crtc_vblank_irq()
310 DBG("%s: apply done", omap_crtc->name); in omap_crtc_vblank_irq()
312 __omap_irq_unregister(dev, &omap_crtc->vblank_irq); in omap_crtc_vblank_irq()
315 WARN_ON(!omap_crtc->pending); in omap_crtc_vblank_irq()
316 omap_crtc->pending = false; in omap_crtc_vblank_irq()
320 omap_crtc_complete_page_flip(&omap_crtc->base); in omap_crtc_vblank_irq()
323 wake_up(&omap_crtc->pending_wait); in omap_crtc_vblank_irq()
332 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_destroy() local
334 DBG("%s", omap_crtc->name); in omap_crtc_destroy()
336 WARN_ON(omap_crtc->vblank_irq.registered); in omap_crtc_destroy()
337 omap_irq_unregister(crtc->dev, &omap_crtc->error_irq); in omap_crtc_destroy()
341 kfree(omap_crtc); in omap_crtc_destroy()
353 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_enable() local
355 DBG("%s", omap_crtc->name); in omap_crtc_enable()
358 WARN_ON(omap_crtc->pending); in omap_crtc_enable()
359 omap_crtc->pending = true; in omap_crtc_enable()
362 omap_irq_register(crtc->dev, &omap_crtc->vblank_irq); in omap_crtc_enable()
369 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_disable() local
371 DBG("%s", omap_crtc->name); in omap_crtc_disable()
378 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_mode_set_nofb() local
382 omap_crtc->name, mode->base.id, mode->name, in omap_crtc_mode_set_nofb()
388 copy_timings_drm_to_omap(&omap_crtc->timings, mode); in omap_crtc_mode_set_nofb()
399 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_flush() local
401 WARN_ON(omap_crtc->vblank_irq.registered); in omap_crtc_atomic_flush()
403 if (dispc_mgr_is_enabled(omap_crtc->channel)) { in omap_crtc_atomic_flush()
405 DBG("%s: GO", omap_crtc->name); in omap_crtc_atomic_flush()
408 WARN_ON(omap_crtc->pending); in omap_crtc_atomic_flush()
409 omap_crtc->pending = true; in omap_crtc_atomic_flush()
412 dispc_mgr_go(omap_crtc->channel); in omap_crtc_atomic_flush()
413 omap_irq_register(crtc->dev, &omap_crtc->vblank_irq); in omap_crtc_atomic_flush()
499 struct omap_crtc *omap_crtc; in omap_crtc_init() local
504 omap_crtc = kzalloc(sizeof(*omap_crtc), GFP_KERNEL); in omap_crtc_init()
505 if (!omap_crtc) in omap_crtc_init()
508 crtc = &omap_crtc->base; in omap_crtc_init()
510 init_waitqueue_head(&omap_crtc->pending_wait); in omap_crtc_init()
512 omap_crtc->channel = channel; in omap_crtc_init()
513 omap_crtc->name = channel_names[channel]; in omap_crtc_init()
515 omap_crtc->vblank_irq.irqmask = pipe2vbl(crtc); in omap_crtc_init()
516 omap_crtc->vblank_irq.irq = omap_crtc_vblank_irq; in omap_crtc_init()
518 omap_crtc->error_irq.irqmask = in omap_crtc_init()
520 omap_crtc->error_irq.irq = omap_crtc_error_irq; in omap_crtc_init()
521 omap_irq_register(dev, &omap_crtc->error_irq); in omap_crtc_init()
524 omap_crtc->mgr = omap_dss_get_overlay_manager(channel); in omap_crtc_init()
529 kfree(omap_crtc); in omap_crtc_init()
537 omap_crtcs[channel] = omap_crtc; in omap_crtc_init()