1 // SPDX-License-Identifier: MIT
3 * Copyright © 2024 Intel Corporation
8 #include "intel_gt_ccs_mode.h"
9 #include "intel_gt_regs.h"
11 unsigned int intel_gt_apply_ccs_mode(struct intel_gt *gt)
15 int first_ccs = __ffs(CCS_MASK(gt));
17 if (!IS_DG2(gt->i915))
20 /* Build the value for the fixed CCS load balancing */
21 for (cslice = 0; cslice < I915_MAX_CCS; cslice++) {
22 if (CCS_MASK(gt) & BIT(cslice))
24 * If available, assign the cslice
25 * to the first available engine...
27 mode |= XEHP_CCS_MODE_CSLICE(cslice, first_ccs);
31 * ... otherwise, mark the cslice as
32 * unavailable if no CCS dispatches here
34 mode |= XEHP_CCS_MODE_CSLICE(cslice,
35 XEHP_CCS_MODE_CSLICE_MASK);