mirror of
https://github.com/torvalds/linux.git
synced 2026-04-28 11:32:28 -04:00
CCS save/restore is supported starting with GuC 70.48.0 (compatibility
version 1.23.0). Gate the feature on the GuC firmware version and keep it
disabled on older or unsupported versions.
Fixes: f3009272ff ("drm/xe/vf: Create contexts for CCS read write")
Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20250902103256.21658-2-satyanarayana.k.v.p@intel.com
49 lines
1.2 KiB
C
49 lines
1.2 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_SRIOV_H_
|
|
#define _XE_SRIOV_H_
|
|
|
|
#include "xe_assert.h"
|
|
#include "xe_device_types.h"
|
|
#include "xe_sriov_types.h"
|
|
|
|
struct drm_printer;
|
|
|
|
const char *xe_sriov_mode_to_string(enum xe_sriov_mode mode);
|
|
const char *xe_sriov_function_name(unsigned int n, char *buf, size_t len);
|
|
|
|
void xe_sriov_probe_early(struct xe_device *xe);
|
|
void xe_sriov_print_info(struct xe_device *xe, struct drm_printer *p);
|
|
int xe_sriov_init(struct xe_device *xe);
|
|
int xe_sriov_init_late(struct xe_device *xe);
|
|
|
|
static inline enum xe_sriov_mode xe_device_sriov_mode(const struct xe_device *xe)
|
|
{
|
|
xe_assert(xe, xe->sriov.__mode);
|
|
return xe->sriov.__mode;
|
|
}
|
|
|
|
static inline bool xe_device_is_sriov_pf(const struct xe_device *xe)
|
|
{
|
|
return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_PF;
|
|
}
|
|
|
|
static inline bool xe_device_is_sriov_vf(const struct xe_device *xe)
|
|
{
|
|
return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_VF;
|
|
}
|
|
|
|
#ifdef CONFIG_PCI_IOV
|
|
#define IS_SRIOV_PF(xe) xe_device_is_sriov_pf(xe)
|
|
#else
|
|
#define IS_SRIOV_PF(xe) (typecheck(struct xe_device *, (xe)) && false)
|
|
#endif
|
|
#define IS_SRIOV_VF(xe) xe_device_is_sriov_vf(xe)
|
|
|
|
#define IS_SRIOV(xe) (IS_SRIOV_PF(xe) || IS_SRIOV_VF(xe))
|
|
|
|
#endif
|