Lines Matching refs:omap_crtc

29 #define to_omap_crtc(x) container_of(x, struct omap_crtc, base)
31 struct omap_crtc { struct
58 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_timings() argument
59 return &omap_crtc->vm; in omap_crtc_timings()
64 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_channel() local
65 return omap_crtc->channel; in omap_crtc_channel()
70 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_is_pending() local
75 pending = omap_crtc->pending; in omap_crtc_is_pending()
83 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_wait_pending() local
89 return wait_event_timeout(omap_crtc->pending_wait, in omap_crtc_wait_pending()
115 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_set_enabled() local
116 enum omap_channel channel = omap_crtc->channel; in omap_crtc_set_enabled()
121 if (WARN_ON(omap_crtc->enabled == enable)) in omap_crtc_set_enabled()
126 omap_crtc->enabled = enable; in omap_crtc_set_enabled()
130 if (omap_crtc->pipe->output->type == OMAP_DISPLAY_TYPE_HDMI) { in omap_crtc_set_enabled()
132 omap_crtc->enabled = enable; in omap_crtc_set_enabled()
136 if (omap_crtc->channel == OMAP_DSS_CHANNEL_DIGIT) { in omap_crtc_set_enabled()
141 omap_crtc->ignore_digit_sync_lost = true; in omap_crtc_set_enabled()
167 omap_crtc->enabled = enable; in omap_crtc_set_enabled()
172 omap_crtc->name, enable ? "enable" : "disable"); in omap_crtc_set_enabled()
175 if (omap_crtc->channel == OMAP_DSS_CHANNEL_DIGIT) { in omap_crtc_set_enabled()
176 omap_crtc->ignore_digit_sync_lost = false; in omap_crtc_set_enabled()
187 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_enable() local
189 priv->dispc_ops->mgr_set_timings(priv->dispc, omap_crtc->channel, in omap_crtc_dss_enable()
190 &omap_crtc->vm); in omap_crtc_dss_enable()
191 omap_crtc_set_enabled(&omap_crtc->base, true); in omap_crtc_dss_enable()
200 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_disable() local
202 omap_crtc_set_enabled(&omap_crtc->base, false); in omap_crtc_dss_disable()
210 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_set_timings() local
212 DBG("%s", omap_crtc->name); in omap_crtc_dss_set_timings()
213 omap_crtc->vm = *vm; in omap_crtc_dss_set_timings()
221 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_set_lcd_config() local
223 DBG("%s", omap_crtc->name); in omap_crtc_dss_set_lcd_config()
224 priv->dispc_ops->mgr_set_lcd_config(priv->dispc, omap_crtc->channel, in omap_crtc_dss_set_lcd_config()
233 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_register_framedone() local
234 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_dss_register_framedone()
236 if (omap_crtc->framedone_handler) in omap_crtc_dss_register_framedone()
239 dev_dbg(dev->dev, "register framedone %s", omap_crtc->name); in omap_crtc_dss_register_framedone()
241 omap_crtc->framedone_handler = handler; in omap_crtc_dss_register_framedone()
242 omap_crtc->framedone_handler_data = data; in omap_crtc_dss_register_framedone()
252 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dss_unregister_framedone() local
253 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_dss_unregister_framedone()
255 dev_dbg(dev->dev, "unregister framedone %s", omap_crtc->name); in omap_crtc_dss_unregister_framedone()
257 WARN_ON(omap_crtc->framedone_handler != handler); in omap_crtc_dss_unregister_framedone()
258 WARN_ON(omap_crtc->framedone_handler_data != data); in omap_crtc_dss_unregister_framedone()
260 omap_crtc->framedone_handler = NULL; in omap_crtc_dss_unregister_framedone()
261 omap_crtc->framedone_handler_data = NULL; in omap_crtc_dss_unregister_framedone()
280 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_error_irq() local
282 if (omap_crtc->ignore_digit_sync_lost) { in omap_crtc_error_irq()
288 DRM_ERROR_RATELIMITED("%s: errors: %08x\n", omap_crtc->name, irqstatus); in omap_crtc_error_irq()
293 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_vblank_irq() local
294 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_vblank_irq()
303 if (priv->dispc_ops->mgr_go_busy(priv->dispc, omap_crtc->channel)) { in omap_crtc_vblank_irq()
309 if (omap_crtc->event) { in omap_crtc_vblank_irq()
310 drm_crtc_send_vblank_event(crtc, omap_crtc->event); in omap_crtc_vblank_irq()
311 omap_crtc->event = NULL; in omap_crtc_vblank_irq()
314 pending = omap_crtc->pending; in omap_crtc_vblank_irq()
315 omap_crtc->pending = false; in omap_crtc_vblank_irq()
322 wake_up(&omap_crtc->pending_wait); in omap_crtc_vblank_irq()
324 DBG("%s: apply done", omap_crtc->name); in omap_crtc_vblank_irq()
329 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_framedone_irq() local
331 if (!omap_crtc->framedone_handler) in omap_crtc_framedone_irq()
334 omap_crtc->framedone_handler(omap_crtc->framedone_handler_data); in omap_crtc_framedone_irq()
338 if (omap_crtc->event) { in omap_crtc_framedone_irq()
339 drm_crtc_send_vblank_event(crtc, omap_crtc->event); in omap_crtc_framedone_irq()
340 omap_crtc->event = NULL; in omap_crtc_framedone_irq()
342 omap_crtc->pending = false; in omap_crtc_framedone_irq()
346 wake_up(&omap_crtc->pending_wait); in omap_crtc_framedone_irq()
351 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_flush() local
357 if (!delayed_work_pending(&omap_crtc->update_work)) in omap_crtc_flush()
358 schedule_delayed_work(&omap_crtc->update_work, 0); in omap_crtc_flush()
363 struct omap_crtc *omap_crtc = in omap_crtc_manual_display_update() local
364 container_of(data, struct omap_crtc, update_work.work); in omap_crtc_manual_display_update()
365 struct drm_display_mode *mode = &omap_crtc->pipe->crtc->mode; in omap_crtc_manual_display_update()
366 struct omap_dss_device *dssdev = omap_crtc->pipe->output->next; in omap_crtc_manual_display_update()
367 struct drm_device *dev = omap_crtc->base.dev; in omap_crtc_manual_display_update()
388 omap_crtc->pending = false; in omap_crtc_manual_display_update()
390 wake_up(&omap_crtc->pending_wait); in omap_crtc_manual_display_update()
397 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_write_crtc_properties() local
407 priv->dispc_ops->mgr_setup(priv->dispc, omap_crtc->channel, &info); in omap_crtc_write_crtc_properties()
416 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_destroy() local
418 DBG("%s", omap_crtc->name); in omap_crtc_destroy()
422 kfree(omap_crtc); in omap_crtc_destroy()
427 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_arm_event() local
429 WARN_ON(omap_crtc->pending); in omap_crtc_arm_event()
430 omap_crtc->pending = true; in omap_crtc_arm_event()
433 omap_crtc->event = crtc->state->event; in omap_crtc_arm_event()
442 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_enable() local
446 DBG("%s", omap_crtc->name); in omap_crtc_atomic_enable()
468 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_disable() local
471 DBG("%s", omap_crtc->name); in omap_crtc_atomic_disable()
480 cancel_delayed_work(&omap_crtc->update_work); in omap_crtc_atomic_disable()
494 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_mode_valid() local
505 if (omap_crtc->pipe->output->next == NULL || in omap_crtc_mode_valid()
506 omap_crtc->pipe->output->next->type != OMAP_DISPLAY_TYPE_DSI) { in omap_crtc_mode_valid()
508 omap_crtc->channel, in omap_crtc_mode_valid()
546 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_mode_set_nofb() local
550 omap_crtc->name, DRM_MODE_ARG(mode)); in omap_crtc_mode_set_nofb()
552 drm_display_mode_to_videomode(mode, &omap_crtc->vm); in omap_crtc_mode_set_nofb()
557 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_is_manually_updated() local
558 struct omap_dss_device *display = omap_crtc->pipe->output->next; in omap_crtc_is_manually_updated()
609 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_atomic_flush() local
623 priv->dispc_ops->mgr_set_gamma(priv->dispc, omap_crtc->channel, in omap_crtc_atomic_flush()
630 if (!omap_crtc->enabled) in omap_crtc_atomic_flush()
633 DBG("%s: GO", omap_crtc->name); in omap_crtc_atomic_flush()
648 priv->dispc_ops->mgr_go(priv->dispc, omap_crtc->channel); in omap_crtc_atomic_flush()
788 struct omap_crtc *omap_crtc; in omap_crtc_init() local
796 omap_crtc = kzalloc(sizeof(*omap_crtc), GFP_KERNEL); in omap_crtc_init()
797 if (!omap_crtc) in omap_crtc_init()
800 crtc = &omap_crtc->base; in omap_crtc_init()
802 init_waitqueue_head(&omap_crtc->pending_wait); in omap_crtc_init()
804 omap_crtc->pipe = pipe; in omap_crtc_init()
805 omap_crtc->channel = channel; in omap_crtc_init()
806 omap_crtc->name = channel_names[channel]; in omap_crtc_init()
818 INIT_DELAYED_WORK(&omap_crtc->update_work, in omap_crtc_init()
826 kfree(omap_crtc); in omap_crtc_init()