summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_sriov_vf_ccs.h
blob: 0745c0ff022828e19cf231e185630d8d8d90029e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2025 Intel Corporation
 */

#ifndef _XE_SRIOV_VF_CCS_H_
#define _XE_SRIOV_VF_CCS_H_

#include "xe_device_types.h"
#include "xe_sriov.h"
#include "xe_sriov_vf_ccs_types.h"

struct drm_printer;
struct xe_device;
struct xe_bo;

int xe_sriov_vf_ccs_init(struct xe_device *xe);
int xe_sriov_vf_ccs_attach_bo(struct xe_bo *bo);
int xe_sriov_vf_ccs_detach_bo(struct xe_bo *bo);
int xe_sriov_vf_ccs_register_context(struct xe_device *xe);
void xe_sriov_vf_ccs_print(struct xe_device *xe, struct drm_printer *p);

static inline bool xe_sriov_vf_ccs_ready(struct xe_device *xe)
{
	xe_assert(xe, IS_SRIOV_VF(xe));
	return xe->sriov.vf.ccs.initialized;
}

#define IS_VF_CCS_READY(xe) ({ \
	struct xe_device *xe__ = (xe); \
	IS_SRIOV_VF(xe__) && xe_sriov_vf_ccs_ready(xe__); \
	})

#endif