Lines Matching full:ss

73 	struct xe_devcoredump_snapshot *ss;  in __xe_devcoredump_read()  local
80 ss = &coredump->snapshot; in __xe_devcoredump_read()
92 ts = ktime_to_timespec64(ss->snapshot_time); in __xe_devcoredump_read()
94 ts = ktime_to_timespec64(ss->boot_time); in __xe_devcoredump_read()
96 drm_printf(&p, "Process: %s\n", ss->process_name); in __xe_devcoredump_read()
117 static void xe_devcoredump_snapshot_free(struct xe_devcoredump_snapshot *ss) in xe_devcoredump_snapshot_free() argument
121 xe_guc_ct_snapshot_free(ss->ct); in xe_devcoredump_snapshot_free()
122 ss->ct = NULL; in xe_devcoredump_snapshot_free()
124 xe_guc_exec_queue_snapshot_free(ss->ge); in xe_devcoredump_snapshot_free()
125 ss->ge = NULL; in xe_devcoredump_snapshot_free()
127 xe_sched_job_snapshot_free(ss->job); in xe_devcoredump_snapshot_free()
128 ss->job = NULL; in xe_devcoredump_snapshot_free()
131 if (ss->hwe[i]) { in xe_devcoredump_snapshot_free()
132 xe_hw_engine_snapshot_free(ss->hwe[i]); in xe_devcoredump_snapshot_free()
133 ss->hwe[i] = NULL; in xe_devcoredump_snapshot_free()
136 xe_vm_snapshot_free(ss->vm); in xe_devcoredump_snapshot_free()
137 ss->vm = NULL; in xe_devcoredump_snapshot_free()
142 struct xe_devcoredump_snapshot *ss = container_of(work, typeof(*ss), work); in xe_devcoredump_deferred_snap_work() local
143 struct xe_devcoredump *coredump = container_of(ss, typeof(*coredump), snapshot); in xe_devcoredump_deferred_snap_work()
146 if (xe_force_wake_get(gt_to_fw(ss->gt), XE_FORCEWAKE_ALL)) in xe_devcoredump_deferred_snap_work()
147 xe_gt_info(ss->gt, "failed to get forcewake for coredump capture\n"); in xe_devcoredump_deferred_snap_work()
148 xe_vm_snapshot_capture_delayed(ss->vm); in xe_devcoredump_deferred_snap_work()
149 xe_guc_exec_queue_snapshot_capture_delayed(ss->ge); in xe_devcoredump_deferred_snap_work()
150 xe_force_wake_put(gt_to_fw(ss->gt), XE_FORCEWAKE_ALL); in xe_devcoredump_deferred_snap_work()
153 ss->read.size = __xe_devcoredump_read(NULL, INT_MAX, coredump); in xe_devcoredump_deferred_snap_work()
155 ss->read.buffer = kvmalloc(ss->read.size, GFP_USER); in xe_devcoredump_deferred_snap_work()
156 if (!ss->read.buffer) in xe_devcoredump_deferred_snap_work()
159 __xe_devcoredump_read(ss->read.buffer, ss->read.size, coredump); in xe_devcoredump_deferred_snap_work()
160 xe_devcoredump_snapshot_free(ss); in xe_devcoredump_deferred_snap_work()
167 struct xe_devcoredump_snapshot *ss; in xe_devcoredump_read() local
173 ss = &coredump->snapshot; in xe_devcoredump_read()
176 flush_work(&ss->work); in xe_devcoredump_read()
178 if (!ss->read.buffer) in xe_devcoredump_read()
181 if (offset >= ss->read.size) in xe_devcoredump_read()
184 byte_copied = count < ss->read.size - offset ? count : in xe_devcoredump_read()
185 ss->read.size - offset; in xe_devcoredump_read()
186 memcpy(buffer, ss->read.buffer + offset, byte_copied); in xe_devcoredump_read()
214 struct xe_devcoredump_snapshot *ss = &coredump->snapshot; in devcoredump_snapshot() local
226 ss->snapshot_time = ktime_get_real(); in devcoredump_snapshot()
227 ss->boot_time = ktime_get_boottime(); in devcoredump_snapshot()
231 strscpy(ss->process_name, process_name); in devcoredump_snapshot()
233 ss->gt = q->gt; in devcoredump_snapshot()
234 INIT_WORK(&ss->work, xe_devcoredump_deferred_snap_work); in devcoredump_snapshot()
248 xe_gt_info(ss->gt, "failed to get forcewake for coredump capture\n"); in devcoredump_snapshot()
264 queue_work(system_unbound_wq, &ss->work); in devcoredump_snapshot()