Lines Matching refs:evtchnl
90 be_prepare_req(struct xen_drm_front_evtchnl *evtchnl, u8 operation) in be_prepare_req() argument
94 req = RING_GET_REQUEST(&evtchnl->u.req.ring, in be_prepare_req()
95 evtchnl->u.req.ring.req_prod_pvt); in be_prepare_req()
97 req->id = evtchnl->evt_next_id++; in be_prepare_req()
98 evtchnl->evt_id = req->id; in be_prepare_req()
102 static int be_stream_do_io(struct xen_drm_front_evtchnl *evtchnl, in be_stream_do_io() argument
105 reinit_completion(&evtchnl->u.req.completion); in be_stream_do_io()
106 if (unlikely(evtchnl->state != EVTCHNL_STATE_CONNECTED)) in be_stream_do_io()
109 xen_drm_front_evtchnl_flush(evtchnl); in be_stream_do_io()
113 static int be_stream_wait_io(struct xen_drm_front_evtchnl *evtchnl) in be_stream_wait_io() argument
115 if (wait_for_completion_timeout(&evtchnl->u.req.completion, in be_stream_wait_io()
119 return evtchnl->u.req.resp_status; in be_stream_wait_io()
126 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_mode_set() local
133 evtchnl = &front_info->evt_pairs[pipeline->index].req; in xen_drm_front_mode_set()
134 if (unlikely(!evtchnl)) in xen_drm_front_mode_set()
137 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_mode_set()
140 req = be_prepare_req(evtchnl, XENDISPL_OP_SET_CONFIG); in xen_drm_front_mode_set()
148 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_mode_set()
152 ret = be_stream_wait_io(evtchnl); in xen_drm_front_mode_set()
154 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_mode_set()
163 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_create() local
170 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_create()
171 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_create()
191 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
194 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_CREATE); in xen_drm_front_dbuf_create()
206 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_create()
212 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_create()
220 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
224 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
233 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_destroy() local
239 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_destroy()
240 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_destroy()
252 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
255 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_DESTROY); in xen_drm_front_dbuf_destroy()
258 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_destroy()
262 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_destroy()
271 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
279 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_attach() local
285 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_attach()
286 if (unlikely(!evtchnl)) in xen_drm_front_fb_attach()
295 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
298 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_ATTACH); in xen_drm_front_fb_attach()
305 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_attach()
309 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_attach()
311 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
318 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_detach() local
323 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_detach()
324 if (unlikely(!evtchnl)) in xen_drm_front_fb_detach()
327 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
330 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_DETACH); in xen_drm_front_fb_detach()
333 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_detach()
337 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_detach()
339 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
346 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_page_flip() local
354 evtchnl = &front_info->evt_pairs[conn_idx].req; in xen_drm_front_page_flip()
356 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()
359 req = be_prepare_req(evtchnl, XENDISPL_OP_PG_FLIP); in xen_drm_front_page_flip()
362 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_page_flip()
366 ret = be_stream_wait_io(evtchnl); in xen_drm_front_page_flip()
368 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()