Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2022 Intel Corporation
4 */
5
6#ifndef _XE_GT_MCR_H_
7#define _XE_GT_MCR_H_
8
9#include "regs/xe_reg_defs.h"
10#include "xe_gt_topology.h"
11
12struct drm_printer;
13struct xe_gt;
14
15void xe_gt_mcr_init(struct xe_gt *gt);
16
17void xe_gt_mcr_set_implicit_defaults(struct xe_gt *gt);
18
19u32 xe_gt_mcr_unicast_read(struct xe_gt *gt, struct xe_reg_mcr mcr_reg,
20 int group, int instance);
21u32 xe_gt_mcr_unicast_read_any(struct xe_gt *gt, struct xe_reg_mcr mcr_reg);
22
23void xe_gt_mcr_unicast_write(struct xe_gt *gt, struct xe_reg_mcr mcr_reg,
24 u32 value, int group, int instance);
25void xe_gt_mcr_multicast_write(struct xe_gt *gt, struct xe_reg_mcr mcr_reg,
26 u32 value);
27
28void xe_gt_mcr_steering_dump(struct xe_gt *gt, struct drm_printer *p);
29void xe_gt_mcr_get_dss_steering(struct xe_gt *gt, unsigned int dss, u16 *group, u16 *instance);
30
31/*
32 * Loop over each DSS and determine the group and instance IDs that
33 * should be used to steer MCR accesses toward this DSS.
34 * @dss: DSS ID to obtain steering for
35 * @gt: GT structure
36 * @group: steering group ID, data type: u16
37 * @instance: steering instance ID, data type: u16
38 */
39#define for_each_dss_steering(dss, gt, group, instance) \
40 for_each_dss((dss), (gt)) \
41 for_each_if((xe_gt_mcr_get_dss_steering((gt), (dss), &(group), &(instance)), true))
42
43#endif /* _XE_GT_MCR_H_ */