-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/i915/gt: Enable only one CCS for compute workload
Enable only one CCS engine by default with all the compute sices allocated to it. While generating the list of UABI engines to be exposed to the user, exclude any additional CCS engines beyond the first instance. This change can be tested with igt i915_query. Fixes: d2eae8e ("drm/i915/dg2: Drop force_probe requirement") Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Cc: Chris Wilson <chris.p.wilson@linux.intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: <stable@vger.kernel.org> # v6.2+ Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Acked-by: Michal Mrozek <michal.mrozek@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240328073409.674098-4-andi.shyti@linux.intel.com
- Loading branch information
Andi Shyti
committed
Mar 30, 2024
1 parent
c7a5aa4
commit 2bebae0
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
/* | ||
* Copyright © 2024 Intel Corporation | ||
*/ | ||
|
||
#include "i915_drv.h" | ||
#include "intel_gt.h" | ||
#include "intel_gt_ccs_mode.h" | ||
#include "intel_gt_regs.h" | ||
|
||
void intel_gt_apply_ccs_mode(struct intel_gt *gt) | ||
{ | ||
int cslice; | ||
u32 mode = 0; | ||
int first_ccs = __ffs(CCS_MASK(gt)); | ||
|
||
if (!IS_DG2(gt->i915)) | ||
return; | ||
|
||
/* Build the value for the fixed CCS load balancing */ | ||
for (cslice = 0; cslice < I915_MAX_CCS; cslice++) { | ||
if (CCS_MASK(gt) & BIT(cslice)) | ||
/* | ||
* If available, assign the cslice | ||
* to the first available engine... | ||
*/ | ||
mode |= XEHP_CCS_MODE_CSLICE(cslice, first_ccs); | ||
|
||
else | ||
/* | ||
* ... otherwise, mark the cslice as | ||
* unavailable if no CCS dispatches here | ||
*/ | ||
mode |= XEHP_CCS_MODE_CSLICE(cslice, | ||
XEHP_CCS_MODE_CSLICE_MASK); | ||
} | ||
|
||
intel_uncore_write(gt->uncore, XEHP_CCS_MODE, mode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2024 Intel Corporation | ||
*/ | ||
|
||
#ifndef __INTEL_GT_CCS_MODE_H__ | ||
#define __INTEL_GT_CCS_MODE_H__ | ||
|
||
struct intel_gt; | ||
|
||
void intel_gt_apply_ccs_mode(struct intel_gt *gt); | ||
|
||
#endif /* __INTEL_GT_CCS_MODE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters