Lines Matching refs:evtchnl

101 be_prepare_req(struct xen_drm_front_evtchnl *evtchnl, u8 operation)  in be_prepare_req()  argument
105 req = RING_GET_REQUEST(&evtchnl->u.req.ring, in be_prepare_req()
106 evtchnl->u.req.ring.req_prod_pvt); in be_prepare_req()
108 req->id = evtchnl->evt_next_id++; in be_prepare_req()
109 evtchnl->evt_id = req->id; in be_prepare_req()
113 static int be_stream_do_io(struct xen_drm_front_evtchnl *evtchnl, in be_stream_do_io() argument
116 reinit_completion(&evtchnl->u.req.completion); in be_stream_do_io()
117 if (unlikely(evtchnl->state != EVTCHNL_STATE_CONNECTED)) in be_stream_do_io()
120 xen_drm_front_evtchnl_flush(evtchnl); in be_stream_do_io()
124 static int be_stream_wait_io(struct xen_drm_front_evtchnl *evtchnl) in be_stream_wait_io() argument
126 if (wait_for_completion_timeout(&evtchnl->u.req.completion, in be_stream_wait_io()
130 return evtchnl->u.req.resp_status; in be_stream_wait_io()
137 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_mode_set() local
144 evtchnl = &front_info->evt_pairs[pipeline->index].req; in xen_drm_front_mode_set()
145 if (unlikely(!evtchnl)) in xen_drm_front_mode_set()
148 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_mode_set()
151 req = be_prepare_req(evtchnl, XENDISPL_OP_SET_CONFIG); in xen_drm_front_mode_set()
159 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_mode_set()
163 ret = be_stream_wait_io(evtchnl); in xen_drm_front_mode_set()
165 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_mode_set()
173 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_create() local
180 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_create()
181 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_create()
200 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
203 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_CREATE); in xen_drm_front_dbuf_create()
214 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_create()
220 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_create()
228 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
232 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
240 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_destroy() local
246 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_destroy()
247 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_destroy()
259 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
262 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_DESTROY); in xen_drm_front_dbuf_destroy()
265 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_destroy()
269 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_destroy()
278 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
286 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_attach() local
292 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_attach()
293 if (unlikely(!evtchnl)) in xen_drm_front_fb_attach()
302 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
305 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_ATTACH); in xen_drm_front_fb_attach()
312 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_attach()
316 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_attach()
318 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
325 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_detach() local
330 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_detach()
331 if (unlikely(!evtchnl)) in xen_drm_front_fb_detach()
334 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
337 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_DETACH); in xen_drm_front_fb_detach()
340 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_detach()
344 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_detach()
346 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
353 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_page_flip() local
362 evtchnl = &front_info->evt_pairs[conn_idx].req; in xen_drm_front_page_flip()
364 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()
367 req = be_prepare_req(evtchnl, XENDISPL_OP_PG_FLIP); in xen_drm_front_page_flip()
370 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_page_flip()
374 ret = be_stream_wait_io(evtchnl); in xen_drm_front_page_flip()
376 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()