Lines Matching refs:crtc
83 uint32_t pipe2vbl(struct drm_crtc *crtc) in pipe2vbl() argument
85 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in pipe2vbl()
90 const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc) in omap_crtc_timings() argument
92 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_timings()
96 enum omap_channel omap_crtc_channel(struct drm_crtc *crtc) in omap_crtc_channel() argument
98 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_channel()
146 static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable) in omap_crtc_set_enabled() argument
148 struct drm_device *dev = crtc->dev; in omap_crtc_set_enabled()
149 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_set_enabled()
285 struct drm_crtc *crtc = &omap_crtc->base; in omap_crtc_apply_irq() local
289 crtc->dev->dev_private; in omap_crtc_apply_irq()
291 __omap_irq_unregister(crtc->dev, &omap_crtc->apply_irq); in omap_crtc_apply_irq()
300 struct drm_crtc *crtc = &omap_crtc->base; in apply_worker() local
301 struct drm_device *dev = crtc->dev; in apply_worker()
310 drm_modeset_lock(&crtc->mutex, NULL); in apply_worker()
355 drm_modeset_unlock(&crtc->mutex); in apply_worker()
358 int omap_crtc_apply(struct drm_crtc *crtc, in omap_crtc_apply() argument
361 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_apply()
363 WARN_ON(!drm_modeset_is_locked(&crtc->mutex)); in omap_crtc_apply()
378 struct omap_drm_private *priv = crtc->dev->dev_private; in omap_crtc_apply()
389 struct drm_crtc *crtc = &omap_crtc->base; in omap_crtc_pre_apply() local
390 struct omap_drm_private *priv = crtc->dev->dev_private; in omap_crtc_pre_apply()
397 if (priv->encoders[i]->crtc == crtc) { in omap_crtc_pre_apply()
426 void omap_crtc_flush(struct drm_crtc *crtc) in omap_crtc_flush() argument
428 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_flush()
436 dev_err(crtc->dev->dev, in omap_crtc_flush()
449 static void omap_crtc_destroy(struct drm_crtc *crtc) in omap_crtc_destroy() argument
451 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_destroy()
456 omap_irq_unregister(crtc->dev, &omap_crtc->error_irq); in omap_crtc_destroy()
458 drm_crtc_cleanup(crtc); in omap_crtc_destroy()
463 static void omap_crtc_dpms(struct drm_crtc *crtc, int mode) in omap_crtc_dpms() argument
465 struct omap_drm_private *priv = crtc->dev->dev_private; in omap_crtc_dpms()
466 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_dpms()
474 omap_crtc_apply(crtc, &omap_crtc->apply); in omap_crtc_dpms()
479 if (plane->crtc == crtc) in omap_crtc_dpms()
485 static bool omap_crtc_mode_fixup(struct drm_crtc *crtc, in omap_crtc_mode_fixup() argument
492 static int omap_crtc_mode_set(struct drm_crtc *crtc, in omap_crtc_mode_set() argument
498 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_mode_set()
517 crtc->primary->crtc = crtc; in omap_crtc_mode_set()
519 return omap_plane_mode_set(crtc->primary, crtc, crtc->primary->fb, in omap_crtc_mode_set()
525 static void omap_crtc_prepare(struct drm_crtc *crtc) in omap_crtc_prepare() argument
527 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_prepare()
529 omap_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); in omap_crtc_prepare()
532 static void omap_crtc_commit(struct drm_crtc *crtc) in omap_crtc_commit() argument
534 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_commit()
536 omap_crtc_dpms(crtc, DRM_MODE_DPMS_ON); in omap_crtc_commit()
539 static int omap_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, in omap_crtc_mode_set_base() argument
542 struct drm_plane *plane = crtc->primary; in omap_crtc_mode_set_base()
543 struct drm_display_mode *mode = &crtc->mode; in omap_crtc_mode_set_base()
545 return omap_plane_mode_set(plane, crtc, crtc->primary->fb, in omap_crtc_mode_set_base()
553 struct drm_crtc *crtc = arg; in vblank_cb() local
554 struct drm_device *dev = crtc->dev; in vblank_cb()
555 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in vblank_cb()
580 struct drm_crtc *crtc = &omap_crtc->base; in page_flip_worker() local
581 struct drm_display_mode *mode = &crtc->mode; in page_flip_worker()
584 drm_modeset_lock(&crtc->mutex, NULL); in page_flip_worker()
585 omap_plane_mode_set(crtc->primary, crtc, crtc->primary->fb, in page_flip_worker()
587 crtc->x, crtc->y, mode->hdisplay, mode->vdisplay, in page_flip_worker()
588 vblank_cb, crtc); in page_flip_worker()
589 drm_modeset_unlock(&crtc->mutex); in page_flip_worker()
591 bo = omap_framebuffer_bo(crtc->primary->fb, 0); in page_flip_worker()
597 struct drm_crtc *crtc = arg; in page_flip_cb() local
598 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in page_flip_cb()
599 struct omap_drm_private *priv = crtc->dev->dev_private; in page_flip_cb()
605 static int omap_crtc_page_flip_locked(struct drm_crtc *crtc, in omap_crtc_page_flip_locked() argument
610 struct drm_device *dev = crtc->dev; in omap_crtc_page_flip_locked()
611 struct omap_crtc *omap_crtc = to_omap_crtc(crtc); in omap_crtc_page_flip_locked()
612 struct drm_plane *primary = crtc->primary; in omap_crtc_page_flip_locked()
641 omap_gem_op_async(bo, OMAP_GEM_READ, page_flip_cb, crtc); in omap_crtc_page_flip_locked()
646 static int omap_crtc_set_property(struct drm_crtc *crtc, in omap_crtc_set_property() argument
649 struct omap_drm_private *priv = crtc->dev->dev_private; in omap_crtc_set_property()
652 crtc->invert_dimensions = in omap_crtc_set_property()
656 return omap_plane_set_property(crtc->primary, property, val); in omap_crtc_set_property()
700 struct drm_crtc *crtc = NULL; in omap_crtc_init() local
711 crtc = &omap_crtc->base; in omap_crtc_init()
726 omap_crtc->apply_irq.irqmask = pipe2vbl(crtc); in omap_crtc_init()
744 ret = drm_crtc_init_with_planes(dev, crtc, plane, NULL, in omap_crtc_init()
751 drm_crtc_helper_add(crtc, &omap_crtc_helper_funcs); in omap_crtc_init()
753 omap_plane_install_properties(crtc->primary, &crtc->base); in omap_crtc_init()
757 return crtc; in omap_crtc_init()