xref: /linux/drivers/gpu/drm/xe/xe_pxp.h (revision 41a97c4a12947c2786a1680d6839bb72d1c57cec)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright(c) 2024, Intel Corporation. All rights reserved.
4  */
5 
6 #ifndef __XE_PXP_H__
7 #define __XE_PXP_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_gem_object;
12 struct xe_bo;
13 struct xe_device;
14 struct xe_exec_queue;
15 struct xe_pxp;
16 
17 bool xe_pxp_is_supported(const struct xe_device *xe);
18 bool xe_pxp_is_enabled(const struct xe_pxp *pxp);
19 int xe_pxp_get_readiness_status(struct xe_pxp *pxp);
20 
21 int xe_pxp_init(struct xe_device *xe);
22 void xe_pxp_irq_handler(struct xe_device *xe, u16 iir);
23 
24 int xe_pxp_exec_queue_set_type(struct xe_pxp *pxp, struct xe_exec_queue *q, u8 type);
25 int xe_pxp_exec_queue_add(struct xe_pxp *pxp, struct xe_exec_queue *q);
26 void xe_pxp_exec_queue_remove(struct xe_pxp *pxp, struct xe_exec_queue *q);
27 
28 int xe_pxp_key_assign(struct xe_pxp *pxp, struct xe_bo *bo);
29 int xe_pxp_bo_key_check(struct xe_pxp *pxp, struct xe_bo *bo);
30 int xe_pxp_obj_key_check(struct xe_pxp *pxp, struct drm_gem_object *obj);
31 
32 #endif /* __XE_PXP_H__ */
33