Lines Matching refs:kobj
35 static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj) in xe_hw_engine_sysfs_kobj_release() argument
37 kfree(kobj); in xe_hw_engine_sysfs_kobj_release()
40 static ssize_t xe_hw_engine_class_sysfs_attr_show(struct kobject *kobj, in xe_hw_engine_class_sysfs_attr_show() argument
44 struct xe_device *xe = kobj_to_xe(kobj); in xe_hw_engine_class_sysfs_attr_show()
51 ret = kattr->show(kobj, kattr, buf); in xe_hw_engine_class_sysfs_attr_show()
58 static ssize_t xe_hw_engine_class_sysfs_attr_store(struct kobject *kobj, in xe_hw_engine_class_sysfs_attr_store() argument
63 struct xe_device *xe = kobj_to_xe(kobj); in xe_hw_engine_class_sysfs_attr_store()
70 ret = kattr->store(kobj, kattr, buf, count); in xe_hw_engine_class_sysfs_attr_store()
92 static ssize_t job_timeout_max_store(struct kobject *kobj, in job_timeout_max_store() argument
96 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_max_store()
117 static ssize_t job_timeout_max_show(struct kobject *kobj, in job_timeout_max_show() argument
120 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_max_show()
128 static ssize_t job_timeout_min_store(struct kobject *kobj, in job_timeout_min_store() argument
132 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_min_store()
153 static ssize_t job_timeout_min_show(struct kobject *kobj, in job_timeout_min_show() argument
156 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_min_show()
164 static ssize_t job_timeout_store(struct kobject *kobj, in job_timeout_store() argument
168 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_store()
186 static ssize_t job_timeout_show(struct kobject *kobj, in job_timeout_show() argument
189 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_show()
197 static ssize_t job_timeout_default(struct kobject *kobj, in job_timeout_default() argument
200 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in job_timeout_default()
208 static ssize_t job_timeout_min_default(struct kobject *kobj, in job_timeout_min_default() argument
211 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in job_timeout_min_default()
219 static ssize_t job_timeout_max_default(struct kobject *kobj, in job_timeout_max_default() argument
222 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in job_timeout_max_default()
230 static ssize_t timeslice_duration_store(struct kobject *kobj, in timeslice_duration_store() argument
234 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in timeslice_duration_store()
252 static ssize_t timeslice_duration_max_store(struct kobject *kobj, in timeslice_duration_max_store() argument
256 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in timeslice_duration_max_store()
277 static ssize_t timeslice_duration_max_show(struct kobject *kobj, in timeslice_duration_max_show() argument
281 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in timeslice_duration_max_show()
290 static ssize_t timeslice_duration_min_store(struct kobject *kobj, in timeslice_duration_min_store() argument
294 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in timeslice_duration_min_store()
315 static ssize_t timeslice_duration_min_show(struct kobject *kobj, in timeslice_duration_min_show() argument
319 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in timeslice_duration_min_show()
328 static ssize_t timeslice_duration_show(struct kobject *kobj, in timeslice_duration_show() argument
331 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in timeslice_duration_show()
340 static ssize_t timeslice_default(struct kobject *kobj, in timeslice_default() argument
343 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in timeslice_default()
351 static ssize_t timeslice_min_default(struct kobject *kobj, in timeslice_min_default() argument
354 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in timeslice_min_default()
362 static ssize_t timeslice_max_default(struct kobject *kobj, in timeslice_max_default() argument
365 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in timeslice_max_default()
373 static ssize_t preempt_timeout_store(struct kobject *kobj, in preempt_timeout_store() argument
377 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in preempt_timeout_store()
395 static ssize_t preempt_timeout_show(struct kobject *kobj, in preempt_timeout_show() argument
398 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in preempt_timeout_show()
406 static ssize_t preempt_timeout_default(struct kobject *kobj, in preempt_timeout_default() argument
410 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in preempt_timeout_default()
418 static ssize_t preempt_timeout_min_default(struct kobject *kobj, in preempt_timeout_min_default() argument
422 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in preempt_timeout_min_default()
430 static ssize_t preempt_timeout_max_default(struct kobject *kobj, in preempt_timeout_max_default() argument
434 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent); in preempt_timeout_max_default()
442 static ssize_t preempt_timeout_max_store(struct kobject *kobj, in preempt_timeout_max_store() argument
446 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in preempt_timeout_max_store()
467 static ssize_t preempt_timeout_max_show(struct kobject *kobj, in preempt_timeout_max_show() argument
470 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in preempt_timeout_max_show()
479 static ssize_t preempt_timeout_min_store(struct kobject *kobj, in preempt_timeout_min_store() argument
483 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in preempt_timeout_min_store()
504 static ssize_t preempt_timeout_min_show(struct kobject *kobj, in preempt_timeout_min_show() argument
507 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in preempt_timeout_min_show()
544 struct kobject *kobj = arg; in kobj_xe_hw_engine_class_fini() local
546 sysfs_remove_files(kobj, files); in kobj_xe_hw_engine_class_fini()
547 kobject_put(kobj); in kobj_xe_hw_engine_class_fini()
577 struct kobject *kobj = arg; in hw_engine_class_defaults_fini() local
579 sysfs_remove_files(kobj, defaults); in hw_engine_class_defaults_fini()
580 kobject_put(kobj); in hw_engine_class_defaults_fini()
586 struct kobject *kobj; in xe_add_hw_engine_class_defaults() local
589 kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); in xe_add_hw_engine_class_defaults()
590 if (!kobj) in xe_add_hw_engine_class_defaults()
593 kobject_init(kobj, &kobj_xe_hw_engine_type_def); in xe_add_hw_engine_class_defaults()
594 err = kobject_add(kobj, parent, "%s", ".defaults"); in xe_add_hw_engine_class_defaults()
598 err = sysfs_create_files(kobj, defaults); in xe_add_hw_engine_class_defaults()
602 return devm_add_action_or_reset(xe->drm.dev, hw_engine_class_defaults_fini, kobj); in xe_add_hw_engine_class_defaults()
605 kobject_put(kobj); in xe_add_hw_engine_class_defaults()
613 struct kobject *kobj = arg; in hw_engine_class_sysfs_fini() local
615 kobject_put(kobj); in hw_engine_class_sysfs_fini()
632 struct kobject *kobj; in xe_hw_engine_class_sysfs_init() local
636 kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); in xe_hw_engine_class_sysfs_init()
637 if (!kobj) in xe_hw_engine_class_sysfs_init()
640 kobject_init(kobj, &kobj_xe_hw_engine_type); in xe_hw_engine_class_sysfs_init()
642 err = kobject_add(kobj, gt->sysfs, "engines"); in xe_hw_engine_class_sysfs_init()
664 keclass = kobj_xe_hw_engine_class(xe, kobj, name); in xe_hw_engine_class_sysfs_init()
680 return devm_add_action_or_reset(xe->drm.dev, hw_engine_class_sysfs_fini, kobj); in xe_hw_engine_class_sysfs_init()
683 kobject_put(kobj); in xe_hw_engine_class_sysfs_init()