Lines Matching refs:crtc
14 struct drm_crtc *crtc = &output->crtc; in vkms_vblank_simulate() local
25 ret = drm_crtc_handle_vblank(crtc); in vkms_vblank_simulate()
33 u64 frame = drm_crtc_accurate_vblank_count(crtc); in vkms_vblank_simulate()
56 static int vkms_enable_vblank(struct drm_crtc *crtc) in vkms_enable_vblank() argument
58 struct drm_device *dev = crtc->dev; in vkms_enable_vblank()
59 unsigned int pipe = drm_crtc_index(crtc); in vkms_enable_vblank()
61 struct vkms_output *out = drm_crtc_to_vkms_output(crtc); in vkms_enable_vblank()
63 drm_calc_timestamping_constants(crtc, &crtc->mode); in vkms_enable_vblank()
73 static void vkms_disable_vblank(struct drm_crtc *crtc) in vkms_disable_vblank() argument
75 struct vkms_output *out = drm_crtc_to_vkms_output(crtc); in vkms_disable_vblank()
80 static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc, in vkms_get_vblank_timestamp() argument
84 struct drm_device *dev = crtc->dev; in vkms_get_vblank_timestamp()
85 unsigned int pipe = crtc->index; in vkms_get_vblank_timestamp()
113 vkms_atomic_crtc_duplicate_state(struct drm_crtc *crtc) in vkms_atomic_crtc_duplicate_state() argument
117 if (WARN_ON(!crtc->state)) in vkms_atomic_crtc_duplicate_state()
124 __drm_atomic_helper_crtc_duplicate_state(crtc, &vkms_state->base); in vkms_atomic_crtc_duplicate_state()
131 static void vkms_atomic_crtc_destroy_state(struct drm_crtc *crtc, in vkms_atomic_crtc_destroy_state() argument
143 static void vkms_atomic_crtc_reset(struct drm_crtc *crtc) in vkms_atomic_crtc_reset() argument
148 if (crtc->state) in vkms_atomic_crtc_reset()
149 vkms_atomic_crtc_destroy_state(crtc, crtc->state); in vkms_atomic_crtc_reset()
151 __drm_atomic_helper_crtc_reset(crtc, &vkms_state->base); in vkms_atomic_crtc_reset()
171 static int vkms_crtc_atomic_check(struct drm_crtc *crtc, in vkms_crtc_atomic_check() argument
182 ret = drm_atomic_add_affected_planes(state->state, crtc); in vkms_crtc_atomic_check()
186 drm_for_each_plane_mask(plane, crtc->dev, state->plane_mask) { in vkms_crtc_atomic_check()
203 drm_for_each_plane_mask(plane, crtc->dev, state->plane_mask) { in vkms_crtc_atomic_check()
217 static void vkms_crtc_atomic_enable(struct drm_crtc *crtc, in vkms_crtc_atomic_enable() argument
220 drm_crtc_vblank_on(crtc); in vkms_crtc_atomic_enable()
223 static void vkms_crtc_atomic_disable(struct drm_crtc *crtc, in vkms_crtc_atomic_disable() argument
226 drm_crtc_vblank_off(crtc); in vkms_crtc_atomic_disable()
229 static void vkms_crtc_atomic_begin(struct drm_crtc *crtc, in vkms_crtc_atomic_begin() argument
232 struct vkms_output *vkms_output = drm_crtc_to_vkms_output(crtc); in vkms_crtc_atomic_begin()
240 static void vkms_crtc_atomic_flush(struct drm_crtc *crtc, in vkms_crtc_atomic_flush() argument
243 struct vkms_output *vkms_output = drm_crtc_to_vkms_output(crtc); in vkms_crtc_atomic_flush()
245 if (crtc->state->event) { in vkms_crtc_atomic_flush()
246 spin_lock(&crtc->dev->event_lock); in vkms_crtc_atomic_flush()
248 if (drm_crtc_vblank_get(crtc) != 0) in vkms_crtc_atomic_flush()
249 drm_crtc_send_vblank_event(crtc, crtc->state->event); in vkms_crtc_atomic_flush()
251 drm_crtc_arm_vblank_event(crtc, crtc->state->event); in vkms_crtc_atomic_flush()
253 spin_unlock(&crtc->dev->event_lock); in vkms_crtc_atomic_flush()
255 crtc->state->event = NULL; in vkms_crtc_atomic_flush()
258 vkms_output->composer_state = to_vkms_crtc_state(crtc->state); in vkms_crtc_atomic_flush()
271 int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, in vkms_crtc_init() argument
274 struct vkms_output *vkms_out = drm_crtc_to_vkms_output(crtc); in vkms_crtc_init()
277 ret = drm_crtc_init_with_planes(dev, crtc, primary, cursor, in vkms_crtc_init()
284 drm_crtc_helper_add(crtc, &vkms_crtc_helper_funcs); in vkms_crtc_init()