Lines Matching +full:0 +full:xe
20 * DOC: Xe PMU (Performance Monitoring Unit)
28 * $ ls /sys/bus/event_source/devices/xe_0000_00_02.0/events/
29 * $ ls /sys/bus/event_source/devices/xe_0000_00_02.0/format/
42 * For gt specific events (gt-*) gt parameter must be passed. All other parameters will be 0.
58 #define XE_PMU_EVENT_ID_MASK GENMASK_ULL(11, 0)
85 #define XE_PMU_EVENT_GT_C6_RESIDENCY 0x01
86 #define XE_PMU_EVENT_ENGINE_ACTIVE_TICKS 0x02
87 #define XE_PMU_EVENT_ENGINE_TOTAL_TICKS 0x03
88 #define XE_PMU_EVENT_GT_ACTUAL_FREQUENCY 0x04
89 #define XE_PMU_EVENT_GT_REQUESTED_FREQUENCY 0x05
93 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_to_gt() local
96 return xe_device_get_gt(xe, gt); in event_to_gt()
101 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_to_hwe() local
110 hwe = xe_hw_engine_lookup(xe, eci); in event_to_hwe()
135 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_gt_forcewake() local
143 gt = xe_device_get_gt(xe, config_to_gt_id(config)); in event_gt_forcewake()
163 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in event_supported() local
164 struct xe_gt *gt = xe_device_get_gt(xe, gt_id); in event_supported()
175 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_param_valid() local
180 gt = xe_device_get_gt(xe, config_to_gt_id(config)); in event_param_valid()
200 /* PF(0) and total vfs when SRIOV is enabled */ in event_param_valid()
201 if (IS_SRIOV_PF(xe)) { in event_param_valid()
202 if (function_id > xe_sriov_pf_get_totalvfs(xe)) in event_param_valid()
216 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_destroy() local
221 gt = xe_device_get_gt(xe, config_to_gt_id(event->attr.config)); in xe_pmu_event_destroy()
227 drm_WARN_ON(&xe->drm, event->parent); in xe_pmu_event_destroy()
228 xe_pm_runtime_put(xe); in xe_pmu_event_destroy()
229 drm_dev_put(&xe->drm); in xe_pmu_event_destroy()
234 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_init() local
235 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_init()
248 if (event->cpu < 0) in xe_pmu_event_init()
263 drm_dev_get(&xe->drm); in xe_pmu_event_init()
264 xe_pm_runtime_get(xe); in xe_pmu_event_init()
266 xe_pm_runtime_put(xe); in xe_pmu_event_init()
267 drm_dev_put(&xe->drm); in xe_pmu_event_init()
273 return 0; in xe_pmu_event_init()
280 u64 config, val = 0; in read_engine_events()
299 return 0; in __xe_pmu_event_read()
313 return 0; in __xe_pmu_event_read()
338 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_read() local
339 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_read()
361 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_start() local
362 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_start()
368 event->hw.state = 0; in xe_pmu_event_start()
373 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_stop() local
374 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_stop()
385 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_add() local
386 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_add()
394 return 0; in xe_pmu_event_add()
406 PMU_FORMAT_ATTR(event, "config:0-11");
452 return event_supported(pmu, 0, id_) ? attr->mode : 0; \
499 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in set_supported_events() local
500 struct xe_gt *gt = xe_device_get_gt(xe, 0); in set_supported_events()
502 if (!xe->info.skip_guc_pc) { in set_supported_events()
521 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in xe_pmu_unregister() local
533 * xe_pmu_register() - Define basic PMU properties for Xe and add event callbacks.
536 * Returns 0 on success and an appropriate error code otherwise
540 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in xe_pmu_register() local
551 if (IS_SRIOV_VF(xe)) in xe_pmu_register()
552 return 0; in xe_pmu_register()
555 dev_name(xe->drm.dev)); in xe_pmu_register()
583 return devm_add_action_or_reset(xe->drm.dev, xe_pmu_unregister, pmu); in xe_pmu_register()
588 drm_err(&xe->drm, "Failed to register PMU (ret=%d)!\n", ret); in xe_pmu_register()