• Home
  • Raw
  • Download

Lines Matching full:crtc

39 static struct drm_encoder *sun4i_crtc_get_encoder(struct drm_crtc *crtc)  in sun4i_crtc_get_encoder()  argument
43 drm_for_each_encoder(encoder, crtc->dev) in sun4i_crtc_get_encoder()
44 if (encoder->crtc == crtc) in sun4i_crtc_get_encoder()
50 static int sun4i_crtc_atomic_check(struct drm_crtc *crtc, in sun4i_crtc_atomic_check() argument
53 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_atomic_check()
63 static void sun4i_crtc_atomic_begin(struct drm_crtc *crtc, in sun4i_crtc_atomic_begin() argument
66 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_atomic_begin()
67 struct drm_device *dev = crtc->dev; in sun4i_crtc_atomic_begin()
71 if (crtc->state->event) { in sun4i_crtc_atomic_begin()
72 WARN_ON(drm_crtc_vblank_get(crtc) != 0); in sun4i_crtc_atomic_begin()
75 scrtc->event = crtc->state->event; in sun4i_crtc_atomic_begin()
77 crtc->state->event = NULL; in sun4i_crtc_atomic_begin()
84 static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc, in sun4i_crtc_atomic_flush() argument
87 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_atomic_flush()
88 struct drm_pending_vblank_event *event = crtc->state->event; in sun4i_crtc_atomic_flush()
95 crtc->state->event = NULL; in sun4i_crtc_atomic_flush()
97 spin_lock_irq(&crtc->dev->event_lock); in sun4i_crtc_atomic_flush()
98 if (drm_crtc_vblank_get(crtc) == 0) in sun4i_crtc_atomic_flush()
99 drm_crtc_arm_vblank_event(crtc, event); in sun4i_crtc_atomic_flush()
101 drm_crtc_send_vblank_event(crtc, event); in sun4i_crtc_atomic_flush()
102 spin_unlock_irq(&crtc->dev->event_lock); in sun4i_crtc_atomic_flush()
106 static void sun4i_crtc_atomic_disable(struct drm_crtc *crtc, in sun4i_crtc_atomic_disable() argument
109 struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc); in sun4i_crtc_atomic_disable()
110 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_atomic_disable()
112 DRM_DEBUG_DRIVER("Disabling the CRTC\n"); in sun4i_crtc_atomic_disable()
114 drm_crtc_vblank_off(crtc); in sun4i_crtc_atomic_disable()
118 if (crtc->state->event && !crtc->state->active) { in sun4i_crtc_atomic_disable()
119 spin_lock_irq(&crtc->dev->event_lock); in sun4i_crtc_atomic_disable()
120 drm_crtc_send_vblank_event(crtc, crtc->state->event); in sun4i_crtc_atomic_disable()
121 spin_unlock_irq(&crtc->dev->event_lock); in sun4i_crtc_atomic_disable()
123 crtc->state->event = NULL; in sun4i_crtc_atomic_disable()
127 static void sun4i_crtc_atomic_enable(struct drm_crtc *crtc, in sun4i_crtc_atomic_enable() argument
130 struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc); in sun4i_crtc_atomic_enable()
131 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_atomic_enable()
133 DRM_DEBUG_DRIVER("Enabling the CRTC\n"); in sun4i_crtc_atomic_enable()
137 drm_crtc_vblank_on(crtc); in sun4i_crtc_atomic_enable()
140 static void sun4i_crtc_mode_set_nofb(struct drm_crtc *crtc) in sun4i_crtc_mode_set_nofb() argument
142 struct drm_display_mode *mode = &crtc->state->adjusted_mode; in sun4i_crtc_mode_set_nofb()
143 struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc); in sun4i_crtc_mode_set_nofb()
144 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_mode_set_nofb()
158 static int sun4i_crtc_enable_vblank(struct drm_crtc *crtc) in sun4i_crtc_enable_vblank() argument
160 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_enable_vblank()
162 DRM_DEBUG_DRIVER("Enabling VBLANK on crtc %p\n", crtc); in sun4i_crtc_enable_vblank()
169 static void sun4i_crtc_disable_vblank(struct drm_crtc *crtc) in sun4i_crtc_disable_vblank() argument
171 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); in sun4i_crtc_disable_vblank()
173 DRM_DEBUG_DRIVER("Disabling VBLANK on crtc %p\n", crtc); in sun4i_crtc_disable_vblank()
227 ret = drm_crtc_init_with_planes(drm, &scrtc->crtc, in sun4i_crtc_init()
233 dev_err(drm->dev, "Couldn't init DRM CRTC\n"); in sun4i_crtc_init()
237 drm_crtc_helper_add(&scrtc->crtc, &sun4i_crtc_helper_funcs); in sun4i_crtc_init()
239 /* Set crtc.port to output port node of the tcon */ in sun4i_crtc_init()
240 scrtc->crtc.port = of_graph_get_port_by_id(scrtc->tcon->dev->of_node, in sun4i_crtc_init()
243 /* Set possible_crtcs to this crtc for overlay planes */ in sun4i_crtc_init()
245 uint32_t possible_crtcs = drm_crtc_mask(&scrtc->crtc); in sun4i_crtc_init()