Home
last modified time | relevance | path

Searched refs:kobj (Results 1 – 25 of 35) sorted by relevance

12

/openbsd-src/sys/dev/pci/drm/i915/gt/
H A Dsysfs_engines.c21 static struct intel_engine_cs *kobj_to_engine(struct kobject *kobj) in kobj_to_engine() argument
23 return container_of(kobj, struct kobj_engine, base)->engine; in kobj_to_engine()
27 name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in name_show() argument
29 return sysfs_emit(buf, "%s\n", kobj_to_engine(kobj)->name); in name_show()
36 class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in class_show() argument
38 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_class); in class_show()
45 inst_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in inst_show() argument
47 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_instance); in inst_show()
54 mmio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in mmio_show() argument
56 return sysfs_emit(buf, "0x%x\n", kobj_to_engine(kobj)->mmio_base); in mmio_show()
[all …]
H A Dintel_gt_sysfs_pm.c30 sysfs_gt_attribute_w_func(struct kobject *kobj, struct attribute *attr, in sysfs_gt_attribute_w_func() argument
36 if (!is_object_gt(kobj)) { in sysfs_gt_attribute_w_func()
38 struct device *dev = kobj_to_dev(kobj); in sysfs_gt_attribute_w_func()
47 gt = intel_gt_sysfs_get_drvdata(kobj, attr->name); in sysfs_gt_attribute_w_func()
55 sysfs_gt_attribute_r_func(struct kobject *kobj, struct attribute *attr, in sysfs_gt_attribute_r_func() argument
64 if (!is_object_gt(kobj)) { in sysfs_gt_attribute_r_func()
66 struct device *dev = kobj_to_dev(kobj); in sysfs_gt_attribute_r_func()
85 gt = intel_gt_sysfs_get_drvdata(kobj, attr->name); in sysfs_gt_attribute_r_func()
101 static ssize_t _name##_show_common(struct kobject *kobj, \
104 u32 val = sysfs_gt_attribute_r_##_attr_type##_func(kobj, attr, \
[all …]
H A Dintel_gt_sysfs.c23 bool is_object_gt(struct kobject *kobj) in is_object_gt() argument
25 return !strncmp(kobj->name, "gt", 2); in is_object_gt()
28 struct intel_gt *intel_gt_sysfs_get_drvdata(struct kobject *kobj, in intel_gt_sysfs_get_drvdata() argument
41 if (!is_object_gt(kobj)) { in intel_gt_sysfs_get_drvdata()
42 struct device *dev = kobj_to_dev(kobj); in intel_gt_sysfs_get_drvdata()
48 return kobj_to_gt(kobj); in intel_gt_sysfs_get_drvdata()
53 return &gt->i915->drm.primary->kdev->kobj; in gt_get_parent_obj()
56 static ssize_t id_show(struct kobject *kobj, in id_show() argument
60 struct intel_gt *gt = intel_gt_sysfs_get_drvdata(kobj, attr->attr.name); in id_show()
73 static void kobj_gt_release(struct kobject *kobj) in kobj_gt_release() argument
H A Dintel_gt_sysfs.h17 bool is_object_gt(struct kobject *kobj);
19 struct drm_i915_private *kobj_to_i915(struct kobject *kobj);
21 static inline struct intel_gt *kobj_to_gt(struct kobject *kobj) in kobj_to_gt() argument
23 return container_of(kobj, struct intel_gt, sysfs_gt); in kobj_to_gt()
28 struct intel_gt *intel_gt_sysfs_get_drvdata(struct kobject *kobj,
H A Dintel_gt_sysfs_pm.h13 void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj);
H A Dintel_reset.c1371 struct kobject *kobj = &gt->i915->drm.primary->kdev->kobj; in intel_gt_reset_global() local
1378 kobject_uevent_env(kobj, KOBJ_CHANGE, error_event); in intel_gt_reset_global()
1381 kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event); in intel_gt_reset_global()
1393 kobject_uevent_env(kobj, KOBJ_CHANGE, reset_done_event); in intel_gt_reset_global()
/openbsd-src/sys/dev/pci/drm/i915/
H A Di915_sysfs.c64 i915_l3_read(struct file *filp, struct kobject *kobj, in i915_l3_read() argument
68 struct device *kdev = kobj_to_dev(kobj); in i915_l3_read()
92 i915_l3_write(struct file *filp, struct kobject *kobj, in i915_l3_write() argument
96 struct device *kdev = kobj_to_dev(kobj); in i915_l3_write()
162 static ssize_t error_state_read(struct file *filp, struct kobject *kobj, in error_state_read() argument
167 struct device *kdev = kobj_to_dev(kobj); in error_state_read()
198 static ssize_t error_state_write(struct file *file, struct kobject *kobj, in error_state_write() argument
202 struct device *kdev = kobj_to_dev(kobj); in error_state_write()
221 if (sysfs_create_bin_file(&kdev->kobj, &error_state_attr)) in i915_setup_error_capture()
228 sysfs_remove_bin_file(&kdev->kobj, &error_state_attr); in i915_teardown_error_capture()
[all …]
H A Di915_hwmon.c251 static umode_t hwm_attributes_visible(struct kobject *kobj, in hwm_attributes_visible() argument
254 struct device *dev = kobj_to_dev(kobj); in hwm_attributes_visible()
/openbsd-src/sys/dev/pci/drm/amd/amdkfd/
H A Dkfd_process.c78 struct kobject *kobj; member
298 static ssize_t kfd_procfs_show(struct kobject *kobj, struct attribute *attr, in kfd_procfs_show() argument
337 static void kfd_procfs_kobj_release(struct kobject *kobj) in kfd_procfs_kobj_release()
339 kfree(kobj); in kfd_procfs_kobj_release()
355 procfs.kobj = kfd_alloc_struct(procfs.kobj); in kfd_procfs_init()
356 if (!procfs.kobj) in kfd_procfs_init()
359 ret = kobject_init_and_add(procfs.kobj, &procfs_type, in kfd_procfs_init()
360 &kfd_device->kobj, "proc"); in kfd_procfs_init()
370 if (procfs.kobj) { in kfd_procfs_shutdown()
336 kfd_procfs_kobj_release(struct kobject * kobj) kfd_procfs_kobj_release() argument
376 kfd_procfs_queue_show(struct kobject * kobj,struct attribute * attr,char * buffer) kfd_procfs_queue_show() argument
394 kfd_procfs_stats_show(struct kobject * kobj,struct attribute * attr,char * buffer) kfd_procfs_stats_show() argument
420 kfd_sysfs_counters_show(struct kobject * kobj,struct attribute * attr,char * buf) kfd_sysfs_counters_show() argument
517 kfd_sysfs_create_file(struct kobject * kobj,struct attribute * attr,char * name) kfd_sysfs_create_file() argument
[all...]
H A Dkfd_topology.c229 static ssize_t sysprops_show(struct kobject *kobj, struct attribute *attr, in sysprops_show() argument
254 static void kfd_topology_kobj_release(struct kobject *kobj) in kfd_topology_kobj_release() argument
256 kfree(kobj); in kfd_topology_kobj_release()
268 static ssize_t iolink_show(struct kobject *kobj, struct attribute *attr, in iolink_show() argument
308 static ssize_t mem_show(struct kobject *kobj, struct attribute *attr, in mem_show() argument
340 static ssize_t kfd_cache_show(struct kobject *kobj, struct attribute *attr, in kfd_cache_show() argument
392 static ssize_t perf_show(struct kobject *kobj, struct kobj_attribute *attrs, in perf_show() argument
419 static ssize_t node_show(struct kobject *kobj, struct attribute *attr, in node_show() argument
560 static void kfd_remove_sysfs_file(struct kobject *kobj, struct attribute *attr) in kfd_remove_sysfs_file() argument
562 sysfs_remove_file(kobj, att in kfd_remove_sysfs_file()
[all...]
H A Dkfd_topology.h88 struct kobject *kobj; member
106 struct kobject *kobj; member
126 struct kobject *kobj; member
H A Dkfd_priv.h599 struct kobject kobj; member
950 struct kobject *kobj; member
/openbsd-src/sys/dev/pci/drm/amd/amdgpu/
H A Damdgpu_xgmi.c285 static ssize_t amdgpu_xgmi_show_attrs(struct kobject *kobj, in amdgpu_xgmi_show_attrs() argument
289 kobj, struct amdgpu_hive_info, kobj); in amdgpu_xgmi_show_attrs()
297 static void amdgpu_xgmi_hive_release(struct kobject *kobj) in amdgpu_xgmi_hive_release() argument
300 kobj, struct amdgpu_hive_info, kobj); in amdgpu_xgmi_hive_release()
443 if (hive->kobj.parent != (&adev->dev->kobj)) { in amdgpu_xgmi_sysfs_add_dev_info()
444 ret = sysfs_create_link(&adev->dev->kobj, &hive->kobj, in amdgpu_xgmi_sysfs_add_dev_info()
454 ret = sysfs_create_link(&hive->kobj, &adev->dev->kobj, node); in amdgpu_xgmi_sysfs_add_dev_info()
464 sysfs_remove_link(&adev->dev->kobj, adev_to_drm(adev)->unique); in amdgpu_xgmi_sysfs_add_dev_info()
489 if (hive->kobj.parent != (&adev->dev->kobj)) in amdgpu_xgmi_sysfs_rem_dev_info()
490 sysfs_remove_link(&adev->dev->kobj,"xgmi_hive_info"); in amdgpu_xgmi_sysfs_rem_dev_info()
[all …]
H A Damdgpu_discovery.c673 struct kobject kobj; /* ip_discovery/die/#die/#hw_id/#instance/<attrs...> */ member
772 #define to_ip_hw_instance(x) container_of(x, struct ip_hw_instance, kobj)
775 static ssize_t ip_hw_instance_attr_show(struct kobject *kobj, in ip_hw_instance_attr_show() argument
779 struct ip_hw_instance *ip_hw_instance = to_ip_hw_instance(kobj); in ip_hw_instance_attr_show()
792 static void ip_hw_instance_release(struct kobject *kobj) in ip_hw_instance_release() argument
794 struct ip_hw_instance *ip_hw_instance = to_ip_hw_instance(kobj); in ip_hw_instance_release()
809 static void ip_hw_id_release(struct kobject *kobj) in ip_hw_id_release() argument
811 struct ip_hw_id *ip_hw_id = to_ip_hw_id(kobj); in ip_hw_id_release()
825 static void die_kobj_release(struct kobject *kobj);
826 static void ip_disc_release(struct kobject *kobj);
855 ip_die_entry_attr_show(struct kobject * kobj,struct attribute * attr,char * buf) ip_die_entry_attr_show() argument
868 ip_die_entry_release(struct kobject * kobj) ip_die_entry_release() argument
898 struct kobject kobj; /* ip_discovery/ */ global() member
903 die_kobj_release(struct kobject * kobj) die_kobj_release() argument
912 ip_disc_release(struct kobject * kobj) ip_disc_release() argument
[all...]
H A Damdgpu_fru_eeprom.c295 return sysfs_create_files(&adev->dev->kobj, amdgpu_fru_attributes); in amdgpu_fru_sysfs_init()
303 sysfs_remove_files(&adev->dev->kobj, amdgpu_fru_attributes); in amdgpu_fru_sysfs_fini()
H A Damdgpu_xgmi.h30 struct kobject kobj; member
H A Damdgpu_ras.c1340 struct kobject *kobj, struct bin_attribute *attr, in amdgpu_ras_sysfs_badpages_read() argument
1384 if (adev->dev->kobj.sd) in amdgpu_ras_sysfs_remove_bad_page_node()
1385 sysfs_remove_file_from_group(&adev->dev->kobj, in amdgpu_ras_sysfs_remove_bad_page_node()
1402 if (adev->dev->kobj.sd) in amdgpu_ras_sysfs_remove_feature_node()
1403 sysfs_remove_group(&adev->dev->kobj, &group); in amdgpu_ras_sysfs_remove_feature_node()
1435 if (sysfs_add_file_to_group(&adev->dev->kobj, in amdgpu_ras_sysfs_create()
1457 if (adev->dev->kobj.sd) in amdgpu_ras_sysfs_remove()
1458 sysfs_remove_file_from_group(&adev->dev->kobj, in amdgpu_ras_sysfs_remove()
1635 r = sysfs_create_group(&adev->dev->kobj, &group); in amdgpu_ras_fs_init()
H A Damdgpu_psp.c3610 static ssize_t amdgpu_psp_vbflash_write(struct file *filp, struct kobject *kobj, in amdgpu_psp_vbflash_write()
3617 struct device *dev = kobj_to_dev(kobj); in amdgpu_psp_vbflash_write()
3650 static ssize_t amdgpu_psp_vbflash_read(struct file *filp, struct kobject *kobj, in amdgpu_psp_vbflash_read()
3657 struct device *dev = kobj_to_dev(kobj); in amdgpu_psp_vbflash_read()
3755 static umode_t amdgpu_flash_attr_is_visible(struct kobject *kobj, struct attribute *attr, int idx) in amdgpu_flash_attr_is_visible()
3757 struct device *dev = kobj_to_dev(kobj); in amdgpu_flash_attr_is_visible()
3767 static umode_t amdgpu_bin_flash_attr_is_visible(struct kobject *kobj, in amdgpu_bin_flash_attr_is_visible()
3771 struct device *dev = kobj_to_dev(kobj); in amdgpu_bin_flash_attr_is_visible()
3607 amdgpu_psp_vbflash_write(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buffer,loff_t pos,size_t count) amdgpu_psp_vbflash_write() argument
3647 amdgpu_psp_vbflash_read(struct file * filp,struct kobject * kobj,struct bin_attribute * bin_attr,char * buffer,loff_t pos,size_t count) amdgpu_psp_vbflash_read() argument
3752 amdgpu_flash_attr_is_visible(struct kobject * kobj,struct attribute * attr,int idx) amdgpu_flash_attr_is_visible() argument
3764 amdgpu_bin_flash_attr_is_visible(struct kobject * kobj,struct bin_attribute * attr,int idx) amdgpu_bin_flash_attr_is_visible() argument
H A Damdgpu_ucode.c736 return sysfs_create_group(&adev->dev->kobj, &fw_attr_group); in amdgpu_ucode_sysfs_init()
741 sysfs_remove_group(&adev->dev->kobj, &fw_attr_group); in amdgpu_ucode_sysfs_fini()
/openbsd-src/sys/dev/pci/drm/amd/display/amdgpu_dm/
H A Damdgpu_dm_hdcp.c451 void hdcp_destroy(struct kobject *kobj, struct hdcp_workqueue *hdcp_work) in hdcp_destroy() argument
460 sysfs_remove_bin_file(kobj, &hdcp_work[0].attr); in hdcp_destroy()
616 static ssize_t srm_data_write(struct file *filp, struct kobject *kobj, in srm_data_write() argument
640 static ssize_t srm_data_read(struct file *filp, struct kobject *kobj, in srm_data_read() argument
769 if (sysfs_create_bin_file(&adev->dev->kobj, &hdcp_work[0].attr)) in hdcp_create_workqueue()
H A Damdgpu_dm_hdcp.h85 void hdcp_destroy(struct kobject *kobj, struct hdcp_workqueue *work);
/openbsd-src/sys/dev/pci/drm/i915/gvt/
H A Dfirmware.c54 gvt_firmware_read(struct file *filp, struct kobject *kobj, in gvt_firmware_read() argument
/openbsd-src/sys/dev/pci/drm/
H A Ddrm_drv.c955 ret = sysfs_create_link(minor->kdev->kobj.parent, in create_compat_control_link()
956 &minor->kdev->kobj, in create_compat_control_link()
980 sysfs_remove_link(minor->kdev->kobj.parent, name); in remove_compat_control_link()
/openbsd-src/sys/dev/pci/drm/i915/display/
H A Dintel_sdvo.c2477 return sysfs_create_link(&connector->kdev->kobj, in intel_sdvo_connector_register()
2478 &sdvo->ddc.dev.kobj, in intel_sdvo_connector_register()
2479 sdvo->ddc.dev.kobj.name); in intel_sdvo_connector_register()
2487 sysfs_remove_link(&connector->kdev->kobj, in intel_sdvo_connector_unregister()
2488 sdvo->ddc.dev.kobj.name); in intel_sdvo_connector_unregister()
H A Dintel_hdmi.c2574 struct kobject *i2c_kobj = &adapter->dev.kobj; in intel_hdmi_create_i2c_symlink()
2575 struct kobject *connector_kobj = &connector->kdev->kobj; in intel_hdmi_create_i2c_symlink()
2588 struct kobject *i2c_kobj = &adapter->dev.kobj; in intel_hdmi_remove_i2c_symlink()
2589 struct kobject *connector_kobj = &connector->kdev->kobj; in intel_hdmi_remove_i2c_symlink()

12