Lines Matching refs:omap_crtc
28 #define to_omap_crtc(x) container_of(x, struct omap_crtc, base)
30 struct omap_crtc { struct
57 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_timings() argument
58 return &omap_crtc->vm; in omap_crtc_timings()
63 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_channel() local
64 return omap_crtc->channel; in omap_crtc_channel()
69 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_is_pending() local
74 pending = omap_crtc->pending; in omap_crtc_is_pending()
82 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_wait_pending() local
88 return wait_event_timeout(omap_crtc->pending_wait, in omap_crtc_wait_pending()
114 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_set_enabled() local
115 enum omap_channel channel = omap_crtc->channel; in omap_crtc_set_enabled()
120 if (WARN_ON(omap_crtc->enabled == enable)) in omap_crtc_set_enabled()
125 omap_crtc->enabled = enable; in omap_crtc_set_enabled()
129 if (omap_crtc->pipe->output->type == OMAP_DISPLAY_TYPE_HDMI) { in omap_crtc_set_enabled()
131 omap_crtc->enabled = enable; in omap_crtc_set_enabled()
135 if (omap_crtc->channel == OMAP_DSS_CHANNEL_DIGIT) { in omap_crtc_set_enabled()
140 omap_crtc->ignore_digit_sync_lost = true; in omap_crtc_set_enabled()
166 omap_crtc->enabled = enable; in omap_crtc_set_enabled()
171 omap_crtc->name, enable ? "enable" : "disable"); in omap_crtc_set_enabled()
174 if (omap_crtc->channel == OMAP_DSS_CHANNEL_DIGIT) { in omap_crtc_set_enabled()
175 omap_crtc->ignore_digit_sync_lost = false; in omap_crtc_set_enabled()
185 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_enable() local
187 dispc_mgr_set_timings(priv->dispc, omap_crtc->channel, in omap_crtc_dss_enable()
188 &omap_crtc->vm); in omap_crtc_dss_enable()
189 omap_crtc_set_enabled(&omap_crtc->base, true); in omap_crtc_dss_enable()
197 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_disable() local
199 omap_crtc_set_enabled(&omap_crtc->base, false); in omap_crtc_dss_disable()
207 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_set_timings() local
209 DBG("%s", omap_crtc->name); in omap_crtc_dss_set_timings()
210 omap_crtc->vm = *vm; in omap_crtc_dss_set_timings()
218 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_set_lcd_config() local
220 DBG("%s", omap_crtc->name); in omap_crtc_dss_set_lcd_config()
221 dispc_mgr_set_lcd_config(priv->dispc, omap_crtc->channel, in omap_crtc_dss_set_lcd_config()
230 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_register_framedone() local
231 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_dss_register_framedone()
233 if (omap_crtc->framedone_handler) in omap_crtc_dss_register_framedone()
236 dev_dbg(dev->dev, "register framedone %s", omap_crtc->name); in omap_crtc_dss_register_framedone()
238 omap_crtc->framedone_handler = handler; in omap_crtc_dss_register_framedone()
239 omap_crtc->framedone_handler_data = data; in omap_crtc_dss_register_framedone()
249 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_unregister_framedone() local
250 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_dss_unregister_framedone()
252 dev_dbg(dev->dev, "unregister framedone %s", omap_crtc->name); in omap_crtc_dss_unregister_framedone()
254 WARN_ON(omap_crtc->framedone_handler != handler); in omap_crtc_dss_unregister_framedone()
255 WARN_ON(omap_crtc->framedone_handler_data != data); in omap_crtc_dss_unregister_framedone()
257 omap_crtc->framedone_handler = NULL; in omap_crtc_dss_unregister_framedone()
258 omap_crtc->framedone_handler_data = NULL; in omap_crtc_dss_unregister_framedone()
267 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_error_irq() local
269 if (omap_crtc->ignore_digit_sync_lost) { in omap_crtc_error_irq()
275 DRM_ERROR_RATELIMITED("%s: errors: %08x\n", omap_crtc->name, irqstatus); in omap_crtc_error_irq()
280 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_vblank_irq() local
281 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_vblank_irq()
290 if (dispc_mgr_go_busy(priv->dispc, omap_crtc->channel)) { in omap_crtc_vblank_irq()
296 if (omap_crtc->event) { in omap_crtc_vblank_irq()
297 drm_crtc_send_vblank_event(crtc, omap_crtc->event); in omap_crtc_vblank_irq()
298 omap_crtc->event = NULL; in omap_crtc_vblank_irq()
301 pending = omap_crtc->pending; in omap_crtc_vblank_irq()
302 omap_crtc->pending = false; in omap_crtc_vblank_irq()
309 wake_up(&omap_crtc->pending_wait); in omap_crtc_vblank_irq()
311 DBG("%s: apply done", omap_crtc->name); in omap_crtc_vblank_irq()
316 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_framedone_irq() local
318 if (!omap_crtc->framedone_handler) in omap_crtc_framedone_irq()
321 omap_crtc->framedone_handler(omap_crtc->framedone_handler_data); in omap_crtc_framedone_irq()
325 if (omap_crtc->event) { in omap_crtc_framedone_irq()
326 drm_crtc_send_vblank_event(crtc, omap_crtc->event); in omap_crtc_framedone_irq()
327 omap_crtc->event = NULL; in omap_crtc_framedone_irq()
329 omap_crtc->pending = false; in omap_crtc_framedone_irq()
333 wake_up(&omap_crtc->pending_wait); in omap_crtc_framedone_irq()
338 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_flush() local
344 if (!delayed_work_pending(&omap_crtc->update_work)) in omap_crtc_flush()
345 schedule_delayed_work(&omap_crtc->update_work, 0); in omap_crtc_flush()
350 struct omap_crtc *omap_crtc = in omap_crtc_manual_display_update() local
351 container_of(data, struct omap_crtc, update_work.work); in omap_crtc_manual_display_update()
352 struct omap_dss_device *dssdev = omap_crtc->pipe->output; in omap_crtc_manual_display_update()
353 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_manual_display_update()
362 omap_crtc->pending = false; in omap_crtc_manual_display_update()
364 wake_up(&omap_crtc->pending_wait); in omap_crtc_manual_display_update()
398 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_write_crtc_properties() local
416 dispc_mgr_setup(priv->dispc, omap_crtc->channel, &info); in omap_crtc_write_crtc_properties()
425 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_destroy() local
427 DBG("%s", omap_crtc->name); in omap_crtc_destroy()
431 kfree(omap_crtc); in omap_crtc_destroy()
436 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_arm_event() local
438 WARN_ON(omap_crtc->pending); in omap_crtc_arm_event()
439 omap_crtc->pending = true; in omap_crtc_arm_event()
442 omap_crtc->event = crtc->state->event; in omap_crtc_arm_event()
451 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_enable() local
455 DBG("%s", omap_crtc->name); in omap_crtc_atomic_enable()
477 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_disable() local
480 DBG("%s", omap_crtc->name); in omap_crtc_atomic_disable()
489 cancel_delayed_work(&omap_crtc->update_work); in omap_crtc_atomic_disable()
503 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_mode_valid() local
514 if (omap_crtc->pipe->output->type != OMAP_DISPLAY_TYPE_DSI) { in omap_crtc_mode_valid()
516 omap_crtc->channel, in omap_crtc_mode_valid()
554 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_mode_set_nofb() local
558 omap_crtc->name, DRM_MODE_ARG(mode)); in omap_crtc_mode_set_nofb()
560 drm_display_mode_to_videomode(mode, &omap_crtc->vm); in omap_crtc_mode_set_nofb()
565 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_is_manually_updated() local
566 struct omap_dss_device *dssdev = omap_crtc->pipe->output; in omap_crtc_is_manually_updated()
619 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_flush() local
633 dispc_mgr_set_gamma(priv->dispc, omap_crtc->channel, in omap_crtc_atomic_flush()
640 if (!omap_crtc->enabled) in omap_crtc_atomic_flush()
643 DBG("%s: GO", omap_crtc->name); in omap_crtc_atomic_flush()
658 dispc_mgr_go(priv->dispc, omap_crtc->channel); in omap_crtc_atomic_flush()
787 struct omap_crtc *omap_crtc; in omap_crtc_init() local
795 omap_crtc = kzalloc(sizeof(*omap_crtc), GFP_KERNEL); in omap_crtc_init()
796 if (!omap_crtc) in omap_crtc_init()
799 crtc = &omap_crtc->base; in omap_crtc_init()
801 init_waitqueue_head(&omap_crtc->pending_wait); in omap_crtc_init()
803 omap_crtc->pipe = pipe; in omap_crtc_init()
804 omap_crtc->channel = channel; in omap_crtc_init()
805 omap_crtc->name = channel_names[channel]; in omap_crtc_init()
817 INIT_DELAYED_WORK(&omap_crtc->update_work, in omap_crtc_init()
825 kfree(omap_crtc); in omap_crtc_init()