Lines Matching full:gt

17  * DOC: Xe GT Throttle
19 * Provides sysfs entries and other helpers for frequency throttle reasons in GT
21 * device/gt#/freq0/throttle/status - Overall status
22 * device/gt#/freq0/throttle/reason_pl1 - Frequency throttle due to PL1
23 * device/gt#/freq0/throttle/reason_pl2 - Frequency throttle due to PL2
24 * device/gt#/freq0/throttle/reason_pl4 - Frequency throttle due to PL4, Iccmax etc.
25 * device/gt#/freq0/throttle/reason_thermal - Frequency throttle due to thermal
26 * device/gt#/freq0/throttle/reason_prochot - Frequency throttle due to prochot
27 * device/gt#/freq0/throttle/reason_ratl - Frequency throttle due to RATL
28 * device/gt#/freq0/throttle/reason_vr_thermalert - Frequency throttle due to VR THERMALERT
29 * device/gt#/freq0/throttle/reason_vr_tdc - Frequency throttle due to VR TDC
38 u32 xe_gt_throttle_get_limit_reasons(struct xe_gt *gt) in xe_gt_throttle_get_limit_reasons() argument
42 xe_pm_runtime_get(gt_to_xe(gt)); in xe_gt_throttle_get_limit_reasons()
43 if (xe_gt_is_media_type(gt)) in xe_gt_throttle_get_limit_reasons()
44 reg = xe_mmio_read32(gt, MTL_MEDIA_PERF_LIMIT_REASONS); in xe_gt_throttle_get_limit_reasons()
46 reg = xe_mmio_read32(gt, GT0_PERF_LIMIT_REASONS); in xe_gt_throttle_get_limit_reasons()
47 xe_pm_runtime_put(gt_to_xe(gt)); in xe_gt_throttle_get_limit_reasons()
52 static u32 read_status(struct xe_gt *gt) in read_status() argument
54 u32 status = xe_gt_throttle_get_limit_reasons(gt) & GT0_PERF_LIMIT_REASONS_MASK; in read_status()
59 static u32 read_reason_pl1(struct xe_gt *gt) in read_reason_pl1() argument
61 u32 pl1 = xe_gt_throttle_get_limit_reasons(gt) & POWER_LIMIT_1_MASK; in read_reason_pl1()
66 static u32 read_reason_pl2(struct xe_gt *gt) in read_reason_pl2() argument
68 u32 pl2 = xe_gt_throttle_get_limit_reasons(gt) & POWER_LIMIT_2_MASK; in read_reason_pl2()
73 static u32 read_reason_pl4(struct xe_gt *gt) in read_reason_pl4() argument
75 u32 pl4 = xe_gt_throttle_get_limit_reasons(gt) & POWER_LIMIT_4_MASK; in read_reason_pl4()
80 static u32 read_reason_thermal(struct xe_gt *gt) in read_reason_thermal() argument
82 u32 thermal = xe_gt_throttle_get_limit_reasons(gt) & THERMAL_LIMIT_MASK; in read_reason_thermal()
87 static u32 read_reason_prochot(struct xe_gt *gt) in read_reason_prochot() argument
89 u32 prochot = xe_gt_throttle_get_limit_reasons(gt) & PROCHOT_MASK; in read_reason_prochot()
94 static u32 read_reason_ratl(struct xe_gt *gt) in read_reason_ratl() argument
96 u32 ratl = xe_gt_throttle_get_limit_reasons(gt) & RATL_MASK; in read_reason_ratl()
101 static u32 read_reason_vr_thermalert(struct xe_gt *gt) in read_reason_vr_thermalert() argument
103 u32 thermalert = xe_gt_throttle_get_limit_reasons(gt) & VR_THERMALERT_MASK; in read_reason_vr_thermalert()
108 static u32 read_reason_vr_tdc(struct xe_gt *gt) in read_reason_vr_tdc() argument
110 u32 tdc = xe_gt_throttle_get_limit_reasons(gt) & VR_TDC_MASK; in read_reason_vr_tdc()
119 struct xe_gt *gt = dev_to_gt(dev); in status_show() local
120 bool status = !!read_status(gt); in status_show()
130 struct xe_gt *gt = dev_to_gt(dev); in reason_pl1_show() local
131 bool pl1 = !!read_reason_pl1(gt); in reason_pl1_show()
141 struct xe_gt *gt = dev_to_gt(dev); in reason_pl2_show() local
142 bool pl2 = !!read_reason_pl2(gt); in reason_pl2_show()
152 struct xe_gt *gt = dev_to_gt(dev); in reason_pl4_show() local
153 bool pl4 = !!read_reason_pl4(gt); in reason_pl4_show()
163 struct xe_gt *gt = dev_to_gt(dev); in reason_thermal_show() local
164 bool thermal = !!read_reason_thermal(gt); in reason_thermal_show()
174 struct xe_gt *gt = dev_to_gt(dev); in reason_prochot_show() local
175 bool prochot = !!read_reason_prochot(gt); in reason_prochot_show()
185 struct xe_gt *gt = dev_to_gt(dev); in reason_ratl_show() local
186 bool ratl = !!read_reason_ratl(gt); in reason_ratl_show()
196 struct xe_gt *gt = dev_to_gt(dev); in reason_vr_thermalert_show() local
197 bool thermalert = !!read_reason_vr_thermalert(gt); in reason_vr_thermalert_show()
207 struct xe_gt *gt = dev_to_gt(dev); in reason_vr_tdc_show() local
208 bool tdc = !!read_reason_vr_tdc(gt); in reason_vr_tdc_show()
234 struct xe_gt *gt = arg; in gt_throttle_sysfs_fini() local
236 sysfs_remove_group(gt->freq, &throttle_group_attrs); in gt_throttle_sysfs_fini()
239 int xe_gt_throttle_init(struct xe_gt *gt) in xe_gt_throttle_init() argument
241 struct xe_device *xe = gt_to_xe(gt); in xe_gt_throttle_init()
244 err = sysfs_create_group(gt->freq, &throttle_group_attrs); in xe_gt_throttle_init()
248 return devm_add_action_or_reset(xe->drm.dev, gt_throttle_sysfs_fini, gt); in xe_gt_throttle_init()