Lines Matching defs:mgr
9 int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
26 err = xa_alloc(&mgr->handles, id, ctx, xa_limit_32b, GFP_KERNEL);
52 int lima_ctx_free(struct lima_ctx_mgr *mgr, u32 id)
57 mutex_lock(&mgr->lock);
58 ctx = xa_erase(&mgr->handles, id);
63 mutex_unlock(&mgr->lock);
67 struct lima_ctx *lima_ctx_get(struct lima_ctx_mgr *mgr, u32 id)
71 mutex_lock(&mgr->lock);
72 ctx = xa_load(&mgr->handles, id);
75 mutex_unlock(&mgr->lock);
84 void lima_ctx_mgr_init(struct lima_ctx_mgr *mgr)
86 mutex_init(&mgr->lock);
87 xa_init_flags(&mgr->handles, XA_FLAGS_ALLOC);
90 void lima_ctx_mgr_fini(struct lima_ctx_mgr *mgr)
95 xa_for_each(&mgr->handles, id, ctx) {
99 xa_destroy(&mgr->handles);
100 mutex_destroy(&mgr->lock);