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()
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()
204 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_create()
210 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_create()
218 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
222 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_create()
231 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_dbuf_destroy() local
237 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_dbuf_destroy()
238 if (unlikely(!evtchnl)) in xen_drm_front_dbuf_destroy()
250 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
253 req = be_prepare_req(evtchnl, XENDISPL_OP_DBUF_DESTROY); in xen_drm_front_dbuf_destroy()
256 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_dbuf_destroy()
260 ret = be_stream_wait_io(evtchnl); in xen_drm_front_dbuf_destroy()
269 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_dbuf_destroy()
277 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_attach() local
283 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_attach()
284 if (unlikely(!evtchnl)) in xen_drm_front_fb_attach()
293 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
296 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_ATTACH); in xen_drm_front_fb_attach()
303 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_attach()
307 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_attach()
309 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_attach()
316 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_fb_detach() local
321 evtchnl = &front_info->evt_pairs[GENERIC_OP_EVT_CHNL].req; in xen_drm_front_fb_detach()
322 if (unlikely(!evtchnl)) in xen_drm_front_fb_detach()
325 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
328 req = be_prepare_req(evtchnl, XENDISPL_OP_FB_DETACH); in xen_drm_front_fb_detach()
331 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_fb_detach()
335 ret = be_stream_wait_io(evtchnl); in xen_drm_front_fb_detach()
337 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_fb_detach()
344 struct xen_drm_front_evtchnl *evtchnl; in xen_drm_front_page_flip() local
352 evtchnl = &front_info->evt_pairs[conn_idx].req; in xen_drm_front_page_flip()
354 mutex_lock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()
357 req = be_prepare_req(evtchnl, XENDISPL_OP_PG_FLIP); in xen_drm_front_page_flip()
360 ret = be_stream_do_io(evtchnl, req); in xen_drm_front_page_flip()
364 ret = be_stream_wait_io(evtchnl); in xen_drm_front_page_flip()
366 mutex_unlock(&evtchnl->u.req.req_io_lock); in xen_drm_front_page_flip()