Lines Matching refs:evtchnl
89 be_prepare_req(struct xen_drm_front_evtchnl *evtchnl, u8 operation) in be_prepare_req() argument
93 req = RING_GET_REQUEST(&evtchnl->u.req.ring, in be_prepare_req()
94 evtchnl->u.req.ring.req_prod_pvt); in be_prepare_req()
96 req->id = evtchnl->evt_next_id++; in be_prepare_req()
97 evtchnl->evt_id = req->id; in be_prepare_req()
101 static int be_stream_do_io(struct xen_drm_front_evtchnl *evtchnl, in be_stream_do_io() argument
104 reinit_completion(&evtchnl->u.req.completion); in be_stream_do_io()
105 if (unlikely(evtchnl->state != EVTCHNL_STATE_CONNECTED)) in be_stream_do_io()
108 xen_drm_front_evtchnl_flush(evtchnl); in be_stream_do_io()
112 static int be_stream_wait_io(struct xen_drm_front_evtchnl *evtchnl) in be_stream_wait_io() argument
114 if (wait_for_completion_timeout(&evtchnl->u.req.completion, in be_stream_wait_io()
118 return evtchnl->u.req.resp_status; in be_stream_wait_io()
125 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_mode_set() local
132 evtchnl = &front_info->evt_pairs[pipeline->index].req; in xen_drm_front_mode_set()
133 if (unlikely(!evtchnl)) in xen_drm_front_mode_set()
136 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_mode_set()
139 req = be_prepare_req(evtchnl, XENDISPL_OP_SET_CONFIG); in xen_drm_front_mode_set()
147 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_mode_set()
151 ret = be_stream_wait_io(evtchnl); in xen_drm_front_mode_set()
153 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_mode_set()
162 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_create() local
169 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_create()
170 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_create()
190 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
193 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_CREATE); in xen_drm_front_dbuf_create()
205 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_create()
211 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_create()
219 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
223 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
232 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_destroy() local
238 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_destroy()
239 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_destroy()
251 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
254 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_DESTROY); in xen_drm_front_dbuf_destroy()
257 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_destroy()
261 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_destroy()
270 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
278 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_attach() local
284 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_attach()
285 if (unlikely(!evtchnl)) in xen_drm_front_fb_attach()
294 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
297 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_ATTACH); in xen_drm_front_fb_attach()
304 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_attach()
308 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_attach()
310 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
317 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_detach() local
322 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_detach()
323 if (unlikely(!evtchnl)) in xen_drm_front_fb_detach()
326 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
329 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_DETACH); in xen_drm_front_fb_detach()
332 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_detach()
336 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_detach()
338 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
345 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_page_flip() local
353 evtchnl = &front_info->evt_pairs[conn_idx].req; in xen_drm_front_page_flip()
355 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()
358 req = be_prepare_req(evtchnl, XENDISPL_OP_PG_FLIP); in xen_drm_front_page_flip()
361 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_page_flip()
365 ret = be_stream_wait_io(evtchnl); in xen_drm_front_page_flip()
367 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()