Lines Matching refs:xef

73 	struct xe_file *xef;  in xe_file_open()  local
77 xef = kzalloc(sizeof(*xef), GFP_KERNEL); in xe_file_open()
78 if (!xef) in xe_file_open()
83 kfree(xef); in xe_file_open()
87 xef->drm = file; in xe_file_open()
88 xef->client = client; in xe_file_open()
89 xef->xe = xe; in xe_file_open()
91 mutex_init(&xef->vm.lock); in xe_file_open()
92 xa_init_flags(&xef->vm.xa, XA_FLAGS_ALLOC1); in xe_file_open()
94 mutex_init(&xef->exec_queue.lock); in xe_file_open()
95 xa_init_flags(&xef->exec_queue.xa, XA_FLAGS_ALLOC1); in xe_file_open()
97 file->driver_priv = xef; in xe_file_open()
98 kref_init(&xef->refcount); in xe_file_open()
102 xef->process_name = kstrdup(task->comm, GFP_KERNEL); in xe_file_open()
103 xef->pid = task->pid; in xe_file_open()
112 struct xe_file *xef = container_of(ref, struct xe_file, refcount); in xe_file_destroy() local
114 xa_destroy(&xef->exec_queue.xa); in xe_file_destroy()
115 mutex_destroy(&xef->exec_queue.lock); in xe_file_destroy()
116 xa_destroy(&xef->vm.xa); in xe_file_destroy()
117 mutex_destroy(&xef->vm.lock); in xe_file_destroy()
119 xe_drm_client_put(xef->client); in xe_file_destroy()
120 kfree(xef->process_name); in xe_file_destroy()
121 kfree(xef); in xe_file_destroy()
133 struct xe_file *xe_file_get(struct xe_file *xef) in xe_file_get() argument
135 kref_get(&xef->refcount); in xe_file_get()
136 return xef; in xe_file_get()
145 void xe_file_put(struct xe_file *xef) in xe_file_put() argument
147 kref_put(&xef->refcount, xe_file_destroy); in xe_file_put()
153 struct xe_file *xef = file->driver_priv; in xe_file_close() local
166 xa_for_each(&xef->exec_queue.xa, idx, q) { in xe_file_close()
172 xa_for_each(&xef->vm.xa, idx, vm) in xe_file_close()
175 xe_file_put(xef); in xe_file_close()