Skip to content

Commit 9ec3c8e

Browse files
committed
Merge tag 'drm-xe-next-2025-12-19' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
[airlied: fix guc submit double definition] UAPI Changes: - Multi-Queue support (Niranjana) - Add DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE (Brost) - Add NO_COMPRESSION BO flag and query capability (Sanjay) - Add gt_id to struct drm_xe_oa_unit (Ashutosh) - Expose MERT OA unit (Ashutosh) - Sysfs Survivability refactor (Riana) Cross-subsystem Changes: - VFIO: Add device specific vfio_pci driver variant for Intel graphics (Winiarski) Driver Changes: - MAINTAINERS update (Lucas -> Matt) - Add helper to query compression enable status (Xin) - Xe_VM fixes and updates (Shuicheng, Himal) - Documentation fixes (Winiarski, Swaraj, Niranjana) - Kunit fix (Roper) - Fix potential leaks, uaf, null derref, and oversized allocations (Shuicheng, Sanjay, Mika, Tapani) - Other minor fixes like kbuild duplication and sysfs_emit (Shuicheng, Madhur) - Handle msix vector0 interrupt (Venkata) - Scope-based forcewake and runtime PM (Roper, Raag) - GuC/HuC related fixes and refactors (Lucas, Zhanjun, Brost, Julia, Wajdeczko) - Fix conversion from clock ticks to milliseconds (Harish) - SRIOV PF PF: Add support for MERT (Lukasz) - Enable SR-IOV VF migration and other SRIOV updates (Winiarski, Satya, Brost, Wajdeczko, Piotr, Tomasz, Daniele) - Optimize runtime suspend/resume and other PM improvements (Raag) - Some W/a additions and updates (Bala, Harish, Roper) - Use for_each_tlb_inval() to calculate invalidation fences (Roper) - Fix VFIO link error (Arnd) - Fix ix drm_gpusvm_init() arguments (Arnd) - Other OA refactor (Ashutosh) - Refactor PAT and expose debugfs (Xin) - Enable Indirect Ring State for xe3p_xpc (Niranjana) - MEI interrupt fix (Junxiao) - Add stats for mode switching on hw_engine_group (Francois) - DMA-Buf related changes (Thomas) - Multi Queue feature support (Niranjana) - Enable I2C controller for Crescent Island (Raag) - Enable NVM for Crescent Island (Sasha) - Increase TDF timeout (Jagmeet) - Restore engine registers before restarting schedulers after GT reset (Jan) - Page Reclamation Support for Xe3p Platforms (Brian, Brost, Oak) - Fix performance when pagefaults and 3d/display share resources (Brost) - More OA MERT work (Ashutosh) - Fix return values (Dan) - Some log level and messages improvements (Brost) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/aUXUhEgzs6hDLQuu@intel.com
2 parents c5fb82d + 844758b commit 9ec3c8e

152 files changed

Lines changed: 5329 additions & 1498 deletions

File tree

Some content is hidden

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

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ Lorenzo Pieralisi <lpieralisi@kernel.org> <lorenzo.pieralisi@arm.com>
481481
Lorenzo Stoakes <lorenzo.stoakes@oracle.com> <lstoakes@gmail.com>
482482
Luca Ceresoli <luca.ceresoli@bootlin.com> <luca@lucaceresoli.net>
483483
Luca Weiss <luca@lucaweiss.eu> <luca@z3ntu.xyz>
484+
Lucas De Marchi <demarchi@kernel.org> <lucas.demarchi@intel.com>
484485
Lukasz Luba <lukasz.luba@arm.com> <l.luba@partner.samsung.com>
485486
Luo Jie <quic_luoj@quicinc.com> <luoj@codeaurora.org>
486487
Lance Yang <lance.yang@linux.dev> <ioworker0@gmail.com>

Documentation/ABI/testing/sysfs-driver-intel-xe-sriov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Description:
119119
The GT preemption timeout (PT) in [us] to be applied to all functions.
120120
See sriov_admin/{pf,vf<N>}/profile/preempt_timeout_us for more details.
121121

122-
sched_priority: (RW/RO) string
122+
sched_priority: (WO) string
123123
The GT scheduling priority to be applied for all functions.
124124
See sriov_admin/{pf,vf<N>}/profile/sched_priority for more details.
125125

Documentation/gpu/xe/xe_exec_queue.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ Execution Queue
77
.. kernel-doc:: drivers/gpu/drm/xe/xe_exec_queue.c
88
:doc: Execution Queue
99

10+
Multi Queue Group
11+
=================
12+
13+
.. kernel-doc:: drivers/gpu/drm/xe/xe_exec_queue.c
14+
:doc: Multi Queue Group
15+
16+
.. _multi-queue-group-guc-interface:
17+
18+
Multi Queue Group GuC interface
19+
===============================
20+
21+
.. kernel-doc:: drivers/gpu/drm/xe/xe_guc_submit.c
22+
:doc: Multi Queue Group GuC interface
23+
1024
Internal API
1125
============
1226

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12640,7 +12640,7 @@ F: include/drm/intel/
1264012640
F: include/uapi/drm/i915_drm.h
1264112641

1264212642
INTEL DRM XE DRIVER (Lunar Lake and newer)
12643-
M: Lucas De Marchi <lucas.demarchi@intel.com>
12643+
M: Matthew Brost <matthew.brost@intel.com>
1264412644
M: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1264512645
M: Rodrigo Vivi <rodrigo.vivi@intel.com>
1264612646
L: intel-xe@lists.freedesktop.org

drivers/gpu/drm/drm_gpusvm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,9 @@ int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
12881288
DMA_BIDIRECTIONAL;
12891289

12901290
retry:
1291+
if (time_after(jiffies, timeout))
1292+
return -EBUSY;
1293+
12911294
hmm_range.notifier_seq = mmu_interval_read_begin(notifier);
12921295
if (drm_gpusvm_pages_valid_unlocked(gpusvm, svm_pages))
12931296
goto set_seqno;

drivers/gpu/drm/xe/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ xe-y += xe_bb.o \
9595
xe_oa.o \
9696
xe_observation.o \
9797
xe_pagefault.o \
98+
xe_page_reclaim.o \
9899
xe_pat.o \
99100
xe_pci.o \
100101
xe_pcode.o \
@@ -173,6 +174,7 @@ xe-$(CONFIG_PCI_IOV) += \
173174
xe_lmtt.o \
174175
xe_lmtt_2l.o \
175176
xe_lmtt_ml.o \
177+
xe_mert.o \
176178
xe_pci_sriov.o \
177179
xe_sriov_packet.o \
178180
xe_sriov_pf.o \

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ enum xe_guc_action {
139139
XE_GUC_ACTION_DEREGISTER_G2G = 0x4508,
140140
XE_GUC_ACTION_DEREGISTER_CONTEXT_DONE = 0x4600,
141141
XE_GUC_ACTION_REGISTER_CONTEXT_MULTI_LRC = 0x4601,
142+
XE_GUC_ACTION_REGISTER_CONTEXT_MULTI_QUEUE = 0x4602,
143+
XE_GUC_ACTION_MULTI_QUEUE_CONTEXT_CGP_SYNC = 0x4603,
144+
XE_GUC_ACTION_NOTIFY_MULTI_QUEUE_CONTEXT_CGP_SYNC_DONE = 0x4604,
145+
XE_GUC_ACTION_NOTIFY_MULTI_QUEUE_CGP_CONTEXT_ERROR = 0x4605,
142146
XE_GUC_ACTION_CLIENT_SOFT_RESET = 0x5507,
143147
XE_GUC_ACTION_SET_ENG_UTIL_BUFF = 0x550A,
144148
XE_GUC_ACTION_SET_DEVICE_ENGINE_ACTIVITY_BUFFER = 0x550C,
@@ -151,6 +155,8 @@ enum xe_guc_action {
151155
XE_GUC_ACTION_TLB_INVALIDATION = 0x7000,
152156
XE_GUC_ACTION_TLB_INVALIDATION_DONE = 0x7001,
153157
XE_GUC_ACTION_TLB_INVALIDATION_ALL = 0x7002,
158+
XE_GUC_ACTION_PAGE_RECLAMATION = 0x7003,
159+
XE_GUC_ACTION_PAGE_RECLAMATION_DONE = 0x7004,
154160
XE_GUC_ACTION_STATE_CAPTURE_NOTIFICATION = 0x8002,
155161
XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE = 0x8003,
156162
XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED = 0x8004,

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

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -502,23 +502,29 @@
502502
#define VF2GUC_VF_RESET_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0
503503

504504
/**
505-
* DOC: VF2GUC_NOTIFY_RESFIX_DONE
505+
* DOC: VF2GUC_RESFIX_DONE
506506
*
507-
* This action is used by VF to notify the GuC that the VF KMD has completed
508-
* post-migration recovery steps.
507+
* This action is used by VF to inform the GuC that the VF KMD has completed
508+
* post-migration recovery steps. From GuC VF compatibility 1.27.0 onwards, it
509+
* shall only be sent after posting RESFIX_START and that both @MARKER fields
510+
* must match.
509511
*
510512
* This message must be sent as `MMIO HXG Message`_.
511513
*
514+
* Updated since GuC VF compatibility 1.27.0.
515+
*
512516
* +---+-------+--------------------------------------------------------------+
513517
* | | Bits | Description |
514518
* +===+=======+==============================================================+
515519
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ |
516520
* | +-------+--------------------------------------------------------------+
517521
* | | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ |
518522
* | +-------+--------------------------------------------------------------+
519-
* | | 27:16 | DATA0 = MBZ |
523+
* | | 27:16 | DATA0 = MARKER = MBZ (only prior 1.27.0) |
520524
* | +-------+--------------------------------------------------------------+
521-
* | | 15:0 | ACTION = _`GUC_ACTION_VF2GUC_NOTIFY_RESFIX_DONE` = 0x5508 |
525+
* | | 27:16 | DATA0 = MARKER - can't be zero (1.27.0+) |
526+
* | +-------+--------------------------------------------------------------+
527+
* | | 15:0 | ACTION = _`GUC_ACTION_VF2GUC_RESFIX_DONE` = 0x5508 |
522528
* +---+-------+--------------------------------------------------------------+
523529
*
524530
* +---+-------+--------------------------------------------------------------+
@@ -531,13 +537,13 @@
531537
* | | 27:0 | DATA0 = MBZ |
532538
* +---+-------+--------------------------------------------------------------+
533539
*/
534-
#define GUC_ACTION_VF2GUC_NOTIFY_RESFIX_DONE 0x5508u
540+
#define GUC_ACTION_VF2GUC_RESFIX_DONE 0x5508u
535541

536-
#define VF2GUC_NOTIFY_RESFIX_DONE_REQUEST_MSG_LEN GUC_HXG_REQUEST_MSG_MIN_LEN
537-
#define VF2GUC_NOTIFY_RESFIX_DONE_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0
542+
#define VF2GUC_RESFIX_DONE_REQUEST_MSG_LEN GUC_HXG_REQUEST_MSG_MIN_LEN
543+
#define VF2GUC_RESFIX_DONE_REQUEST_MSG_0_MARKER GUC_HXG_REQUEST_MSG_0_DATA0
538544

539-
#define VF2GUC_NOTIFY_RESFIX_DONE_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN
540-
#define VF2GUC_NOTIFY_RESFIX_DONE_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0
545+
#define VF2GUC_RESFIX_DONE_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN
546+
#define VF2GUC_RESFIX_DONE_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0
541547

542548
/**
543549
* DOC: VF2GUC_QUERY_SINGLE_KLV
@@ -656,4 +662,45 @@
656662
#define PF2GUC_SAVE_RESTORE_VF_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN
657663
#define PF2GUC_SAVE_RESTORE_VF_RESPONSE_MSG_0_USED GUC_HXG_RESPONSE_MSG_0_DATA0
658664

665+
/**
666+
* DOC: VF2GUC_RESFIX_START
667+
*
668+
* This action is used by VF to inform the GuC that the VF KMD will be starting
669+
* post-migration recovery fixups. The @MARKER sent with this action must match
670+
* with the MARKER posted in the VF2GUC_RESFIX_DONE message.
671+
*
672+
* This message must be sent as `MMIO HXG Message`_.
673+
*
674+
* Available since GuC VF compatibility 1.27.0.
675+
*
676+
* +---+-------+--------------------------------------------------------------+
677+
* | | Bits | Description |
678+
* +===+=======+==============================================================+
679+
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ |
680+
* | +-------+--------------------------------------------------------------+
681+
* | | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ |
682+
* | +-------+--------------------------------------------------------------+
683+
* | | 27:16 | DATA0 = MARKER - can't be zero |
684+
* | +-------+--------------------------------------------------------------+
685+
* | | 15:0 | ACTION = _`GUC_ACTION_VF2GUC_RESFIX_START` = 0x550F |
686+
* +---+-------+--------------------------------------------------------------+
687+
*
688+
* +---+-------+--------------------------------------------------------------+
689+
* | | Bits | Description |
690+
* +===+=======+==============================================================+
691+
* | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ |
692+
* | +-------+--------------------------------------------------------------+
693+
* | | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_ |
694+
* | +-------+--------------------------------------------------------------+
695+
* | | 27:0 | DATA0 = MBZ |
696+
* +---+-------+--------------------------------------------------------------+
697+
*/
698+
#define GUC_ACTION_VF2GUC_RESFIX_START 0x550Fu
699+
700+
#define VF2GUC_RESFIX_START_REQUEST_MSG_LEN GUC_HXG_REQUEST_MSG_MIN_LEN
701+
#define VF2GUC_RESFIX_START_REQUEST_MSG_0_MARKER GUC_HXG_REQUEST_MSG_0_DATA0
702+
703+
#define VF2GUC_RESFIX_START_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN
704+
#define VF2GUC_RESFIX_START_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0
705+
659706
#endif

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ enum {
352352
* :1: NORMAL = schedule VF always, irrespective of whether it has work or not
353353
* :2: HIGH = schedule VF in the next time-slice after current active
354354
* time-slice completes if it has active work
355+
*
356+
* _`GUC_KLV_VF_CFG_THRESHOLD_MULTI_LRC_COUNT` : 0x8A0D
357+
* Given that multi-LRC contexts are incompatible with SRIOV scheduler
358+
* groups and cause the latter to be turned off when registered with the
359+
* GuC, this config allows the PF to set a threshold for multi-LRC context
360+
* registrations by VFs to monitor their behavior.
355361
*/
356362

357363
#define GUC_KLV_VF_CFG_GGTT_START_KEY 0x0001
@@ -410,6 +416,9 @@ enum {
410416
#define GUC_SCHED_PRIORITY_NORMAL 1u
411417
#define GUC_SCHED_PRIORITY_HIGH 2u
412418

419+
#define GUC_KLV_VF_CFG_THRESHOLD_MULTI_LRC_COUNT_KEY 0x8a0d
420+
#define GUC_KLV_VF_CFG_THRESHOLD_MULTI_LRC_COUNT_LEN 1u
421+
413422
/*
414423
* Workaround keys:
415424
*/
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/*
3+
* Copyright © 2025 Intel Corporation
4+
*/
5+
6+
#ifndef _ABI_GUC_LFD_ABI_H_
7+
#define _ABI_GUC_LFD_ABI_H_
8+
9+
#include <linux/types.h>
10+
11+
#include "guc_lic_abi.h"
12+
13+
/* The current major version of GuC-Log-File format. */
14+
#define GUC_LFD_FORMAT_VERSION_MAJOR 0x0001
15+
/* The current minor version of GuC-Log-File format. */
16+
#define GUC_LFD_FORMAT_VERSION_MINOR 0x0000
17+
18+
/** enum guc_lfd_type - Log format descriptor type */
19+
enum guc_lfd_type {
20+
/**
21+
* @GUC_LFD_TYPE_FW_REQUIRED_RANGE_START: Start of range for
22+
* required LFDs from GuC
23+
* @GUC_LFD_TYPE_FW_VERSION: GuC Firmware Version structure.
24+
* @GUC_LFD_TYPE_GUC_DEVICE_ID: GuC microcontroller device ID.
25+
* @GUC_LFD_TYPE_TSC_FREQUENCY: Frequency of GuC timestamps.
26+
* @GUC_LFD_TYPE_GMD_ID: HW GMD ID.
27+
* @GUC_LFD_TYPE_BUILD_PLATFORM_ID: GuC build platform ID.
28+
* @GUC_LFD_TYPE_FW_REQUIRED_RANGE_END: End of range for
29+
* required LFDs from GuC
30+
*/
31+
GUC_LFD_TYPE_FW_REQUIRED_RANGE_START = 0x1,
32+
GUC_LFD_TYPE_FW_VERSION = 0x1,
33+
GUC_LFD_TYPE_GUC_DEVICE_ID = 0x2,
34+
GUC_LFD_TYPE_TSC_FREQUENCY = 0x3,
35+
GUC_LFD_TYPE_GMD_ID = 0x4,
36+
GUC_LFD_TYPE_BUILD_PLATFORM_ID = 0x5,
37+
GUC_LFD_TYPE_FW_REQUIRED_RANGE_END = 0x1FFF,
38+
39+
/**
40+
* @GUC_LFD_TYPE_FW_OPTIONAL_RANGE_START: Start of range for
41+
* optional LFDs from GuC
42+
* @GUC_LFD_TYPE_LOG_EVENTS_BUFFER: Log-event-entries buffer.
43+
* @GUC_LFD_TYPE_FW_CRASH_DUMP: GuC generated crash-dump blob.
44+
* @GUC_LFD_TYPE_FW_OPTIONAL_RANGE_END: End of range for
45+
* optional LFDs from GuC
46+
*/
47+
GUC_LFD_TYPE_FW_OPTIONAL_RANGE_START = 0x2000,
48+
GUC_LFD_TYPE_LOG_EVENTS_BUFFER = 0x2000,
49+
GUC_LFD_TYPE_FW_CRASH_DUMP = 0x2001,
50+
GUC_LFD_TYPE_FW_OPTIONAL_RANGE_END = 0x3FFF,
51+
52+
/**
53+
* @GUC_LFD_TYPE_KMD_REQUIRED_RANGE_START: Start of range for
54+
* required KMD LFDs
55+
* @GUC_LFD_TYPE_OS_ID: An identifier for the OS.
56+
* @GUC_LFD_TYPE_KMD_REQUIRED_RANGE_END: End of this range for
57+
* required KMD LFDs
58+
*/
59+
GUC_LFD_TYPE_KMD_REQUIRED_RANGE_START = 0x4000,
60+
GUC_LFD_TYPE_OS_ID = 0x4000,
61+
GUC_LFD_TYPE_KMD_REQUIRED_RANGE_END = 0x5FFF,
62+
63+
/**
64+
* @GUC_LFD_TYPE_KMD_OPTIONAL_RANGE_START: Start of range for
65+
* optional KMD LFDs
66+
* @GUC_LFD_TYPE_BINARY_SCHEMA_FORMAT: Binary representation of
67+
* GuC log-events schema.
68+
* @GUC_LFD_TYPE_HOST_COMMENT: ASCII string containing comments
69+
* from the host/KMD.
70+
* @GUC_LFD_TYPE_TIMESTAMP_ANCHOR: A timestamp anchor, to convert
71+
* between host and GuC timestamp.
72+
* @GUC_LFD_TYPE_TIMESTAMP_ANCHOR_CONFIG: Timestamp anchor
73+
* configuration, definition of timestamp frequency and bit width.
74+
* @GUC_LFD_TYPE_KMD_OPTIONAL_RANGE_END: End of this range for
75+
* optional KMD LFDs
76+
*/
77+
GUC_LFD_TYPE_KMD_OPTIONAL_RANGE_START = 0x6000,
78+
GUC_LFD_TYPE_BINARY_SCHEMA_FORMAT = 0x6000,
79+
GUC_LFD_TYPE_HOST_COMMENT = 0x6001,
80+
GUC_LFD_TYPE_TIMESTAMP_ANCHOR = 0x6002,
81+
GUC_LFD_TYPE_TIMESTAMP_ANCHOR_CONFIG = 0x6003,
82+
GUC_LFD_TYPE_KMD_OPTIONAL_RANGE_END = 0x7FFF,
83+
84+
/*
85+
* @GUC_LFD_TYPE_RESERVED_RANGE_START: Start of reserved range
86+
* @GUC_LFD_TYPE_RESERVED_RANGE_END: End of reserved range
87+
*/
88+
GUC_LFD_TYPE_RESERVED_RANGE_START = 0x8000,
89+
GUC_LFD_TYPE_RESERVED_RANGE_END = 0xFFFF,
90+
};
91+
92+
/** enum guc_lfd_os_type - OS Type LFD-ID */
93+
enum guc_lfd_os_type {
94+
/** @GUC_LFD_OS_TYPE_OSID_WIN: Windows OS */
95+
GUC_LFD_OS_TYPE_OSID_WIN = 0x1,
96+
/** @GUC_LFD_OS_TYPE_OSID_LIN: Linux OS */
97+
GUC_LFD_OS_TYPE_OSID_LIN = 0x2,
98+
/** @GUC_LFD_OS_TYPE_OSID_VMW: VMWare OS */
99+
GUC_LFD_OS_TYPE_OSID_VMW = 0x3,
100+
/** @GUC_LFD_OS_TYPE_OSID_OTHER: Other */
101+
GUC_LFD_OS_TYPE_OSID_OTHER = 0x4,
102+
};
103+
104+
/** struct guc_lfd_data - A generic header structure for all LFD blocks */
105+
struct guc_lfd_data {
106+
/** @header: A 32 bits dword, contains multiple bit fields */
107+
u32 header;
108+
/* LFD type. See guc_lfd_type */
109+
#define GUC_LFD_DATA_HEADER_MASK_TYPE GENMASK(31, 16)
110+
#define GUC_LFD_DATA_HEADER_MASK_MAGIC GENMASK(15, 0)
111+
112+
/** @data_count: Number of dwords the `data` field contains. */
113+
u32 data_count;
114+
/** @data: Data defined by GUC_LFD_DATA_HEADER_MASK_TYPE */
115+
u32 data[] __counted_by(data_count);
116+
} __packed;
117+
118+
/**
119+
* struct guc_lfd_data_log_events_buf - GuC Log Events Buffer.
120+
* This is optional fw LFD data
121+
*/
122+
struct guc_lfd_data_log_events_buf {
123+
/**
124+
* @log_events_format_version: version of GuC log format of buffer
125+
*/
126+
u32 log_events_format_version;
127+
/**
128+
* @log_event: The log event data.
129+
* Size in dwords is LFD block size - 1.
130+
*/
131+
u32 log_event[];
132+
} __packed;
133+
134+
/** struct guc_lfd_data_os_info - OS Version Information. */
135+
struct guc_lfd_data_os_info {
136+
/**
137+
* @os_id: enum values to identify the OS brand.
138+
* See guc_lfd_os_type for the range of types
139+
*/
140+
u32 os_id;
141+
/**
142+
* @build_version: ASCII string containing OS build version
143+
* information based on os_id. String is padded with null
144+
* characters to ensure its DWORD aligned.
145+
* Size in dwords is LFD block size - 1.
146+
*/
147+
char build_version[];
148+
} __packed;
149+
150+
/**
151+
* struct guc_logfile_header - Header of GuC Log Streaming-LFD-File Format.
152+
* This structure encapsulates the layout of the guc-log-file format
153+
*/
154+
struct guc_lfd_file_header {
155+
/**
156+
* @magic: A magic number set by producer of a GuC log file to
157+
* identify that file is a valid guc-log-file containing a stream
158+
* of LFDs.
159+
*/
160+
u64 magic;
161+
/** @version: Version of this file format layout */
162+
u32 version;
163+
#define GUC_LFD_FILE_HEADER_VERSION_MASK_MAJOR GENMASK(31, 16)
164+
#define GUC_LFD_FILE_HEADER_VERSION_MASK_MINOR GENMASK(15, 0)
165+
166+
/** @stream: A stream of one or more guc_lfd_data LFD blocks
167+
*/
168+
u32 stream[];
169+
} __packed;
170+
171+
#endif

0 commit comments

Comments
 (0)