Skip to content

Commit 19b232b

Browse files
committed
Merge tag 'drm-xe-next-2024-02-25' of ssh://gitlab.freedesktop.org/drm/xe/kernel into drm-next
drm/xe feature pull for v6.9: UAPI Changes: - New query to the GuC firmware submission version. (José Roberto de Souza) - Remove unused persistent exec_queues (Thomas Hellström) - Add vram frequency sysfs attributes (Sujaritha Sundaresan, Rodrigo Vivi) - Add the flag XE_VM_BIND_FLAG_DUMPABLE to notify devcoredump that mapping should be dumped (Maarten Lankhorst) Cross-drivers Changes: - Make sure intel_wakeref_t is treated as opaque type on i915-display and fix its type on xe Driver Changes: - Drop pre-production workarounds (Matt Roper) - Drop kunit tests for unsuported platforms: PVC and pre-production DG2 (Lucas De Marchi) - Start pumbling SR-IOV support with memory based interrupts for VF (Michal Wajdeczko) - Allow to map BO in GGTT with PAT index corresponding to XE_CACHE_UC to work with memory based interrupts (Michal Wajdeczko) - Improve logging with GT-oriented drm_printers (Michal Wajdeczko) - Add GuC Doorbells Manager as prep work SR-IOV during VF provisioning ((Michal Wajdeczko) - Refactor fake device handling in kunit integration ((Michal Wajdeczko) - Implement additional workarounds for xe2 and MTL (Tejas Upadhyay, Lucas De Marchi, Shekhar Chauhan, Karthik Poosa) - Program a few registers according to perfomance guide spec for Xe2 (Shekhar Chauhan) - Add error handling for non-blocking communication with GuC (Daniele Ceraolo Spurio) - Fix remaining 32b build issues and enable it back (Lucas De Marchi) - Fix build with CONFIG_DEBUG_FS=n (Jani Nikula) - Fix warnings from GuC ABI headers (Matthew Brost) - Introduce Relay Communication for SR-IOV for VF <-> GuC <-> PF (Michal Wajdeczko) - Add mocs reset kunit (Ruthuvikas Ravikumar) - Fix spellings (Colin Ian King) - Disable mid-thread preemption when not properly supported by hardware (Nirmoy Das) - Release mmap mappings on rpm suspend (Badal Nilawar) - Fix BUG_ON on xe_exec by moving fence reservation to the validate stage (Matthew Auld) - Fix xe_exec by reserving extra fence slot for CPU bind (Matthew Brost) - Fix xe_exec with full long running exec queue, now returning -EWOULDBLOCK to userspace (Matthew Brost) - Fix CT irq handler when CT is disabled (Matthew Brost) - Fix VM_BIND_OP_UNMAP_ALL without any bound vmas (Thomas Hellström) - Fix missing __iomem annotations (Thomas Hellström) - Fix exec queue priority handling with GuC (Brian Welty) - Fix setting SLPC flag to GuC when it's not supported (Vinay Belgaumkar) - Fix C6 disabling without SLPC (Matt Roper) - Drop -Wstringop-overflow to fix build with GCC11 (Paul E. McKenney) - Circumvent bogus -Wstringop-overflow in one case (Arnd Bergmann) - Refactor exec_queue user extensions handling and fix USM attributes being applied too late (Brian Welty) - Use circ_buf head/tail convention (Matthew Brost) - Fail build if circ_buf-related defines are modified with incompatible values (Matthew Brost) - Fix several error paths (Dan Carpenter) - Fix CCS copy for small VRAM copy chunks (Thomas Hellström) - Rework driver initialization order and paths to account for driver running in VF mode (Michal Wajdeczko) - Initialize GuC earlier during probe to handle driver in VF mode (Michał Winiarski) - Fix migration use of MI_STORE_DATA_IMM to write PTEs (Matt Roper) - Fix bounds checking in __xe_bo_placement_for_flags (Brian Welty) - Drop display dependency on CONFIG_EXPERT (Jani Nikula) - Do not hand-roll kstrdup when creating snapshot (Michal Wajdeczko) - Stop creating one kunit module per kunit suite (Lucas De Marchi) - Reduce scope and constify variables (Thomas Hellström, Jani Nikula, Michal Wajdeczko) - Improve and document xe_guc_ct_send_recv() (Michal Wajdeczko) - Add proxy communication between CSME and GSC uC (Daniele Ceraolo Spurio) - Fix size calculation when writing pgtable (Fei Yang) - Make sure cfb is page size aligned in stolen memory (Vinod Govindapillai) - Stop printing guc log to dmesg when waiting for GuC fails (Rodrigo Vivi) - Use XE_CACHE_WB instead of XE_CACHE_NONE for cpu coherency on migration (Himal Prasad Ghimiray) - Fix error path in xe_vm_create (Moti Haimovski) - Fix warnings in doc generation (Thomas Hellström, Badal Nilawar) - Improve devcoredump content for mesa debugging (José Roberto de Souza) - Fix crash in trace_dma_fence_init() (José Roberto de Souza) - Improve CT state change handling (Matthew Brost) - Toggle USM support for Xe2 (Lucas De Marchi) - Reduces code duplication to emit PIPE_CONTROL (José Roberto de Souza) - Canonicalize addresses where needed for Xe2 and add to devcoredump (José Roberto de Souza) - Only allow 1 ufence per exec / bind IOCTL (Matthew Brost) - Move all display code to display/ (Jani Nikula) - Fix sparse warnings by correctly using annotations (Thomas Hellström) - Warn on job timeouts instead of using asserts (Matt Roper) - Prefix macros to avoid clashes with sparc (Matthew Brost) - Fix -Walloc-size by subclassing instead of allocating size smaller than struct (Thomas Hellström) - Add status check during gsc header readout (Suraj Kandpal) - Fix infinite loop in vm_bind_ioctl_ops_unwind() (Matthew Brost) - Fix fence refcounting (Matthew Brost) - Fix picking incorrect userptr VMA (Matthew Brost) - Fix USM on integrated by mapping both mem.kernel_bb_pool and usm.bb_pool (Matthew Brost) - Fix double initialization of display power domains (Xiaoming Wang) - Check expected uC versions by major.minor.patch instead of just major.minor (John Harrison) - Bump minimum GuC version to 70.19.2 for all platforms under force-probe (John Harrison) - Add GuC firmware loading for Lunar Lake (John Harrison) - Use kzalloc() instead of hand-rolled alloc + memset (Nirmoy Das) - Fix max page size of VMA during a REMAP (Matthew Brost) - Don't ignore error when pinning pages in kthread (Matthew Auld) - Refactor xe hwmon (Karthik Poosa) - Add debug logs for D3cold (Riana Tauro) - Remove broken TEST_VM_ASYNC_OPS_ERROR (Matthew Brost) - Always allow to override firmware blob with module param and improve log when no firmware is found (Lucas De Marchi) - Fix shift-out-of-bounds due to xe_vm_prepare_vma() accepting zero fences (Thomas Hellström) - Fix shift-out-of-bounds by distinguishing xe_pt/xe_pt_dir subclass (Thomas Hellström) - Fail driver bind if platform supports MSIX, but fails to allocate all of them (Dani Liberman) - Fix intel_fbdev thinking memory is backed by shmem (Matthew Auld) - Prefer drm_dbg() over dev_dbg() (Jani Nikula) - Avoid function cast warnings with clang-16 (Arnd Bergmann) - Enhance xe_bo_move trace (Priyanka Dandamudi) - Fix xe_vma_set_pte_size() not setting the right gpuva.flags for 4K size (Matthew Brost) - Add XE_VMA_PTE_64K VMA flag (Matthew Brost) - Return 2MB page size for compact 64k PTEs (Matthew Brost) - Remove usage of the deprecated ida_simple_xx() API (Christophe JAILLET) - Fix modpost warning on xe_mocs live kunit module (Ashutosh Dixit) - Drop extra newline in from sysfs files (Ashutosh Dixit) - Implement VM snapshot support for BO's and userptr (Maarten Lankhorst) - Add debug logs when skipping rebinds (Matthew Brost) - Fix code generation when mixing build directories (Dafna Hirschfeld) - Prefer struct_size over open coded arithmetic (Erick Archer) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/dbdkrwmcoqqlwftuc3olbauazc3pbamj26wa34puztowsnauoh@i3zms7ut4yuw
2 parents 71ab34f + a7a3d73 commit 19b232b

File tree

141 files changed

+6518
-1187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+6518
-1187
lines changed

drivers/gpu/drm/xe/.kunitconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ CONFIG_DRM_XE_DISPLAY=n
1111
CONFIG_EXPERT=y
1212
CONFIG_FB=y
1313
CONFIG_DRM_XE_KUNIT_TEST=y
14+
CONFIG_LOCK_DEBUGGING_SUPPORT=y
15+
CONFIG_PROVE_LOCKING=y
16+
CONFIG_DEBUG_MUTEXES=y
17+
CONFIG_LOCKDEP=y
18+
CONFIG_DEBUG_LOCKDEP=y

drivers/gpu/drm/xe/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config DRM_XE
33
tristate "Intel Xe Graphics"
4-
depends on DRM && PCI && MMU && (m || (y && KUNIT=y)) && 64BIT
4+
depends on DRM && PCI && MMU && (m || (y && KUNIT=y))
55
select INTERVAL_TREE
66
# we need shmfs for the swappable backing store, and in particular
77
# the shmem_readpage() which depends upon tmpfs

drivers/gpu/drm/xe/Makefile

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ xe-y += xe_bb.o \
7676
xe_ggtt.o \
7777
xe_gpu_scheduler.o \
7878
xe_gsc.o \
79+
xe_gsc_proxy.o \
7980
xe_gsc_submit.o \
8081
xe_gt.o \
8182
xe_gt_ccs_mode.o \
@@ -92,6 +93,7 @@ xe-y += xe_bb.o \
9293
xe_guc.o \
9394
xe_guc_ads.o \
9495
xe_guc_ct.o \
96+
xe_guc_db_mgr.o \
9597
xe_guc_debugfs.o \
9698
xe_guc_hwconfig.o \
9799
xe_guc_log.o \
@@ -137,6 +139,7 @@ xe-y += xe_bb.o \
137139
xe_uc_debugfs.o \
138140
xe_uc_fw.o \
139141
xe_vm.o \
142+
xe_vram_freq.o \
140143
xe_wait_user_fence.o \
141144
xe_wa.o \
142145
xe_wopcm.o
@@ -145,18 +148,23 @@ xe-y += xe_bb.o \
145148
xe-$(CONFIG_HWMON) += xe_hwmon.o
146149

147150
# graphics virtualization (SR-IOV) support
148-
xe-y += xe_sriov.o
151+
xe-y += \
152+
xe_guc_relay.o \
153+
xe_memirq.o \
154+
xe_sriov.o
149155

150156
xe-$(CONFIG_PCI_IOV) += \
151157
xe_lmtt.o \
152158
xe_lmtt_2l.o \
153159
xe_lmtt_ml.o
154160

161+
xe-$(CONFIG_DRM_XE_KUNIT_TEST) += \
162+
tests/xe_kunit_helpers.o
163+
155164
# i915 Display compat #defines and #includes
156165
subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \
157166
-I$(srctree)/$(src)/display/ext \
158167
-I$(srctree)/$(src)/compat-i915-headers \
159-
-I$(srctree)/drivers/gpu/drm/xe/display/ \
160168
-I$(srctree)/drivers/gpu/drm/i915/display/ \
161169
-Ddrm_i915_gem_object=xe_bo \
162170
-Ddrm_i915_private=xe_device
@@ -176,17 +184,17 @@ $(obj)/i915-display/%.o: $(srctree)/drivers/gpu/drm/i915/display/%.c FORCE
176184

177185
# Display code specific to xe
178186
xe-$(CONFIG_DRM_XE_DISPLAY) += \
179-
xe_display.o \
180-
display/xe_fb_pin.o \
181-
display/xe_hdcp_gsc.o \
182-
display/xe_plane_initial.o \
183-
display/xe_display_rps.o \
187+
display/ext/i915_irq.o \
188+
display/ext/i915_utils.o \
189+
display/intel_fb_bo.o \
190+
display/intel_fbdev_fb.o \
191+
display/xe_display.o \
184192
display/xe_display_misc.o \
193+
display/xe_display_rps.o \
185194
display/xe_dsb_buffer.o \
186-
display/intel_fbdev_fb.o \
187-
display/intel_fb_bo.o \
188-
display/ext/i915_irq.o \
189-
display/ext/i915_utils.o
195+
display/xe_fb_pin.o \
196+
display/xe_hdcp_gsc.o \
197+
display/xe_plane_initial.o
190198

191199
# SOC code shared with i915
192200
xe-$(CONFIG_DRM_XE_DISPLAY) += \
@@ -213,8 +221,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
213221
i915-display/intel_ddi.o \
214222
i915-display/intel_ddi_buf_trans.o \
215223
i915-display/intel_display.o \
216-
i915-display/intel_display_debugfs.o \
217-
i915-display/intel_display_debugfs_params.o \
218224
i915-display/intel_display_device.o \
219225
i915-display/intel_display_driver.o \
220226
i915-display/intel_display_irq.o \
@@ -258,7 +264,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
258264
i915-display/intel_modeset_setup.o \
259265
i915-display/intel_modeset_verify.o \
260266
i915-display/intel_panel.o \
261-
i915-display/intel_pipe_crc.o \
262267
i915-display/intel_pmdemand.o \
263268
i915-display/intel_pps.o \
264269
i915-display/intel_psr.o \
@@ -285,6 +290,13 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
285290
xe-$(CONFIG_DRM_XE_DISPLAY) += i915-display/intel_fbdev.o
286291
endif
287292

293+
ifeq ($(CONFIG_DEBUG_FS),y)
294+
xe-$(CONFIG_DRM_XE_DISPLAY) += \
295+
i915-display/intel_display_debugfs.o \
296+
i915-display/intel_display_debugfs_params.o \
297+
i915-display/intel_pipe_crc.o
298+
endif
299+
288300
obj-$(CONFIG_DRM_XE) += xe.o
289301
obj-$(CONFIG_DRM_XE_KUNIT_TEST) += tests/
290302

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/*
3+
* Copyright © 2023 Intel Corporation
4+
*/
5+
6+
#ifndef _ABI_GSC_PROXY_COMMANDS_ABI_H
7+
#define _ABI_GSC_PROXY_COMMANDS_ABI_H
8+
9+
#include <linux/types.h>
10+
11+
/* Heci client ID for proxy commands */
12+
#define HECI_MEADDRESS_PROXY 10
13+
14+
/* FW-defined proxy header */
15+
struct xe_gsc_proxy_header {
16+
/*
17+
* hdr:
18+
* Bits 0-7: type of the proxy message (see enum xe_gsc_proxy_type)
19+
* Bits 8-15: rsvd
20+
* Bits 16-31: length in bytes of the payload following the proxy header
21+
*/
22+
u32 hdr;
23+
#define GSC_PROXY_TYPE GENMASK(7, 0)
24+
#define GSC_PROXY_PAYLOAD_LENGTH GENMASK(31, 16)
25+
26+
u32 source; /* Source of the Proxy message */
27+
u32 destination; /* Destination of the Proxy message */
28+
#define GSC_PROXY_ADDRESSING_KMD 0x10000
29+
#define GSC_PROXY_ADDRESSING_GSC 0x20000
30+
#define GSC_PROXY_ADDRESSING_CSME 0x30000
31+
32+
u32 status; /* Command status */
33+
} __packed;
34+
35+
/* FW-defined proxy types */
36+
enum xe_gsc_proxy_type {
37+
GSC_PROXY_MSG_TYPE_PROXY_INVALID = 0,
38+
GSC_PROXY_MSG_TYPE_PROXY_QUERY = 1,
39+
GSC_PROXY_MSG_TYPE_PROXY_PAYLOAD = 2,
40+
GSC_PROXY_MSG_TYPE_PROXY_END = 3,
41+
GSC_PROXY_MSG_TYPE_PROXY_NOTIFICATION = 4,
42+
};
43+
44+
#endif
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/*
3+
* Copyright © 2023 Intel Corporation
4+
*/
5+
6+
#ifndef _GUC_ACTIONS_PF_ABI_H
7+
#define _GUC_ACTIONS_PF_ABI_H
8+
9+
#include "guc_communication_ctb_abi.h"
10+
11+
/**
12+
* DOC: GUC2PF_RELAY_FROM_VF
13+
*
14+
* This message is used by the GuC firmware to forward a VF2PF `Relay Message`_
15+
* received from the Virtual Function (VF) driver to this Physical Function (PF)
16+
* driver.
17+
*
18+
* This message is always sent as `CTB HXG Message`_.
19+
*
20+
* +---+-------+--------------------------------------------------------------+
21+
* | | Bits | Description |
22+
* +===+=======+==============================================================+
23+
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ |
24+
* | +-------+--------------------------------------------------------------+
25+
* | | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_ |
26+
* | +-------+--------------------------------------------------------------+
27+
* | | 27:16 | MBZ |
28+
* | +-------+--------------------------------------------------------------+
29+
* | | 15:0 | ACTION = _`XE_GUC_ACTION_GUC2PF_RELAY_FROM_VF` = 0x5100 |
30+
* +---+-------+--------------------------------------------------------------+
31+
* | 1 | 31:0 | **VFID** - source VF identifier |
32+
* +---+-------+--------------------------------------------------------------+
33+
* | 2 | 31:0 | **RELAY_ID** - VF/PF message ID |
34+
* +---+-------+-----------------+--------------------------------------------+
35+
* | 3 | 31:0 | **RELAY_DATA1** | |
36+
* +---+-------+-----------------+ |
37+
* |...| | | [Embedded `Relay Message`_] |
38+
* +---+-------+-----------------+ |
39+
* | n | 31:0 | **RELAY_DATAx** | |
40+
* +---+-------+-----------------+--------------------------------------------+
41+
*/
42+
#define XE_GUC_ACTION_GUC2PF_RELAY_FROM_VF 0x5100
43+
44+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_MIN_LEN (GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
45+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_MAX_LEN \
46+
(GUC2PF_RELAY_FROM_VF_EVENT_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
47+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_0_MBZ GUC_HXG_EVENT_MSG_0_DATA0
48+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_1_VFID GUC_HXG_EVENT_MSG_n_DATAn
49+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_2_RELAY_ID GUC_HXG_EVENT_MSG_n_DATAn
50+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_3_RELAY_DATA1 GUC_HXG_EVENT_MSG_n_DATAn
51+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_n_RELAY_DATAx GUC_HXG_EVENT_MSG_n_DATAn
52+
#define GUC2PF_RELAY_FROM_VF_EVENT_MSG_NUM_RELAY_DATA GUC_RELAY_MSG_MAX_LEN
53+
54+
/**
55+
* DOC: PF2GUC_RELAY_TO_VF
56+
*
57+
* This H2G message is used by the Physical Function (PF) driver to send embedded
58+
* VF2PF `Relay Message`_ to the VF.
59+
*
60+
* This action message must be sent over CTB as `CTB HXG Message`_.
61+
*
62+
* +---+-------+--------------------------------------------------------------+
63+
* | | Bits | Description |
64+
* +===+=======+==============================================================+
65+
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ |
66+
* | +-------+--------------------------------------------------------------+
67+
* | | 30:28 | TYPE = `GUC_HXG_TYPE_FAST_REQUEST`_ |
68+
* | +-------+--------------------------------------------------------------+
69+
* | | 27:16 | MBZ |
70+
* | +-------+--------------------------------------------------------------+
71+
* | | 15:0 | ACTION = _`XE_GUC_ACTION_PF2GUC_RELAY_TO_VF` = 0x5101 |
72+
* +---+-------+--------------------------------------------------------------+
73+
* | 1 | 31:0 | **VFID** - target VF identifier |
74+
* +---+-------+--------------------------------------------------------------+
75+
* | 2 | 31:0 | **RELAY_ID** - VF/PF message ID |
76+
* +---+-------+-----------------+--------------------------------------------+
77+
* | 3 | 31:0 | **RELAY_DATA1** | |
78+
* +---+-------+-----------------+ |
79+
* |...| | | [Embedded `Relay Message`_] |
80+
* +---+-------+-----------------+ |
81+
* | n | 31:0 | **RELAY_DATAx** | |
82+
* +---+-------+-----------------+--------------------------------------------+
83+
*/
84+
#define XE_GUC_ACTION_PF2GUC_RELAY_TO_VF 0x5101
85+
86+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_MIN_LEN (GUC_HXG_REQUEST_MSG_MIN_LEN + 2u)
87+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_MAX_LEN \
88+
(PF2GUC_RELAY_TO_VF_REQUEST_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
89+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0
90+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_1_VFID GUC_HXG_REQUEST_MSG_n_DATAn
91+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_2_RELAY_ID GUC_HXG_REQUEST_MSG_n_DATAn
92+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_3_RELAY_DATA1 GUC_HXG_REQUEST_MSG_n_DATAn
93+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_n_RELAY_DATAx GUC_HXG_REQUEST_MSG_n_DATAn
94+
#define PF2GUC_RELAY_TO_VF_REQUEST_MSG_NUM_RELAY_DATA GUC_RELAY_MSG_MAX_LEN
95+
96+
/**
97+
* DOC: GUC2VF_RELAY_FROM_PF
98+
*
99+
* This message is used by the GuC firmware to deliver `Relay Message`_ from the
100+
* Physical Function (PF) driver to this Virtual Function (VF) driver.
101+
* See `GuC Relay Communication`_ for details.
102+
*
103+
* This message is always sent over CTB.
104+
*
105+
* +---+-------+--------------------------------------------------------------+
106+
* | | Bits | Description |
107+
* +===+=======+==============================================================+
108+
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ |
109+
* | +-------+--------------------------------------------------------------+
110+
* | | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_ |
111+
* | +-------+--------------------------------------------------------------+
112+
* | | 27:16 | MBZ |
113+
* | +-------+--------------------------------------------------------------+
114+
* | | 15:0 | ACTION = _`XE_GUC_ACTION_GUC2VF_RELAY_FROM_PF` = 0x5102 |
115+
* +---+-------+--------------------------------------------------------------+
116+
* | 1 | 31:0 | **RELAY_ID** - VF/PF message ID |
117+
* +---+-------+-----------------+--------------------------------------------+
118+
* | 2 | 31:0 | **RELAY_DATA1** | |
119+
* +---+-------+-----------------+ |
120+
* |...| | | [Embedded `Relay Message`_] |
121+
* +---+-------+-----------------+ |
122+
* | n | 31:0 | **RELAY_DATAx** | |
123+
* +---+-------+-----------------+--------------------------------------------+
124+
*/
125+
#define XE_GUC_ACTION_GUC2VF_RELAY_FROM_PF 0x5102
126+
127+
#define GUC2VF_RELAY_FROM_PF_EVENT_MSG_MIN_LEN (GUC_HXG_EVENT_MSG_MIN_LEN + 1u)
128+
#define GUC2VF_RELAY_FROM_PF_EVENT_MSG_MAX_LEN \
129+
(GUC2VF_RELAY_FROM_PF_EVENT_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
130+
#define GUC2VF_RELAY_FROM_PF_EVENT_MSG_0_MBZ GUC_HXG_EVENT_MSG_0_DATA0
131+
#define GUC2VF_RELAY_FROM_PF_EVENT_MSG_1_RELAY_ID GUC_HXG_EVENT_MSG_n_DATAn
132+
#define GUC2VF_RELAY_FROM_PF_EVENT_MSG_n_RELAY_DATAx GUC_HXG_EVENT_MSG_n_DATAn
133+
#define GUC2VF_RELAY_FROM_PF_EVENT_MSG_NUM_RELAY_DATA GUC_RELAY_MSG_MAX_LEN
134+
135+
/**
136+
* DOC: VF2GUC_RELAY_TO_PF
137+
*
138+
* This message is used by the Virtual Function (VF) drivers to communicate with
139+
* the Physical Function (PF) driver and send `Relay Message`_ to the PF driver.
140+
* See `GuC Relay Communication`_ for details.
141+
*
142+
* This message must be sent over CTB.
143+
*
144+
* +---+-------+--------------------------------------------------------------+
145+
* | | Bits | Description |
146+
* +===+=======+==============================================================+
147+
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ |
148+
* | +-------+--------------------------------------------------------------+
149+
* | | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ or GUC_HXG_TYPE_FAST_REQUEST_ |
150+
* | +-------+--------------------------------------------------------------+
151+
* | | 27:16 | MBZ |
152+
* | +-------+--------------------------------------------------------------+
153+
* | | 15:0 | ACTION = _`XE_GUC_ACTION_VF2GUC_RELAY_TO_PF` = 0x5103 |
154+
* +---+-------+--------------------------------------------------------------+
155+
* | 1 | 31:0 | **RELAY_ID** - VF/PF message ID |
156+
* +---+-------+-----------------+--------------------------------------------+
157+
* | 2 | 31:0 | **RELAY_DATA1** | |
158+
* +---+-------+-----------------+ |
159+
* |...| | | [Embedded `Relay Message`_] |
160+
* +---+-------+-----------------+ |
161+
* | n | 31:0 | **RELAY_DATAx** | |
162+
* +---+-------+-----------------+--------------------------------------------+
163+
*/
164+
#define XE_GUC_ACTION_VF2GUC_RELAY_TO_PF 0x5103
165+
166+
#define VF2GUC_RELAY_TO_PF_REQUEST_MSG_MIN_LEN (GUC_HXG_REQUEST_MSG_MIN_LEN + 1u)
167+
#define VF2GUC_RELAY_TO_PF_REQUEST_MSG_MAX_LEN \
168+
(VF2GUC_RELAY_TO_PF_REQUEST_MSG_MIN_LEN + GUC_RELAY_MSG_MAX_LEN)
169+
#define VF2GUC_RELAY_TO_PF_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0
170+
#define VF2GUC_RELAY_TO_PF_REQUEST_MSG_1_RELAY_ID GUC_HXG_REQUEST_MSG_n_DATAn
171+
#define VF2GUC_RELAY_TO_PF_REQUEST_MSG_n_RELAY_DATAx GUC_HXG_REQUEST_MSG_n_DATAn
172+
#define VF2GUC_RELAY_TO_PF_REQUEST_MSG_NUM_RELAY_DATA GUC_RELAY_MSG_MAX_LEN
173+
174+
#endif

drivers/gpu/drm/xe/abi/guc_communication_ctb_abi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ static_assert(sizeof(struct guc_ct_buffer_desc) == 64);
8181

8282
#define GUC_CTB_HDR_LEN 1u
8383
#define GUC_CTB_MSG_MIN_LEN GUC_CTB_HDR_LEN
84-
#define GUC_CTB_MSG_MAX_LEN 256u
84+
#define GUC_CTB_MSG_MAX_LEN (GUC_CTB_MSG_MIN_LEN + GUC_CTB_MAX_DWORDS)
8585
#define GUC_CTB_MSG_0_FENCE (0xffffu << 16)
8686
#define GUC_CTB_MSG_0_FORMAT (0xfu << 12)
8787
#define GUC_CTB_FORMAT_HXG 0u
8888
#define GUC_CTB_MSG_0_RESERVED (0xfu << 8)
8989
#define GUC_CTB_MSG_0_NUM_DWORDS (0xffu << 0)
90+
#define GUC_CTB_MAX_DWORDS 255
9091

9192
/**
9293
* DOC: CTB HXG Message

drivers/gpu/drm/xe/abi/guc_messages_abi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* | | 30:28 | **TYPE** - message type |
2525
* | | | - _`GUC_HXG_TYPE_REQUEST` = 0 |
2626
* | | | - _`GUC_HXG_TYPE_EVENT` = 1 |
27+
* | | | - _`GUC_HXG_TYPE_FAST_REQUEST` = 2 |
2728
* | | | - _`GUC_HXG_TYPE_NO_RESPONSE_BUSY` = 3 |
2829
* | | | - _`GUC_HXG_TYPE_NO_RESPONSE_RETRY` = 5 |
2930
* | | | - _`GUC_HXG_TYPE_RESPONSE_FAILURE` = 6 |
@@ -46,6 +47,7 @@
4647
#define GUC_HXG_MSG_0_TYPE (0x7u << 28)
4748
#define GUC_HXG_TYPE_REQUEST 0u
4849
#define GUC_HXG_TYPE_EVENT 1u
50+
#define GUC_HXG_TYPE_FAST_REQUEST 2u
4951
#define GUC_HXG_TYPE_NO_RESPONSE_BUSY 3u
5052
#define GUC_HXG_TYPE_NO_RESPONSE_RETRY 5u
5153
#define GUC_HXG_TYPE_RESPONSE_FAILURE 6u

0 commit comments

Comments
 (0)