This source file includes following definitions.
- show_render_basic_id
- i915_perf_load_test_config_hsw
1
2
3
4
5
6
7
8
9 #include <linux/sysfs.h>
10
11 #include "i915_drv.h"
12 #include "i915_oa_hsw.h"
13
14 static const struct i915_oa_reg b_counter_config_render_basic[] = {
15 { _MMIO(0x2724), 0x00800000 },
16 { _MMIO(0x2720), 0x00000000 },
17 { _MMIO(0x2714), 0x00800000 },
18 { _MMIO(0x2710), 0x00000000 },
19 };
20
21 static const struct i915_oa_reg flex_eu_config_render_basic[] = {
22 };
23
24 static const struct i915_oa_reg mux_config_render_basic[] = {
25 { _MMIO(0x9840), 0x00000080 },
26 { _MMIO(0x253a4), 0x01600000 },
27 { _MMIO(0x25440), 0x00100000 },
28 { _MMIO(0x25128), 0x00000000 },
29 { _MMIO(0x2691c), 0x00000800 },
30 { _MMIO(0x26aa0), 0x01500000 },
31 { _MMIO(0x26b9c), 0x00006000 },
32 { _MMIO(0x2791c), 0x00000800 },
33 { _MMIO(0x27aa0), 0x01500000 },
34 { _MMIO(0x27b9c), 0x00006000 },
35 { _MMIO(0x2641c), 0x00000400 },
36 { _MMIO(0x25380), 0x00000010 },
37 { _MMIO(0x2538c), 0x00000000 },
38 { _MMIO(0x25384), 0x0800aaaa },
39 { _MMIO(0x25400), 0x00000004 },
40 { _MMIO(0x2540c), 0x06029000 },
41 { _MMIO(0x25410), 0x00000002 },
42 { _MMIO(0x25404), 0x5c30ffff },
43 { _MMIO(0x25100), 0x00000016 },
44 { _MMIO(0x25110), 0x00000400 },
45 { _MMIO(0x25104), 0x00000000 },
46 { _MMIO(0x26804), 0x00001211 },
47 { _MMIO(0x26884), 0x00000100 },
48 { _MMIO(0x26900), 0x00000002 },
49 { _MMIO(0x26908), 0x00700000 },
50 { _MMIO(0x26904), 0x00000000 },
51 { _MMIO(0x26984), 0x00001022 },
52 { _MMIO(0x26a04), 0x00000011 },
53 { _MMIO(0x26a80), 0x00000006 },
54 { _MMIO(0x26a88), 0x00000c02 },
55 { _MMIO(0x26a84), 0x00000000 },
56 { _MMIO(0x26b04), 0x00001000 },
57 { _MMIO(0x26b80), 0x00000002 },
58 { _MMIO(0x26b8c), 0x00000007 },
59 { _MMIO(0x26b84), 0x00000000 },
60 { _MMIO(0x27804), 0x00004844 },
61 { _MMIO(0x27884), 0x00000400 },
62 { _MMIO(0x27900), 0x00000002 },
63 { _MMIO(0x27908), 0x0e000000 },
64 { _MMIO(0x27904), 0x00000000 },
65 { _MMIO(0x27984), 0x00004088 },
66 { _MMIO(0x27a04), 0x00000044 },
67 { _MMIO(0x27a80), 0x00000006 },
68 { _MMIO(0x27a88), 0x00018040 },
69 { _MMIO(0x27a84), 0x00000000 },
70 { _MMIO(0x27b04), 0x00004000 },
71 { _MMIO(0x27b80), 0x00000002 },
72 { _MMIO(0x27b8c), 0x000000e0 },
73 { _MMIO(0x27b84), 0x00000000 },
74 { _MMIO(0x26104), 0x00002222 },
75 { _MMIO(0x26184), 0x0c006666 },
76 { _MMIO(0x26284), 0x04000000 },
77 { _MMIO(0x26304), 0x04000000 },
78 { _MMIO(0x26400), 0x00000002 },
79 { _MMIO(0x26410), 0x000000a0 },
80 { _MMIO(0x26404), 0x00000000 },
81 { _MMIO(0x25420), 0x04108020 },
82 { _MMIO(0x25424), 0x1284a420 },
83 { _MMIO(0x2541c), 0x00000000 },
84 { _MMIO(0x25428), 0x00042049 },
85 };
86
87 static ssize_t
88 show_render_basic_id(struct device *kdev, struct device_attribute *attr, char *buf)
89 {
90 return sprintf(buf, "1\n");
91 }
92
93 void
94 i915_perf_load_test_config_hsw(struct drm_i915_private *dev_priv)
95 {
96 strlcpy(dev_priv->perf.test_config.uuid,
97 "403d8832-1a27-4aa6-a64e-f5389ce7b212",
98 sizeof(dev_priv->perf.test_config.uuid));
99 dev_priv->perf.test_config.id = 1;
100
101 dev_priv->perf.test_config.mux_regs = mux_config_render_basic;
102 dev_priv->perf.test_config.mux_regs_len = ARRAY_SIZE(mux_config_render_basic);
103
104 dev_priv->perf.test_config.b_counter_regs = b_counter_config_render_basic;
105 dev_priv->perf.test_config.b_counter_regs_len = ARRAY_SIZE(b_counter_config_render_basic);
106
107 dev_priv->perf.test_config.flex_regs = flex_eu_config_render_basic;
108 dev_priv->perf.test_config.flex_regs_len = ARRAY_SIZE(flex_eu_config_render_basic);
109
110 dev_priv->perf.test_config.sysfs_metric.name = "403d8832-1a27-4aa6-a64e-f5389ce7b212";
111 dev_priv->perf.test_config.sysfs_metric.attrs = dev_priv->perf.test_config.attrs;
112
113 dev_priv->perf.test_config.attrs[0] = &dev_priv->perf.test_config.sysfs_metric_id.attr;
114
115 dev_priv->perf.test_config.sysfs_metric_id.attr.name = "id";
116 dev_priv->perf.test_config.sysfs_metric_id.attr.mode = 0444;
117 dev_priv->perf.test_config.sysfs_metric_id.show = show_render_basic_id;
118 }