Allow user to configure the CCS mode setting through a 'ccs_mode' sysfs interface. Also report the current CCS mode configuration and number of compute slices available through this interface. v2: Rebase, make it platform agnostic v3: Separte out num_cslices sysfs interface and make xe_gt_ccs_mode_sysfs_init() return void Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
25 lines
520 B
C
25 lines
520 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GT_CCS_MODE_H_
|
|
#define _XE_GT_CCS_MODE_H_
|
|
|
|
#include "xe_device_types.h"
|
|
#include "xe_gt.h"
|
|
#include "xe_gt_types.h"
|
|
#include "xe_platform_types.h"
|
|
|
|
void xe_gt_apply_ccs_mode(struct xe_gt *gt);
|
|
void xe_gt_ccs_mode_sysfs_init(struct xe_gt *gt);
|
|
|
|
static inline bool xe_gt_ccs_mode_enabled(const struct xe_gt *gt)
|
|
{
|
|
/* Check if there are more than one compute engines available */
|
|
return hweight32(CCS_MASK(gt)) > 1;
|
|
}
|
|
|
|
#endif
|
|
|