Lines Matching +full:0 +full:xe

18  * DOC: Xe PMU (Performance Monitoring Unit)
26 * $ ls /sys/bus/event_source/devices/xe_0000_00_02.0/events/
27 * $ ls /sys/bus/event_source/devices/xe_0000_00_02.0/format/
39 * For gt specific events (gt-*) gt parameter must be passed. All other parameters will be 0.
54 #define XE_PMU_EVENT_ID_MASK GENMASK_ULL(11, 0)
76 #define XE_PMU_EVENT_GT_C6_RESIDENCY 0x01
77 #define XE_PMU_EVENT_ENGINE_ACTIVE_TICKS 0x02
78 #define XE_PMU_EVENT_ENGINE_TOTAL_TICKS 0x03
82 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_to_gt() local
85 return xe_device_get_gt(xe, gt); in event_to_gt()
90 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_to_hwe() local
99 hwe = xe_hw_engine_lookup(xe, eci); in event_to_hwe()
116 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_gt_forcewake() local
124 gt = xe_device_get_gt(xe, config_to_gt_id(config)); in event_gt_forcewake()
153 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_param_valid() local
158 gt = xe_device_get_gt(xe, config_to_gt_id(config)); in event_param_valid()
182 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_destroy() local
187 gt = xe_device_get_gt(xe, config_to_gt_id(event->attr.config)); in xe_pmu_event_destroy()
193 drm_WARN_ON(&xe->drm, event->parent); in xe_pmu_event_destroy()
194 xe_pm_runtime_put(xe); in xe_pmu_event_destroy()
195 drm_dev_put(&xe->drm); in xe_pmu_event_destroy()
200 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_init() local
201 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_init()
214 if (event->cpu < 0) in xe_pmu_event_init()
229 drm_dev_get(&xe->drm); in xe_pmu_event_init()
230 xe_pm_runtime_get(xe); in xe_pmu_event_init()
232 xe_pm_runtime_put(xe); in xe_pmu_event_init()
233 drm_dev_put(&xe->drm); in xe_pmu_event_init()
239 return 0; in xe_pmu_event_init()
245 u64 val = 0; in read_engine_events()
261 return 0; in __xe_pmu_event_read()
271 return 0; in __xe_pmu_event_read()
289 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_read() local
290 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_read()
312 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_start() local
313 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_start()
319 event->hw.state = 0; in xe_pmu_event_start()
324 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_stop() local
325 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_stop()
336 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in xe_pmu_event_add() local
337 struct xe_pmu *pmu = &xe->pmu; in xe_pmu_event_add()
345 return 0; in xe_pmu_event_add()
356 PMU_FORMAT_ATTR(event, "config:0-11");
401 return event_supported(pmu, 0, id_) ? attr->mode : 0; \
442 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in set_supported_events() local
443 struct xe_gt *gt = xe_device_get_gt(xe, 0); in set_supported_events()
445 if (!xe->info.skip_guc_pc) in set_supported_events()
461 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in xe_pmu_unregister() local
473 * xe_pmu_register() - Define basic PMU properties for Xe and add event callbacks.
476 * Returns 0 on success and an appropriate error code otherwise
480 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in xe_pmu_register() local
491 if (IS_SRIOV_VF(xe)) in xe_pmu_register()
492 return 0; in xe_pmu_register()
495 dev_name(xe->drm.dev)); in xe_pmu_register()
523 return devm_add_action_or_reset(xe->drm.dev, xe_pmu_unregister, pmu); in xe_pmu_register()
528 drm_err(&xe->drm, "Failed to register PMU (ret=%d)!\n", ret); in xe_pmu_register()