Lines Matching defs:xef
88 struct xe_file *xef;
92 xef = kzalloc_obj(*xef);
93 if (!xef)
98 kfree(xef);
102 xef->drm = file;
103 xef->client = client;
104 xef->xe = xe;
106 mutex_init(&xef->vm.lock);
107 xa_init_flags(&xef->vm.xa, XA_FLAGS_ALLOC1);
109 mutex_init(&xef->exec_queue.lock);
110 xa_init_flags(&xef->exec_queue.xa, XA_FLAGS_ALLOC1);
112 file->driver_priv = xef;
113 kref_init(&xef->refcount);
117 xef->process_name = kstrdup(task->comm, GFP_KERNEL);
118 xef->pid = task->pid;
127 struct xe_file *xef = container_of(ref, struct xe_file, refcount);
129 xa_destroy(&xef->exec_queue.xa);
130 mutex_destroy(&xef->exec_queue.lock);
131 xa_destroy(&xef->vm.xa);
132 mutex_destroy(&xef->vm.lock);
134 xe_drm_client_put(xef->client);
135 kfree(xef->process_name);
136 kfree(xef);
141 * @xef: Pointer to the xe file
143 * Anyone with a pointer to xef must take a reference to the xe file
148 struct xe_file *xe_file_get(struct xe_file *xef)
150 kref_get(&xef->refcount);
151 return xef;
156 * @xef: Pointer to the xe file
158 * Used to drop reference to the xef object
160 void xe_file_put(struct xe_file *xef)
162 kref_put(&xef->refcount, xe_file_destroy);
168 struct xe_file *xef = file->driver_priv;
181 xa_for_each(&xef->exec_queue.xa, idx, q) {
187 xa_for_each(&xef->vm.xa, idx, vm)
190 xe_file_put(xef);