Lines Matching refs:xef
66 struct xe_file *xef; in xe_file_open() local
70 xef = kzalloc(sizeof(*xef), GFP_KERNEL); in xe_file_open()
71 if (!xef) in xe_file_open()
76 kfree(xef); in xe_file_open()
80 xef->drm = file; in xe_file_open()
81 xef->client = client; in xe_file_open()
82 xef->xe = xe; in xe_file_open()
84 mutex_init(&xef->vm.lock); in xe_file_open()
85 xa_init_flags(&xef->vm.xa, XA_FLAGS_ALLOC1); in xe_file_open()
87 mutex_init(&xef->exec_queue.lock); in xe_file_open()
88 xa_init_flags(&xef->exec_queue.xa, XA_FLAGS_ALLOC1); in xe_file_open()
90 file->driver_priv = xef; in xe_file_open()
91 kref_init(&xef->refcount); in xe_file_open()
95 xef->process_name = kstrdup(task->comm, GFP_KERNEL); in xe_file_open()
96 xef->pid = task->pid; in xe_file_open()
105 struct xe_file *xef = container_of(ref, struct xe_file, refcount); in xe_file_destroy() local
107 xa_destroy(&xef->exec_queue.xa); in xe_file_destroy()
108 mutex_destroy(&xef->exec_queue.lock); in xe_file_destroy()
109 xa_destroy(&xef->vm.xa); in xe_file_destroy()
110 mutex_destroy(&xef->vm.lock); in xe_file_destroy()
112 xe_drm_client_put(xef->client); in xe_file_destroy()
113 kfree(xef->process_name); in xe_file_destroy()
114 kfree(xef); in xe_file_destroy()
126 struct xe_file *xe_file_get(struct xe_file *xef) in xe_file_get() argument
128 kref_get(&xef->refcount); in xe_file_get()
129 return xef; in xe_file_get()
138 void xe_file_put(struct xe_file *xef) in xe_file_put() argument
140 kref_put(&xef->refcount, xe_file_destroy); in xe_file_put()
146 struct xe_file *xef = file->driver_priv; in xe_file_close() local
159 xa_for_each(&xef->exec_queue.xa, idx, q) { in xe_file_close()
165 xa_for_each(&xef->vm.xa, idx, vm) in xe_file_close()
168 xe_file_put(xef); in xe_file_close()