1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2014-2019 Intel Corporation
4  */
5 
6 #ifndef _INTEL_GUC_SUBMISSION_H_
7 #define _INTEL_GUC_SUBMISSION_H_
8 
9 #include <linux/types.h>
10 
11 #include "intel_guc.h"
12 
13 struct intel_engine_cs;
14 
15 void intel_guc_submission_init_early(struct intel_guc *guc);
16 int intel_guc_submission_init(struct intel_guc *guc);
17 void intel_guc_submission_enable(struct intel_guc *guc);
18 void intel_guc_submission_disable(struct intel_guc *guc);
19 void intel_guc_submission_fini(struct intel_guc *guc);
20 int intel_guc_preempt_work_create(struct intel_guc *guc);
21 void intel_guc_preempt_work_destroy(struct intel_guc *guc);
22 bool intel_engine_in_guc_submission_mode(const struct intel_engine_cs *engine);
23 
24 static inline bool intel_guc_submission_is_supported(struct intel_guc *guc)
25 {
26 	/* XXX: GuC submission is unavailable for now */
27 	return false;
28 }
29 
30 static inline bool intel_guc_submission_is_wanted(struct intel_guc *guc)
31 {
32 	return guc->submission_selected;
33 }
34 
35 static inline bool intel_guc_submission_is_used(struct intel_guc *guc)
36 {
37 	return intel_guc_is_used(guc) && intel_guc_submission_is_wanted(guc);
38 }
39 
40 #endif
41