Skip to content

Commit 9a0b11d

Browse files
harishchegondiashutoshx
authored andcommitted
drm/xe/eustall: Add support to init, enable and disable EU stall sampling
Implement EU stall sampling APIs introduced in the previous patch for Xe_HPC (PVC). Add register definitions and the code that accesses these registers to the APIs. Add initialization and clean up functions and their implementations, EU stall enable and disable functions. v11: Move stream->xecore_buf alloc to xe_eu_stall_data_buf_alloc(). Register xe_eu_stall_fini() with devm_add_action_or_reset() instead of calling it from xe_gt_fini(). Changed a couple of variables in struct xe_eu_stall_data_stream from unsigned int to int. v10: Fixed error rewinding code Moved code around as per review feedback v9: Moved structure definitions from xe_eu_stall.h to xe_eu_stall.c Moved read and poll implementations to the next patch Used xe_bo_create_pin_map_at_aligned instead of xe_bo_create_pin_map Changed lock names as per review feedback Moved drop data handling into a subsequent patch Moved code around as per review feedback v8: Updated copyright year in xe_eu_stall_regs.h to 2025. Renamed struct drm_xe_eu_stall_data_pvc to struct xe_eu_stall_data_pvc since it is a local structure. v6: Fix buffer wrap around over write bug (Matt Olson) Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: Harish Chegondi <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/b6aeca593d521828a0b4fbf6cfd2844716c4fc66.1740533885.git.harish.chegondi@intel.com
1 parent 1537ec8 commit 9a0b11d

File tree

5 files changed

+409
-7
lines changed

5 files changed

+409
-7
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/*
3+
* Copyright © 2025 Intel Corporation
4+
*/
5+
6+
#ifndef _XE_EU_STALL_REGS_H_
7+
#define _XE_EU_STALL_REGS_H_
8+
9+
#include "regs/xe_reg_defs.h"
10+
11+
#define XEHPC_EUSTALL_BASE XE_REG_MCR(0xe520)
12+
#define XEHPC_EUSTALL_BASE_BUF_ADDR REG_GENMASK(31, 6)
13+
#define XEHPC_EUSTALL_BASE_XECORE_BUF_SZ REG_GENMASK(5, 3)
14+
#define XEHPC_EUSTALL_BASE_ENABLE_SAMPLING REG_BIT(1)
15+
16+
#define XEHPC_EUSTALL_BASE_UPPER XE_REG_MCR(0xe524)
17+
18+
#define XEHPC_EUSTALL_REPORT XE_REG_MCR(0xe528, XE_REG_OPTION_MASKED)
19+
#define XEHPC_EUSTALL_REPORT_WRITE_PTR_MASK REG_GENMASK(15, 2)
20+
#define XEHPC_EUSTALL_REPORT_OVERFLOW_DROP REG_BIT(1)
21+
22+
#define XEHPC_EUSTALL_REPORT1 XE_REG_MCR(0xe52c, XE_REG_OPTION_MASKED)
23+
#define XEHPC_EUSTALL_REPORT1_READ_PTR_MASK REG_GENMASK(15, 2)
24+
25+
#define XEHPC_EUSTALL_CTRL XE_REG_MCR(0xe53c, XE_REG_OPTION_MASKED)
26+
#define EUSTALL_MOCS REG_GENMASK(9, 3)
27+
#define EUSTALL_SAMPLE_RATE REG_GENMASK(2, 0)
28+
29+
#endif

0 commit comments

Comments
 (0)