Skip to content

Commit d104d7e

Browse files
harishchegondiLucas De Marchi
authored andcommitted
drm/xe/xe3p: Add xe3p EU stall data format
Starting with Xe3p, IP address in EU stall data increases to 61 bits. While at it, re-order the if-else ladder so the officially supported platforms come before PVC. Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://lore.kernel.org/r/20251016-xe3p-v3-24-3dd173a3097a@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent bf3035f commit d104d7e

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

drivers/gpu/drm/xe/xe_eu_stall.c

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,27 @@ struct xe_eu_stall_data_xe2 {
124124
__u64 unused[6];
125125
} __packed;
126126

127+
/*
128+
* EU stall data format for Xe3p arch GPUs.
129+
*/
130+
struct xe_eu_stall_data_xe3p {
131+
__u64 ip_addr:61; /* Bits 0 to 60 */
132+
__u64 tdr_count:8; /* Bits 61 to 68 */
133+
__u64 other_count:8; /* Bits 69 to 76 */
134+
__u64 control_count:8; /* Bits 77 to 84 */
135+
__u64 pipestall_count:8; /* Bits 85 to 92 */
136+
__u64 send_count:8; /* Bits 93 to 100 */
137+
__u64 dist_acc_count:8; /* Bits 101 to 108 */
138+
__u64 sbid_count:8; /* Bits 109 to 116 */
139+
__u64 sync_count:8; /* Bits 117 to 124 */
140+
__u64 inst_fetch_count:8; /* Bits 125 to 132 */
141+
__u64 active_count:8; /* Bits 133 to 140 */
142+
__u64 ex_id:3; /* Bits 141 to 143 */
143+
__u64 end_flag:1; /* Bit 144 */
144+
__u64 unused_bits:47;
145+
__u64 unused[5];
146+
} __packed;
147+
127148
const u64 eu_stall_sampling_rates[] = {251, 251 * 2, 251 * 3, 251 * 4, 251 * 5, 251 * 6, 251 * 7};
128149

129150
/**
@@ -167,10 +188,13 @@ size_t xe_eu_stall_data_record_size(struct xe_device *xe)
167188
{
168189
size_t record_size = 0;
169190

170-
if (xe->info.platform == XE_PVC)
171-
record_size = sizeof(struct xe_eu_stall_data_pvc);
191+
if (GRAPHICS_VER(xe) >= 35)
192+
record_size = sizeof(struct xe_eu_stall_data_xe3p);
172193
else if (GRAPHICS_VER(xe) >= 20)
173194
record_size = sizeof(struct xe_eu_stall_data_xe2);
195+
else if (xe->info.platform == XE_PVC)
196+
record_size = sizeof(struct xe_eu_stall_data_pvc);
197+
174198

175199
xe_assert(xe, is_power_of_2(record_size));
176200

0 commit comments

Comments
 (0)