File Index
Files and directories
Sign in
FILE

xe_gsc_types.h

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/xe/xe_gsc_types.h C
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2023 Intel Corporation
 4 */
 5
 6#ifndef _XE_GSC_TYPES_H_
 7#define _XE_GSC_TYPES_H_
 8
 9#include <linux/iosys-map.h>
10#include <linux/mutex.h>
11#include <linux/spinlock.h>
12#include <linux/types.h>
13#include <linux/workqueue.h>
14
15#include "xe_uc_fw_types.h"
16#include "xe_device_types.h"
17
18struct xe_bo;
19struct xe_exec_queue;
20struct i915_gsc_proxy_component;
21
22/**
23 * struct xe_gsc - GSC
24 */
25struct xe_gsc {
26	/** @fw: Generic uC firmware management */
27	struct xe_uc_fw fw;
28
29	/** @security_version: SVN found in the fetched blob */
30	u32 security_version;
31
32	/** @private: Private data for use by the GSC FW */
33	struct xe_bo *private;
34
35	/** @q: Default queue used for submissions to GSC FW */
36	struct xe_exec_queue *q;
37
38	/** @wq: workqueue to handle jobs for delayed load and proxy handling */
39	struct workqueue_struct *wq;
40
41	/** @work: delayed load and proxy handling work */
42	struct work_struct work;
43
44	/** @lock: protects access to the work_actions mask */
45	spinlock_t lock;
46
47	/** @work_actions: mask of actions to be performed in the work */
48	u32 work_actions;
49#define GSC_ACTION_FW_LOAD BIT(0)
50#define GSC_ACTION_SW_PROXY BIT(1)
51#define GSC_ACTION_ER_COMPLETE BIT(2)
52
53	/** @proxy: sub-structure containing the SW proxy-related variables */
54	struct {
55		/** @proxy.component: struct for communication with mei component */
56		struct i915_gsc_proxy_component *component;
57		/** @proxy.mutex: protects the component binding and usage */
58		struct mutex mutex;
59		/** @proxy.component_added: whether the component has been added */
60		bool component_added;
61		/** @proxy.started: whether the proxy has been started */
62		bool started;
63		/** @proxy.bo: object to store message to and from the GSC */
64		struct xe_bo *bo;
65		/** @proxy.to_gsc: map of the memory used to send messages to the GSC */
66		struct iosys_map to_gsc;
67		/** @proxy.from_gsc: map of the memory used to recv messages from the GSC */
68		struct iosys_map from_gsc;
69		/** @proxy.to_csme: pointer to the memory used to send messages to CSME */
70		void *to_csme;
71		/** @proxy.from_csme: pointer to the memory used to recv messages from CSME */
72		void *from_csme;
73	} proxy;
74};
75
76#endif
~/ Read-only file preview.