Lines Matching refs:crtc

61 	if (!new_plane_state->crtc)  in zynqmp_dpsub_plane_atomic_check()
64 crtc_state = drm_atomic_get_crtc_state(state, new_plane_state->crtc); in zynqmp_dpsub_plane_atomic_check()
185 static inline struct zynqmp_dpsub *crtc_to_dpsub(struct drm_crtc *crtc) in crtc_to_dpsub() argument
187 return container_of(crtc, struct zynqmp_dpsub_drm, crtc)->dpsub; in crtc_to_dpsub()
190 static void zynqmp_dpsub_crtc_atomic_enable(struct drm_crtc *crtc, in zynqmp_dpsub_crtc_atomic_enable() argument
193 struct zynqmp_dpsub *dpsub = crtc_to_dpsub(crtc); in zynqmp_dpsub_crtc_atomic_enable()
194 struct drm_display_mode *adjusted_mode = &crtc->state->adjusted_mode; in zynqmp_dpsub_crtc_atomic_enable()
216 static void zynqmp_dpsub_crtc_atomic_disable(struct drm_crtc *crtc, in zynqmp_dpsub_crtc_atomic_disable() argument
219 struct zynqmp_dpsub *dpsub = crtc_to_dpsub(crtc); in zynqmp_dpsub_crtc_atomic_disable()
227 old_plane_state = drm_atomic_get_old_plane_state(state, crtc->primary); in zynqmp_dpsub_crtc_atomic_disable()
229 zynqmp_dpsub_plane_atomic_disable(crtc->primary, state); in zynqmp_dpsub_crtc_atomic_disable()
233 drm_crtc_vblank_off(crtc); in zynqmp_dpsub_crtc_atomic_disable()
235 spin_lock_irq(&crtc->dev->event_lock); in zynqmp_dpsub_crtc_atomic_disable()
236 if (crtc->state->event) { in zynqmp_dpsub_crtc_atomic_disable()
237 drm_crtc_send_vblank_event(crtc, crtc->state->event); in zynqmp_dpsub_crtc_atomic_disable()
238 crtc->state->event = NULL; in zynqmp_dpsub_crtc_atomic_disable()
240 spin_unlock_irq(&crtc->dev->event_lock); in zynqmp_dpsub_crtc_atomic_disable()
246 static int zynqmp_dpsub_crtc_atomic_check(struct drm_crtc *crtc, in zynqmp_dpsub_crtc_atomic_check() argument
249 return drm_atomic_add_affected_planes(state, crtc); in zynqmp_dpsub_crtc_atomic_check()
252 static void zynqmp_dpsub_crtc_atomic_begin(struct drm_crtc *crtc, in zynqmp_dpsub_crtc_atomic_begin() argument
255 drm_crtc_vblank_on(crtc); in zynqmp_dpsub_crtc_atomic_begin()
258 static void zynqmp_dpsub_crtc_atomic_flush(struct drm_crtc *crtc, in zynqmp_dpsub_crtc_atomic_flush() argument
261 if (crtc->state->event) { in zynqmp_dpsub_crtc_atomic_flush()
265 event = crtc->state->event; in zynqmp_dpsub_crtc_atomic_flush()
266 crtc->state->event = NULL; in zynqmp_dpsub_crtc_atomic_flush()
268 event->pipe = drm_crtc_index(crtc); in zynqmp_dpsub_crtc_atomic_flush()
270 WARN_ON(drm_crtc_vblank_get(crtc) != 0); in zynqmp_dpsub_crtc_atomic_flush()
272 spin_lock_irq(&crtc->dev->event_lock); in zynqmp_dpsub_crtc_atomic_flush()
273 drm_crtc_arm_vblank_event(crtc, event); in zynqmp_dpsub_crtc_atomic_flush()
274 spin_unlock_irq(&crtc->dev->event_lock); in zynqmp_dpsub_crtc_atomic_flush()
286 static int zynqmp_dpsub_crtc_enable_vblank(struct drm_crtc *crtc) in zynqmp_dpsub_crtc_enable_vblank() argument
288 struct zynqmp_dpsub *dpsub = crtc_to_dpsub(crtc); in zynqmp_dpsub_crtc_enable_vblank()
295 static void zynqmp_dpsub_crtc_disable_vblank(struct drm_crtc *crtc) in zynqmp_dpsub_crtc_disable_vblank() argument
297 struct zynqmp_dpsub *dpsub = crtc_to_dpsub(crtc); in zynqmp_dpsub_crtc_disable_vblank()
316 struct drm_crtc *crtc = &dpsub->drm->crtc; in zynqmp_dpsub_create_crtc() local
319 ret = drm_crtc_init_with_planes(&dpsub->drm->dev, crtc, plane, in zynqmp_dpsub_create_crtc()
324 drm_crtc_helper_add(crtc, &zynqmp_dpsub_crtc_helper_funcs); in zynqmp_dpsub_create_crtc()
327 drm_crtc_vblank_off(crtc); in zynqmp_dpsub_create_crtc()
334 u32 possible_crtcs = drm_crtc_mask(&dpsub->drm->crtc); in zynqmp_dpsub_map_crtc_to_plane()
350 drm_crtc_handle_vblank(&dpsub->drm->crtc); in zynqmp_dpsub_drm_handle_vblank()
430 encoder->possible_crtcs |= drm_crtc_mask(&dpsub->drm->crtc); in zynqmp_dpsub_kms_init()