forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/i915/i915_pmu.h
....@@ -10,7 +10,7 @@
1010 #include <linux/hrtimer.h>
1111 #include <linux/perf_event.h>
1212 #include <linux/spinlock_types.h>
13
-#include <drm/i915_drm.h>
13
+#include <uapi/drm/i915_drm.h>
1414
1515 struct drm_i915_private;
1616
....@@ -18,7 +18,7 @@
1818 __I915_SAMPLE_FREQ_ACT = 0,
1919 __I915_SAMPLE_FREQ_REQ,
2020 __I915_SAMPLE_RC6,
21
- __I915_SAMPLE_RC6_ESTIMATED,
21
+ __I915_SAMPLE_RC6_LAST_REPORTED,
2222 __I915_NUM_PMU_SAMPLERS
2323 };
2424
....@@ -31,19 +31,28 @@
3131 ((1 << I915_PMU_SAMPLE_BITS) + \
3232 (I915_PMU_LAST + 1 - __I915_PMU_OTHER(0)))
3333
34
+#define I915_ENGINE_SAMPLE_COUNT (I915_SAMPLE_SEMA + 1)
35
+
3436 struct i915_pmu_sample {
3537 u64 cur;
3638 };
3739
3840 struct i915_pmu {
3941 /**
40
- * @node: List node for CPU hotplug handling.
42
+ * @cpuhp: Struct used for CPU hotplug handling.
4143 */
42
- struct hlist_node node;
44
+ struct {
45
+ struct hlist_node node;
46
+ enum cpuhp_state slot;
47
+ } cpuhp;
4348 /**
4449 * @base: PMU base.
4550 */
4651 struct pmu base;
52
+ /**
53
+ * @name: Name as registered with perf core.
54
+ */
55
+ const char *name;
4756 /**
4857 * @lock: Lock protecting enable mask and ref count handling.
4958 */
....@@ -95,9 +104,13 @@
95104 */
96105 struct i915_pmu_sample sample[__I915_NUM_PMU_SAMPLERS];
97106 /**
98
- * @suspended_jiffies_last: Cached suspend time from PM core.
107
+ * @sleep_last: Last time GT parked for RC6 estimation.
99108 */
100
- unsigned long suspended_jiffies_last;
109
+ ktime_t sleep_last;
110
+ /**
111
+ * @events_attr_group: Device events attribute group.
112
+ */
113
+ struct attribute_group events_attr_group;
101114 /**
102115 * @i915_attr: Memory block holding device attributes.
103116 */