Lines Matching refs:xef

78 	struct xe_file *xef;  in xe_file_open()  local
82 xef = kzalloc(sizeof(*xef), GFP_KERNEL); in xe_file_open()
83 if (!xef) in xe_file_open()
88 kfree(xef); in xe_file_open()
92 xef->drm = file; in xe_file_open()
93 xef->client = client; in xe_file_open()
94 xef->xe = xe; in xe_file_open()
96 mutex_init(&xef->vm.lock); in xe_file_open()
97 xa_init_flags(&xef->vm.xa, XA_FLAGS_ALLOC1); in xe_file_open()
99 mutex_init(&xef->exec_queue.lock); in xe_file_open()
100 xa_init_flags(&xef->exec_queue.xa, XA_FLAGS_ALLOC1); in xe_file_open()
102 file->driver_priv = xef; in xe_file_open()
103 kref_init(&xef->refcount); in xe_file_open()
107 xef->process_name = kstrdup(task->comm, GFP_KERNEL); in xe_file_open()
108 xef->pid = task->pid; in xe_file_open()
117 struct xe_file *xef = container_of(ref, struct xe_file, refcount); in xe_file_destroy() local
119 xa_destroy(&xef->exec_queue.xa); in xe_file_destroy()
120 mutex_destroy(&xef->exec_queue.lock); in xe_file_destroy()
121 xa_destroy(&xef->vm.xa); in xe_file_destroy()
122 mutex_destroy(&xef->vm.lock); in xe_file_destroy()
124 xe_drm_client_put(xef->client); in xe_file_destroy()
125 kfree(xef->process_name); in xe_file_destroy()
126 kfree(xef); in xe_file_destroy()
138 struct xe_file *xe_file_get(struct xe_file *xef) in xe_file_get() argument
140 kref_get(&xef->refcount); in xe_file_get()
141 return xef; in xe_file_get()
150 void xe_file_put(struct xe_file *xef) in xe_file_put() argument
152 kref_put(&xef->refcount, xe_file_destroy); in xe_file_put()
158 struct xe_file *xef = file->driver_priv; in xe_file_close() local
171 xa_for_each(&xef->exec_queue.xa, idx, q) { in xe_file_close()
177 xa_for_each(&xef->vm.xa, idx, vm) in xe_file_close()
180 xe_file_put(xef); in xe_file_close()