Add test for G2G communications
Subsystems (2)
cover Add test for G2G communications
From: John Harrison <[email protected]>
Platforms with multiple GuCs (multi-GT and/or multi-tile) have a mechanism for sending messages from one GuC to another. This relies on the KMD configuring buffers correctly and informing the GuCs about them. Support for that was merged a while back. So add a test to go with it.
Also, improve the firmware CSS header structure and defines to better match the spec and to add missing fields that are useful.
John Harrison (4):
drm/xe/guc: Update CSS header structures drm/xe/guc: Add firmware build type to available info drm/xe: Allow freeing of a managed bo drm/xe/guc: Add test for G2G communications
drivers/gpu/drm/xe/abi/guc_actions_abi.h | 2 + drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c | 759 ++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_live_test_mod.c | 2 + drivers/gpu/drm/xe/xe_bo.c | 5 + drivers/gpu/drm/xe/xe_bo.h | 1 + drivers/gpu/drm/xe/xe_device_types.h | 7 + drivers/gpu/drm/xe/xe_guc.c | 4 + drivers/gpu/drm/xe/xe_guc.h | 4 + drivers/gpu/drm/xe/xe_guc_ct.c | 5 + drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + drivers/gpu/drm/xe/xe_uc_fw.c | 21 +- drivers/gpu/drm/xe/xe_uc_fw_abi.h | 64 +- drivers/gpu/drm/xe/xe_uc_fw_types.h | 3 + 13 files changed, 845 insertions(+), 33 deletions(-) create mode 100644 drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c
Signature · 1 line
2.49.0
PATCH 1/4 drm/xe/guc: Update CSS header structures
From: John Harrison <[email protected]>
Rework the CSS header structure according to recent updates to the GuC API spec. Also include more field definitions.
--- drivers/gpu/drm/xe/xe_uc_fw.c | 20 +++++----- drivers/gpu/drm/xe/xe_uc_fw_abi.h | 64 ++++++++++++++++++++----------- 2 files changed, 51 insertions(+), 33 deletions(-)
drivers/gpu/drm/xe/xe_uc_fw.c +10 -10
@@ -344,11 +344,11 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css)return -EINVAL ; } - compatibility->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->submission_version); - compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->submission_version); - compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->submission_version); + compatibility->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->guc_info.submission_version); + compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.submission_version); + compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.submission_version); - uc_fw->private_data_size = css->private_data_size; + uc_fw->private_data_size = css->guc_info.private_data_size;return 0 ; }
@@ -417,8 +417,8 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t css = (struct uc_css_header *)fw_data;/* Check integrity of size values inside CSS header */ - size = (css->header_size_dw - css->key_size_dw - css->modulus_size_dw - - css->exponent_size_dw) *sizeof (u32); + size = (css->header_size_dw - css->rsa_info.key_size_dw - css->rsa_info.modulus_size_dw - + css->rsa_info.exponent_size_dw) *sizeof (u32);if (unlikely (size !=sizeof (struct uc_css_header ))) { drm_warn(&xe->drm, "%s firmware %s: unexpected header size: %zu != %zu\n",
@@ -431,7 +431,7 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t uc_fw->ucode_size = (css->size_dw - css->header_size_dw) *sizeof (u32);/* now RSA */ - uc_fw->rsa_size = css->key_size_dw *sizeof (u32); + uc_fw->rsa_size = css->rsa_info.key_size_dw *sizeof (u32);/* At least, it should have header, uCode and RSA. Size of all three. */ size = sizeof(struct uc_css_header) + uc_fw->ucode_size +
@@ -444,9 +444,9 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t }/* Get version numbers from the CSS header */ - release->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->sw_version); - release->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->sw_version); - release->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->sw_version); + release->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->guc_info.sw_version); + release->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.sw_version); + release->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.sw_version);if (uc_fw->type ==XE_UC_FW_TYPE_GUC )return guc_read_css_info (uc_fw, css);
drivers/gpu/drm/xe/xe_uc_fw_abi.h +41 -23
83 lines not on this page · raw message
Signature · 1 line
2.49.0
Re: [PATCH 1/4] drm/xe/guc: Update CSS header structures
drivers/gpu/drm/xe/xe_uc_fw.c static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css)
Quoted 16 lines · On 7/24/2025 5:21 PM, [email protected] wrote:
From: John Harrison <[email protected]>
Rework the CSS header structure according to recent updates to the GuC API spec. Also include more field definitions.
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/xe/xe_uc_fw.c | 20 +++++----- drivers/gpu/drm/xe/xe_uc_fw_abi.h | 64 ++++++++++++++++++++----------- 2 files changed, 51 insertions(+), 33 deletions(-)drivers/gpu/drm/xe/xe_uc_fw.c +0
-0@@ -344,11 +344,11 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css)
Since we now have a specific type for it, it might be worth changing this function to accept struct uc_css_guc_info instead of struct uc_css_header.
Quoted 77 lines
drivers/gpu/drm/xe/xe_uc_fw.c +10
-10return -EINVAL ; } - compatibility->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->submission_version); - compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->submission_version); - compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->submission_version); + compatibility->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->guc_info.submission_version); + compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.submission_version); + compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.submission_version); - uc_fw->private_data_size = css->private_data_size; + uc_fw->private_data_size = css->guc_info.private_data_size;return 0 ; }@@ -417,8 +417,8 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t css = (struct uc_css_header *)fw_data;/* Check integrity of size values inside CSS header */ - size = (css->header_size_dw - css->key_size_dw - css->modulus_size_dw - - css->exponent_size_dw) *sizeof (u32); + size = (css->header_size_dw - css->rsa_info.key_size_dw - css->rsa_info.modulus_size_dw - + css->rsa_info.exponent_size_dw) *sizeof (u32);if (unlikely (size !=sizeof (struct uc_css_header ))) { drm_warn(&xe->drm, "%s firmware %s: unexpected header size: %zu != %zu\n",@@ -431,7 +431,7 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t uc_fw->ucode_size = (css->size_dw - css->header_size_dw) *sizeof (u32);/* now RSA */ - uc_fw->rsa_size = css->key_size_dw *sizeof (u32); + uc_fw->rsa_size = css->rsa_info.key_size_dw *sizeof (u32);/* At least, it should have header, uCode and RSA. Size of all three. */ size = sizeof(struct uc_css_header) + uc_fw->ucode_size +@@ -444,9 +444,9 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t }/* Get version numbers from the CSS header */ - release->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->sw_version); - release->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->sw_version); - release->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->sw_version); + release->major =FIELD_GET (CSS_SW_VERSION_UC_MAJOR , css->guc_info.sw_version); + release->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.sw_version); + release->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.sw_version);if (uc_fw->type ==XE_UC_FW_TYPE_GUC )return guc_read_css_info (uc_fw, css);drivers/gpu/drm/xe/xe_uc_fw_abi.h +21
-0@@ -44,6 +44,39 @@* in fw. So driver will load a truncated firmware in this case. */ +struct uc_css_rsa_info { +u32 key_size_dw; +u32 modulus_size_dw; +u32 exponent_size_dw; +} __packed; + +struct uc_css_guc_info { +u32 time; +#define CSS_TIME_HOUR (0xFF << 0) +#define CSS_DATE_MIN (0xFF << 8) +#define CSS_DATE_SEC (0xFFFF << 16) +u32 reserved0[5 ]; +u32 sw_version; +#define CSS_SW_VERSION_UC_MAJOR (0xFF << 16) +#define CSS_SW_VERSION_UC_MINOR (0xFF << 8) +#define CSS_SW_VERSION_UC_PATCH (0xFF << 0) +u32 submission_version; +u32 reserved1[11 ]; +u32 header_info; +#define CSS_HEADER_INFO_SVN (0xFF) +#define CSS_HEADER_INFO_COPY_VALID (0x1 << 31)
drivers/gpu/drm/xe/xe_uc_fw_abi.h line 77
Quoted 10 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h +10
-0+u32 private_data_size; +u32 ukernel_info; +#define CSS_UKERNEL_INFO_DEVICEID (0xFFFF << 16) +#define CSS_UKERNEL_INFO_PRODKEY (0xFF << 8) +#define CSS_UKERNEL_INFO_BUILDTYPE (0x3 << 2) +#define CSS_UKERNEL_INFO_BUILDTYPE_PROD 0 +#define CSS_UKERNEL_INFO_BUILDTYPE_PREPROD 1 +#define CSS_UKERNEL_INFO_BUILDTYPE_DEBUG 2 +#define CSS_UKERNEL_INFO_ENCSTATUS (0x1 << 1) +#define CSS_UKERNEL_INFO_COPY_VALID (0x1 << 0)
I'd skip defining CSS_UKERNEL_INFO_COPY_VALID and CSS_HEADER_INFO_COPY_VALID. They're only set in the HW's copy of those fields, which are only consumed by bootrom; we'll never see them set from the driver POV (or even from the POV of someone hexdumping the binary), so having the define has no use.
Quoted 28 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h +6
-12+} __packed; +struct uc_css_header {u32 module_type;/* @@ -52,36 +85,21 @@ struct uc_css_header {*/ u32 header_size_dw;u32 header_version; -u32 module_id; +u32 reserved0;u32 module_vendor;u32 date; -#define CSS_DATE_DAY (0xFF << 0) -#define CSS_DATE_MONTH (0xFF << 8) -#define CSS_DATE_YEAR (0xFFFF << 16) +#define CSS_DATE_DAY (0xFF << 0) +#define CSS_DATE_MONTH (0xFF << 8) +#define CSS_DATE_YEAR (0xFFFF << 16)u32 size_dw;/* uCode plus header_size_dw */ -u32 key_size_dw; -u32 modulus_size_dw; -u32 exponent_size_dw; -u32 time; -#define CSS_TIME_HOUR (0xFF << 0) -#define CSS_DATE_MIN (0xFF << 8) -#define CSS_DATE_SEC (0xFFFF << 16) -char username[8 ];
drivers/gpu/drm/xe/xe_uc_fw_abi.h struct uc_css_header { · line 97
Quoted 10 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h +2
-7-char buildnumber[12 ]; -u32 sw_version; -#define CSS_SW_VERSION_UC_MAJOR (0xFF << 16) -#define CSS_SW_VERSION_UC_MINOR (0xFF << 8) -#define CSS_SW_VERSION_UC_PATCH (0xFF << 0)union { -u32 submission_version;/* only applies to GuC */ -u32 reserved2; +u32 reserved1[3 ]; +struct uc_css_rsa_info rsa_info;
Do we actually support any binary where this block is reserved instead of containing the rsa_info?
Daniele
Quoted 12 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h +2
-4}; -u32 reserved0[12 ];union { -u32 private_data_size;/* only applies to GuC */ -u32 reserved1; +u32 reserved2[22 ]; +struct uc_css_guc_info guc_info; }; -u32 header_info; } __packed;static_assert (sizeof (struct uc_css_header ) ==128 );
Re: [PATCH 1/4] drm/xe/guc: Update CSS header structures
Quoted 12 lines · Daniele Ceraolo Spurio
Quoted 11 lines · On 7/24/2025 5:21 PM, [email protected] wrote:
From: John Harrison <[email protected]>
Rework the CSS header structure according to recent updates to the GuC API spec. Also include more field definitions.
Signed-off-by John Harrison <[email protected]>---
drivers/gpu/drm/xe/xe_uc_fw.c | 20 +++++-----drivers/gpu/drm/xe/xe_uc_fw_abi.h| 64 ++++++++++++++++++++-----------2 files changed, 51 insertions(+), 33 deletions(-)
Quoted 8 lines
drivers/gpu/drm/xe/xe_uc_fw.c static int guc_read_css_info(struct xe_uc_fw · line 344
Quoted 6 lines
drivers/gpu/drm/xe/xe_uc_fw.c +0
-0@@ -344,11 +344,11 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css)Since we now have a specific type for it, it might be worth changing this function to accept struct
uc_css_guc_infoinstead of structuc_css_header.
That works.
Quoted 89 lines
Quoted 89 lines
drivers/gpu/drm/xe/xe_uc_fw.c +3
-2return -EINVAL; } - compatibility->major = FIELD_GET(CSS_SW_VERSION_UC_MAJOR, css->submission_version); - compatibility->minor = FIELD_GET(CSS_SW_VERSION_UC_MINOR, css->submission_version); - compatibility->patch = FIELD_GET(CSS_SW_VERSION_UC_PATCH, css->submission_version); + compatibility->major = FIELD_GET(CSS_SW_VERSION_UC_MAJOR, css->guc_info.submission_version); + compatibility->minor = FIELD_GET(CSS_SW_VERSION_UC_MINOR, css->guc_info.submission_version); + compatibility->patch = FIELD_GET(CSS_SW_VERSION_UC_PATCH,
css->guc_info.submission_version);
-uc_fw->private_data_size=css->private_data_size; +uc_fw->private_data_size=css->guc_info.private_data_size; return 0;
}drivers/gpu/drm/xe/xe_uc_fw.c +0
-1@@ -417,8 +417,8 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t css = (struct uc_css_header *)fw_data; /* Check integrity of size values inside CSS header */ - size = (css->header_size_dw - css->key_size_dw -
css->modulus_size_dw-
-css->exponent_size_dw) * sizeof(u32);
+ size = (css->header_size_dw-css->rsa_info.key_size_dw-css->rsa_info.modulus_size_dw-
+css->rsa_info.exponent_size_dw) * sizeof(u32);
if (unlikely(size != sizeof(struct uc_css_header))) { drm_warn(&xe->drm,
"%s firmware %s: unexpected header size: %zu != %zu\n",drivers/gpu/drm/xe/xe_uc_fw.c +1
-1@@ -431,7 +431,7 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t uc_fw->ucode_size = (css->size_dw - css->header_size_dw) * sizeof(u32); /* now RSA */ - uc_fw->rsa_size = css->key_size_dw * sizeof(u32); + uc_fw->rsa_size = css->rsa_info.key_size_dw * sizeof(u32); /* At least, it should have header, uCode and RSA. Size of all three. */size =
sizeof(struct uc_css_header)+uc_fw->ucode_size+drivers/gpu/drm/xe/xe_uc_fw.c +1
-3@@ -444,9 +444,9 @@ static int parse_css_header(struct xe_uc_fw *uc_fw, const void *fw_data, size_t } /* Get version numbers from the CSS header */ - release->major = FIELD_GET(CSS_SW_VERSION_UC_MAJOR, css->sw_version); - release->minor = FIELD_GET(CSS_SW_VERSION_UC_MINOR, css->sw_version); - release->patch = FIELD_GET(CSS_SW_VERSION_UC_PATCH, css->sw_version); + release->major = FIELD_GET(CSS_SW_VERSION_UC_MAJOR,
css->guc_info.sw_version);
+release->minor=FIELD_GET(CSS_SW_VERSION_UC_MINOR, css->guc_info.sw_version);
+release->patch=FIELD_GET(CSS_SW_VERSION_UC_PATCH, css->guc_info.sw_version);
if (uc_fw->type==XE_UC_FW_TYPE_GUC) returnguc_read_css_info(uc_fw, css);drivers/gpu/drm/xe/xe_uc_fw_abi.h +24
-0@@ -44,6 +44,39 @@* in fw. So driver will load a truncated firmware in this case. */ +struct uc_css_rsa_info { + u32 key_size_dw; + u32 modulus_size_dw; + u32 exponent_size_dw; +} __packed; + +struct uc_css_guc_info { + u32 time; +#define CSS_TIME_HOUR (0xFF << 0) +#define CSS_DATE_MIN (0xFF << 8) +#define CSS_DATE_SEC (0xFFFF << 16) + u32 reserved0[5]; + u32 sw_version; +#define CSS_SW_VERSION_UC_MAJOR (0xFF << 16) +#define CSS_SW_VERSION_UC_MINOR (0xFF << 8) +#define CSS_SW_VERSION_UC_PATCH (0xFF << 0) + u32 submission_version; + u32 reserved1[11]; + u32 header_info; +#define CSS_HEADER_INFO_SVN (0xFF) +#define CSS_HEADER_INFO_COPY_VALID (0x1 << 31) + u32 private_data_size; + u32 ukernel_info; +#define CSS_UKERNEL_INFO_DEVICEID (0xFFFF << 16) +#define CSS_UKERNEL_INFO_PRODKEY (0xFF << 8)
Quoted 8 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h line 77
Quoted 6 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h +6
-0+#define CSS_UKERNEL_INFO_BUILDTYPE (0x3 << 2) +#define CSS_UKERNEL_INFO_BUILDTYPE_PROD 0 +#define CSS_UKERNEL_INFO_BUILDTYPE_PREPROD 1 +#define CSS_UKERNEL_INFO_BUILDTYPE_DEBUG 2 +#define CSS_UKERNEL_INFO_ENCSTATUS (0x1 << 1) +#define CSS_UKERNEL_INFO_COPY_VALID (0x1 << 0)I'd skip defining
CSS_UKERNEL_INFO_COPY_VALIDandCSS_HEADER_INFO_COPY_VALID. They're only set in the HW's copy of those fields, which are only consumed by bootrom; we'll never see them set from the driver POV (or even from the POV of someone hexdumping the binary), so having the define has no use.
It's more about not having holes in the definition leaving people to wonder if that is a bug in the driver, a deliberate obfuscation, etc. One could call it _RESERVED but that seems inaccurate when it does actually have a definition.
Quoted 33 lines
Quoted 33 lines
drivers/gpu/drm/xe/xe_uc_fw_abi.h +6
-4+} __packed; + struct uc_css_header { u32 module_type; /*@@ -52,36 +85,21 @@ struct uc_css_header {*/ u32 header_size_dw; u32 header_version; - u32 module_id; + u32 reserved0; u32 module_vendor; u32 date; -#define CSS_DATE_DAY (0xFF << 0) -#define CSS_DATE_MONTH (0xFF << 8) -#define CSS_DATE_YEAR (0xFFFF << 16) +#define CSS_DATE_DAY (0xFF << 0) +#define CSS_DATE_MONTH (0xFF << 8) +#define CSS_DATE_YEAR (0xFFFF << 16)u32
size_dw; /* uCode plusheader_size_dw*/ - u32key_size_dw;
- u32modulus_size_dw;
- u32exponent_size_dw;
- u32 time;drivers/gpu/drm/xe/xe_uc_fw_abi.h +0
-8-#define CSS_TIME_HOUR (0xFF << 0) -#define CSS_DATE_MIN (0xFF << 8) -#define CSS_DATE_SEC (0xFFFF << 16) - char username[8]; - char buildnumber[12]; - u32 sw_version; -#define CSS_SW_VERSION_UC_MAJOR (0xFF << 16) -#define CSS_SW_VERSION_UC_MINOR (0xFF << 8)
Quoted 8 lines
Quoted 6 lines
-#define CSS_SW_VERSION_UC_PATCH (
0xFF<< 0) union {
- u32submission_version; /* only applies to GuC */ - u32 reserved2;
+ u32 reserved1[3];
+ structuc_css_rsa_inforsa_info;Do we actually support any binary where this block is reserved instead of containing the
rsa_info?
Not yet, but there are plans...
John.
Quoted 15 lines
Daniele
Quoted 11 lines
};
- u32 reserved0[12];
union {
- u32private_data_size; /* only applies to GuC */ - u32 reserved1;
+ u32 reserved2[22];
+ structuc_css_guc_infoguc_info;
};
- u32header_info;
}__packed;
static_assert(sizeof(struct uc_css_header) == 128);
PATCH 2/4 drm/xe/guc: Add firmware build type to available info
In reply to [email protected]From: John Harrison <[email protected]>
Some test features are not available in production builds of the GuC firmware. So add the build type field to the available information that tests can inspect to decide if they should skip or run.
--- drivers/gpu/drm/xe/xe_uc_fw.c | 1 + drivers/gpu/drm/xe/xe_uc_fw_types.h | 3 +++ 2 files changed, 4 insertions(+)
drivers/gpu/drm/xe/xe_uc_fw.c +1 -0
@@ -348,6 +348,7 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css) compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.submission_version); compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.submission_version); + uc_fw->build_type =FIELD_GET (CSS_UKERNEL_INFO_BUILDTYPE , css->guc_info.ukernel_info); uc_fw->private_data_size = css->guc_info.private_data_size;return 0 ;
drivers/gpu/drm/xe/xe_uc_fw_types.h +3 -0
@@ -147,6 +147,9 @@ struct xe_uc_fw {/** @private_data_size: size of private data found in uC css header */ u32 private_data_size; + +/** @build_type: Firmware build type (see CSS_UKERNEL_INFO_BUILDTYPE for definitions) */ + u32 build_type; };#endif
Signature · 1 line
2.49.0
Re: [PATCH 2/4] drm/xe/guc: Add firmware build type to available info
Quoted 17 lines · On 7/25/2025 2:21 AM, [email protected] wrote:
From: John Harrison <[email protected]>
Some test features are not available in production builds of the GuC firmware. So add the build type field to the available information that tests can inspect to decide if they should skip or run.
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/xe/xe_uc_fw.c | 1 + drivers/gpu/drm/xe/xe_uc_fw_types.h | 3 +++ 2 files changed, 4 insertions(+)drivers/gpu/drm/xe/xe_uc_fw.c +0
-0
drivers/gpu/drm/xe/xe_uc_fw.c static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css) · line 353
Quoted 6 lines
drivers/gpu/drm/xe/xe_uc_fw.c +1
-0@@ -348,6 +348,7 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css) compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.submission_version); compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.submission_version); + uc_fw->build_type =FIELD_GET (CSS_UKERNEL_INFO_BUILDTYPE , css->guc_info.ukernel_info); uc_fw->private_data_size = css->guc_info.private_data_size;>return 0 ;
maybe we could extend our info message to include build type? instead
[drm] GT0: Using GuC firmware from xe/ptl_guc_70.bin version 70.47.0
something like:
[drm] GT0: Using GuC firmware from xe/ptl_guc_70.bin version 70.47.0 debug [drm] GT0: Using GuC firmware from xe/ptl_guc_70.bin version 70.47.0 pre-production
or
[drm] GT0: Using GuC debug firmware from xe/ptl_guc_70.bin version 70.47.0 [drm] GT0: Using GuC pre-prod firmware from xe/ptl_guc_70.bin version 70.47.0
Quoted 14 lines
drivers/gpu/drm/xe/xe_uc_fw_types.h +3
-0@@ -147,6 +147,9 @@ struct xe_uc_fw {/** @private_data_size: size of private data found in uC css header */ u32 private_data_size; + +/** @build_type: Firmware build type (see CSS_UKERNEL_INFO_BUILDTYPE for definitions) */ + u32 build_type; };#endif
Re: [PATCH 2/4] drm/xe/guc: Add firmware build type to available info
Quoted 31 lines · Michal Wajdeczko
Quoted 17 lines · On 7/25/2025 2:21 AM, [email protected] wrote:
From: John Harrison <[email protected]>
Some test features are not available in production builds of the GuC firmware. So add the build type field to the available information that tests can inspect to decide if they should skip or run.
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/xe/xe_uc_fw.c | 1 + drivers/gpu/drm/xe/xe_uc_fw_types.h | 3 +++ 2 files changed, 4 insertions(+)drivers/gpu/drm/xe/xe_uc_fw.c +0
-0drivers/gpu/drm/xe/xe_uc_fw.c static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css) · line 353
Quoted 6 lines
drivers/gpu/drm/xe/xe_uc_fw.c +1
-0@@ -348,6 +348,7 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css) compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.submission_version); compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.submission_version); + uc_fw->build_type =FIELD_GET (CSS_UKERNEL_INFO_BUILDTYPE , css->guc_info.ukernel_info); uc_fw->private_data_size = css->guc_info.private_data_size;>return 0 ;maybe we could extend our info message to include build type? instead
[drm] GT0: Using GuC firmware from xe/ptl_guc_70.bin version 70.47.0
something like:
Quoted 7 lines
[drm] GT0: Using GuC firmware from xe/ptl_guc_70.bin version 70.47.0 debug [drm] GT0: Using GuC firmware from xe/ptl_guc_70.bin version 70.47.0 pre-production
or
[drm] GT0: Using GuC debug firmware from xe/ptl_guc_70.bin version 70.47.0 [drm] GT0: Using GuC pre-prod firmware from xe/ptl_guc_70.bin version 70.47.0
That gets quite messy to implement. The version print (and the code which calls it) is generic to all firmware types but the build type is GuC specific.
It would be easy to print something in guc_read_css_info() when it pulls the field out, but not sure it is really worth an extra line of debug output just to print the build type. It is almost never a question. As in, a given platform will be at a given level of build for quite some time and then switch to the next level up with a version bump. So for official builds, knowing the platform and version will tell you the build type. And for local debug builds, the developer should know what they are running with!
John.
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/xe/xe_uc_fw_types.h +3
-0@@ -147,6 +147,9 @@ struct xe_uc_fw {/** @private_data_size: size of private data found in uC css header */ u32 private_data_size; + +/** @build_type: Firmware build type (see CSS_UKERNEL_INFO_BUILDTYPE for definitions) */ + u32 build_type; };#endif
Re: [PATCH 2/4] drm/xe/guc: Add firmware build type to available info
In reply to [email protected]Quoted 7 lines · On 7/24/2025 5:21 PM, [email protected] wrote:
From: John Harrison <[email protected]>
Some test features are not available in production builds of the GuC firmware. So add the build type field to the available information that tests can inspect to decide if they should skip or run.
Signed-off-by John Harrison <[email protected]>
Daniele
Quoted 31 lines
--- drivers/gpu/drm/xe/xe_uc_fw.c | 1 + drivers/gpu/drm/xe/xe_uc_fw_types.h | 3 +++ 2 files changed, 4 insertions(+)drivers/gpu/drm/xe/xe_uc_fw.c +1
-0@@ -348,6 +348,7 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css) compatibility->minor =FIELD_GET (CSS_SW_VERSION_UC_MINOR , css->guc_info.submission_version); compatibility->patch =FIELD_GET (CSS_SW_VERSION_UC_PATCH , css->guc_info.submission_version); + uc_fw->build_type =FIELD_GET (CSS_UKERNEL_INFO_BUILDTYPE , css->guc_info.ukernel_info); uc_fw->private_data_size = css->guc_info.private_data_size;return 0 ;drivers/gpu/drm/xe/xe_uc_fw_types.h +3
-0@@ -147,6 +147,9 @@ struct xe_uc_fw {/** @private_data_size: size of private data found in uC css header */ u32 private_data_size; + +/** @build_type: Firmware build type (see CSS_UKERNEL_INFO_BUILDTYPE for definitions) */ + u32 build_type; };#endif
PATCH 3/4 drm/xe: Allow freeing of a managed bo
In reply to [email protected]From: John Harrison <[email protected]>
If a bo is created via xe_managed_bo_create_pin_map() then it cannot be freed by the driver using xe_bo_unpin_map_no_vm(), or indeed any other existing function. The DRM layer will still have a pointer stashed away for later freeing, causing a invalid memory access on driver unload. So add a helper for releasing the DRM action as well.
--- drivers/gpu/drm/xe/xe_bo.c | 5 +++++ drivers/gpu/drm/xe/xe_bo.h | 1 + 2 files changed, 6 insertions(+)
drivers/gpu/drm/xe/xe_bo.c +5 -0
@@ -2222,6 +2222,11 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tilereturn bo; } +void xe_managed_bo_unpin_map_no_vm (struct xe_device *xe,struct xe_bo *bo) +{ +devm_release_action (xe->drm.dev, __xe_bo_unpin_map_no_vm, bo); +} +struct xe_bo *xe_managed_bo_create_from_data (struct xe_device *xe,struct xe_tile *tile,const void *data,size_t size,u32 flags) {
drivers/gpu/drm/xe/xe_bo.h +1 -0
@@ -122,6 +122,7 @@ struct xe_bo *xe_bo_create_pin_map_at_aligned(struct xe_device *xe, u64 alignment);struct xe_bo *xe_managed_bo_create_pin_map (struct xe_device *xe,struct xe_tile *tile,size_t size,u32 flags); +void xe_managed_bo_unpin_map_no_vm (struct xe_device *xe,struct xe_bo *bo);struct xe_bo *xe_managed_bo_create_from_data (struct xe_device *xe,struct xe_tile *tile,const void *data,size_t size,u32 flags);int xe_managed_bo_reinit_in_vram (struct xe_device *xe,struct xe_tile *tile,struct xe_bo **src);
Signature · 1 line
2.49.0
Re: [PATCH 3/4] drm/xe: Allow freeing of a managed bo
Quoted 19 lines · On 7/25/2025 2:21 AM, [email protected] wrote:
From: John Harrison <[email protected]>
If a bo is created via
xe_managed_bo_create_pin_map()then it cannot be freed by the driver usingxe_bo_unpin_map_no_vm(), or indeed any other existing function. The DRM layer will still have a pointer stashed away for later freeing, causing a invalid memory access on driver unload. So add a helper for releasing the DRM action as well.Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 5 +++++ drivers/gpu/drm/xe/xe_bo.h | 1 + 2 files changed, 6 insertions(+)drivers/gpu/drm/xe/xe_bo.c +0
-0
drivers/gpu/drm/xe/xe_bo.c struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile · line 2224
Quoted 3 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -2222,6 +2222,11 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tilereturn bo; }
please add kernel-doc for this new public function
drivers/gpu/drm/xe/xe_bo.c struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile · line 2225
Quoted 1 line
drivers/gpu/drm/xe/xe_bo.c +1
-0+void xe_managed_bo_unpin_map_no_vm (struct xe_device *xe,struct xe_bo *bo)
do we really need xe? we can get xe from xe_bo_device(bo) if needed
Quoted 20 lines
drivers/gpu/drm/xe/xe_bo.c +4
-0+{ +devm_release_action (xe->drm.dev, __xe_bo_unpin_map_no_vm, bo); +}do we want to use this function right away in xe_managed_bo_reinit_in_vram() ? + struct xe_bo *xe_managed_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile, const void *data, size_t size, u32 flags){
drivers/gpu/drm/xe/xe_bo.h +1
-0@@ -122,6 +122,7 @@ struct xe_bo *xe_bo_create_pin_map_at_aligned(struct xe_device *xe, u64 alignment);struct xe_bo *xe_managed_bo_create_pin_map (struct xe_device *xe,struct xe_tile *tile,size_t size,u32 flags); +void xe_managed_bo_unpin_map_no_vm (struct xe_device *xe,struct xe_bo *bo);struct xe_bo *xe_managed_bo_create_from_data (struct xe_device *xe,struct xe_tile *tile,const void *data,size_t size,u32 flags);int xe_managed_bo_reinit_in_vram (struct xe_device *xe,struct xe_tile *tile,struct xe_bo **src);
Re: [PATCH 3/4] drm/xe: Allow freeing of a managed bo
Quoted 15 lines · Michal Wajdeczko
Quoted 14 lines · On 7/25/2025 2:21 AM, [email protected] wrote:
From: John Harrison <[email protected]>
If a bo is created via
xe_managed_bo_create_pin_map()then it cannot be freed by the driver usingxe_bo_unpin_map_no_vm(), or indeed any other existing function. The DRM layer will still have a pointer stashed away for later freeing, causing a invalid memory access on driver unload. So add a helper for releasing the DRM action as well.Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 5 +++++ drivers/gpu/drm/xe/xe_bo.h | 1 + 2 files changed, 6 insertions(+)
Quoted 9 lines
drivers/gpu/drm/xe/xe_bo.c struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile · line 2224
Quoted 8 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -2222,6 +2222,11 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tilereturn bo; }please add kernel-doc for this new public function
None of the xe_bo functions have kernel-doc :(. Someone needs to document the whole lot and I am definitely not the right person to do that. I don't really know what the doc for this function should say, to be quite honest. E.g. why is it _no_vm? This code was suggested by someone from the memory side (I forget who, it was a while ago) and it fixed my problem so here it is.
Quoted 3 lines
drivers/gpu/drm/xe/xe_bo.c struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile · line 2225
Quoted 2 lines
drivers/gpu/drm/xe/xe_bo.c +1
-0+void xe_managed_bo_unpin_map_no_vm (struct xe_device *xe,struct xe_bo *bo)do we really need xe? we can get xe from
xe_bo_device(bo)if needed
I don't know. Maybe? Some way of getting to the drm.dev object is needed.
Quoted 4 lines
drivers/gpu/drm/xe/xe_bo.c struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile
Quoted 4 lines
drivers/gpu/drm/xe/xe_bo.c +3
-0+{ +devm_release_action (xe->drm.dev, __xe_bo_unpin_map_no_vm, bo); +}do we want to use this function right away in xe_managed_bo_reinit_in_vram() ?
Is it worth changing? The point is to provide a way to do this from outside the bo code. Internal code can do what it wants directly. And abstracting a single line of code into a function call wrapper around a single line of code seems more like obfuscation than simplification.
John.
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/xe/xe_bo.c +1
-0+struct xe_bo *xe_managed_bo_create_from_data (struct xe_device *xe,struct xe_tile *tile,const void *data,size_t size,u32 flags) {drivers/gpu/drm/xe/xe_bo.h +1
-0@@ -122,6 +122,7 @@ struct xe_bo *xe_bo_create_pin_map_at_aligned(struct xe_device *xe, u64 alignment);struct xe_bo *xe_managed_bo_create_pin_map (struct xe_device *xe,struct xe_tile *tile,size_t size,u32 flags); +void xe_managed_bo_unpin_map_no_vm (struct xe_device *xe,struct xe_bo *bo);struct xe_bo *xe_managed_bo_create_from_data (struct xe_device *xe,struct xe_tile *tile,const void *data,size_t size,u32 flags);int xe_managed_bo_reinit_in_vram (struct xe_device *xe,struct xe_tile *tile,struct xe_bo **src);
PATCH 4/4 drm/xe/guc: Add test for G2G communications
In reply to [email protected]From: John Harrison <[email protected]>
Add a test for sending messages from every GuC to every other GuC to test G2G communications.
Note that, being a debug only feature, the test interface only exists in pre-production builds of the GuC firmware.
--- drivers/gpu/drm/xe/abi/guc_actions_abi.h | 2 + drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c | 759 ++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_live_test_mod.c | 2 + drivers/gpu/drm/xe/xe_device_types.h | 7 + drivers/gpu/drm/xe/xe_guc.c | 4 + drivers/gpu/drm/xe/xe_guc.h | 4 + drivers/gpu/drm/xe/xe_guc_ct.c | 5 + drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + 8 files changed, 784 insertions(+) create mode 100644 drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c
drivers/gpu/drm/xe/abi/guc_actions_abi.h +2 -0
@@ -154,6 +154,8 @@ enum xe_guc_action {XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE =0x8003 ,XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED =0x8004 ,XE_GUC_ACTION_NOTIFY_EXCEPTION =0x8005 , +XE_GUC_ACTION_TEST_G2G_SEND =0xF001 , +XE_GUC_ACTION_TEST_G2G_RECV =0xF002 , XE_GUC_ACTION_LIMIT };
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +759 -0
759 lines not on this page · raw message
drivers/gpu/drm/xe/tests/xe_live_test_mod.c +2 -0
@@ -10,12 +10,14 @@ extern struct kunit_suite xe_bo_shrink_test_suite;extern struct kunit_suite xe_dma_buf_test_suite;extern struct kunit_suite xe_migrate_test_suite;extern struct kunit_suite xe_mocs_test_suite; +extern struct kunit_suite xe_guc_g2g_test_suite;kunit_test_suite (xe_bo_test_suite);kunit_test_suite (xe_bo_shrink_test_suite);kunit_test_suite (xe_dma_buf_test_suite);kunit_test_suite (xe_migrate_test_suite);kunit_test_suite (xe_mocs_test_suite); +kunit_test_suite (xe_guc_g2g_test_suite);MODULE_AUTHOR ("Intel Corporation" );MODULE_LICENSE ("GPL" );
drivers/gpu/drm/xe/xe_device_types.h +7 -0
@@ -576,6 +576,13 @@ struct xe_device {atomic64_t global_total_pages;#endif +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +/** @g2g_test_array: for testing G2G communications */ +u32 *g2g_test_array; +/** @g2g_test_count: for testing G2G communications */ +atomic_t g2g_test_count; +#endif +/* private: */ #if IS_ENABLED (CONFIG_DRM_XE_DISPLAY )
drivers/gpu/drm/xe/xe_guc.c +4 -0
@@ -1673,3 +1673,7 @@ void xe_guc_declare_wedged(struct xe_guc *guc)xe_guc_ct_stop (&guc->ct);xe_guc_submit_wedge (guc); } + +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +#include "tests/xe_guc_g2g_test.c" +#endif
drivers/gpu/drm/xe/xe_guc.h +4 -0
@@ -53,6 +53,10 @@ void xe_guc_stop(struct xe_guc *guc);int xe_guc_start (struct xe_guc *guc);void xe_guc_declare_wedged (struct xe_guc *guc); +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +int xe_guc_g2g_test_notification (struct xe_guc *guc,u32 *payload,u32 len); +#endif +static inline u16 xe_engine_class_to_guc_class (enum xe_engine_class class) {switch (class) {
drivers/gpu/drm/xe/xe_guc_ct.c +5 -0
@@ -1439,6 +1439,11 @@ static int process_g2h_msg(struct xe_guc_ct *ct, u32 *msg, u32 len)case XE_GUC_ACTION_NOTIFY_EXCEPTION : ret =guc_crash_process_msg (ct, action);break ; +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +case XE_GUC_ACTION_TEST_G2G_RECV : + ret =xe_guc_g2g_test_notification (guc, payload, adj_len); +break ; +#endif default :xe_gt_err (gt,"unexpected G2H action 0x%04x\n" , action); }
drivers/gpu/drm/xe/xe_guc_fwif.h +1 -0
@@ -15,6 +15,7 @@#define G2H_LEN_DW_SCHED_CONTEXT_MODE_SET 4#define G2H_LEN_DW_DEREGISTER_CONTEXT 3#define G2H_LEN_DW_TLB_INVALIDATE 3 +#define G2H_LEN_DW_G2G_NOTIFY_MIN 3#define GUC_ID_MAX 65535#define GUC_ID_UNKNOWN 0xffffffff
Signature · 1 line
2.49.0
Re: [PATCH 4/4] drm/xe/guc: Add test for G2G communications
Quoted 40 lines · On 7/24/2025 5:21 PM, [email protected] wrote:
From: John Harrison <[email protected]>
Add a test for sending messages from every GuC to every other GuC to test G2G communications.
Note that, being a debug only feature, the test interface only exists in pre-production builds of the GuC firmware.
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/xe/abi/guc_actions_abi.h | 2 + drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c | 759 ++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_live_test_mod.c | 2 + drivers/gpu/drm/xe/xe_device_types.h | 7 + drivers/gpu/drm/xe/xe_guc.c | 4 + drivers/gpu/drm/xe/xe_guc.h | 4 + drivers/gpu/drm/xe/xe_guc_ct.c | 5 + drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + 8 files changed, 784 insertions(+)create mode 100644
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.cdrivers/gpu/drm/xe/abi/guc_actions_abi.h +2
-0@@ -154,6 +154,8 @@ enum xe_guc_action {XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE =0x8003 ,XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED =0x8004 ,XE_GUC_ACTION_NOTIFY_EXCEPTION =0x8005 , +XE_GUC_ACTION_TEST_G2G_SEND =0xF001 , +XE_GUC_ACTION_TEST_G2G_RECV =0xF002 , XE_GUC_ACTION_LIMIT };drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +0
-0
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 3
Quoted 3 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +3
-0@@ -0,0 +1,759 @@ +// SPDX-License-Identifier: GPL-2.0 AND MIT +/* +* Copyright © 2024 Intel Corporation
2025?
Quoted 29 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +29
-0+*/ + +#include <linux/delay.h> + +#include <kunit/test.h> +#include <kunit/visibility.h> + +#include "tests/xe_kunit_helpers.h" +#include "tests/xe_pci_test.h" +#include "tests/xe_test.h" + +#include "xe_bo.h" +#include "xe_device.h" +#include "xe_pm.h" + +/* +* Payload is opaque to GuC. So KMD can define any structure or size it wants. +*/ +struct g2g_test_payload { +u32 tx_dev; +u32 tx_tile; +u32 rx_dev; +u32 rx_tile; +u32 seqno; +}; + +static void g2g_test_send (struct kunit *test,struct xe_guc *guc, +u32 far_tile,u32 far_dev, +struct g2g_test_payload *payload)
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 42
Quoted 10 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+{ +struct xe_device *xe =guc_to_xe (guc); +struct xe_gt *gt =guc_to_gt (guc); +u32 *action, total; +size_t payload_len; +int ret; + + payload_len =sizeof (*payload) /sizeof (u32); +KUNIT_ASSERT_EQ_MSG (test,sizeof (*payload), payload_len *sizeof (u32), +"G2G payload not u32 aligned\n" );
Can't you just use a static assert on the size of the structure, instead of asserting at runtime?
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 45
Quoted 3 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +3
-0+ + total =4 + payload_len; + action =kunit_kmalloc_array (test, total,sizeof (*action),GFP_KERNEL );
The size here might be clearer to understand as sizeof(u32). Not a blocker.
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 52
Quoted 7 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +7
-0+KUNIT_ASSERT_NOT_ERR_OR_NULL (test, action); + + action[0 ] =XE_GUC_ACTION_TEST_G2G_SEND ; + action[1 ] = far_tile; + action[2 ] = far_dev; + action[3 ] = payload_len; +memcpy (action +4 , payload, payload_len *sizeof (u32));
sizeof(*payload), instead of payload_len * sizeof(u32) ?
Quoted 248 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +248
-0+ +atomic_inc (&xe->g2g_test_count); + +/* +* Should specify the expected response notification here. Problem is that +* the response will be coming from a different GuC. By the end, it should +* all add up as long as an equal number of messages are sent from each GuC +* and to each GuC. However, in the middle negative reservation space errors +* and such like can occur. Rather than add intrusive changes to the CT layer +* it is simpler to just not bother counting it at all. The system should be +* idle when running the selftest, and the selftest's notification total size +* is well within the G2H allocation size. So there should be no issues with +* needing to block for space, which is all the tracking code is really for. +*/ + ret =xe_guc_ct_send (&guc->ct, action, total,0 ,0 ); +kunit_kfree (test, action); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"G2G send failed: %d [%d:%d -> %d:%d]\n" , ret, +gt_to_tile (gt)->id,G2G_DEV (gt), far_tile, far_dev); +} + +/* +* NB: Can't use KUNIT_ASSERT and friends in here as this is called asynchronously +* from the G2H notification handler. Need that to actually complete rather than +* thread-abort in order to keep the rest of the driver alive! +*/ +int xe_guc_g2g_test_notification (struct xe_guc *guc,u32 *msg,u32 len) +{ +struct xe_device *xe =guc_to_xe (guc); +struct xe_gt *rx_gt =guc_to_gt (guc), *test_gt, *tx_gt =NULL ; +u32 tx_tile, tx_dev, rx_tile, rx_dev, idx, got_len; +struct g2g_test_payload *payload; +size_t payload_len; +int ret =0 , i; + + payload_len =sizeof (*payload) /sizeof (u32); + +if (unlikely (len != (G2H_LEN_DW_G2G_NOTIFY_MIN + payload_len))) { +xe_gt_err (rx_gt,"G2G test notification invalid length %u" , len); + ret = -EPROTO ; + goto done; + } + + tx_tile = msg[0 ]; + tx_dev = msg[1 ]; + got_len = msg[2 ]; + payload = (struct g2g_test_payload *)(msg +3 ); + + rx_tile =gt_to_tile (rx_gt)->id; + rx_dev =G2G_DEV (rx_gt); + +if (got_len != payload_len) { +xe_gt_err (rx_gt,"G2G: Invalid payload length: %u vs %zu\n" , got_len, payload_len); + ret = -EPROTO ; + goto done; + } + +if (payload->tx_dev != tx_dev || payload->tx_tile != tx_tile || + payload->rx_dev != rx_dev || payload->rx_tile != rx_tile) { +xe_gt_err (rx_gt,"G2G: Invalid payload: %d:%d -> %d:%d vs %d:%d -> %d:%d! [%d]\n" , + payload->tx_tile, payload->tx_dev, payload->rx_tile, payload->rx_dev, + tx_tile, tx_dev, rx_tile, rx_dev, payload->seqno); + ret = -EPROTO ; + goto done; + } + +if (!xe->g2g_test_array) { +xe_gt_err (rx_gt,"G2G: Missing test array!\n" ); + ret = -ENOMEM ; + goto done; + } + +for_each_gt (test_gt, xe, i) { +if (gt_to_tile (test_gt)->id != tx_tile) +continue ; + +if (G2G_DEV (test_gt) != tx_dev) +continue ; + +if (tx_gt) { +xe_gt_err (rx_gt,"G2G: Got duplicate TX GTs: %d vs %d for %d:%d!\n" , + tx_gt->info.id, test_gt->info.id, tx_tile, tx_dev); + ret = -EINVAL ; + goto done; + } + + tx_gt = test_gt; + } +if (!tx_gt) { +xe_gt_err (rx_gt,"G2G: Failed to find a TX GT for %d:%d!\n" , tx_tile, tx_dev); + ret = -EINVAL ; + goto done; + } + + idx = (tx_gt->info.id * xe->info.gt_count) + rx_gt->info.id; + +if (xe->g2g_test_array[idx] != payload->seqno -1 ) { +xe_gt_err (rx_gt,"G2G: Seqno mismatch %d vs %d for %d:%d -> %d:%d!\n" , + xe->g2g_test_array[idx], payload->seqno -1 , + tx_tile, tx_dev, rx_tile, rx_dev); + ret = -EINVAL ; + goto done; + } + + xe->g2g_test_array[idx] = payload->seqno; + +done: +atomic_dec (&xe->g2g_test_count); +return ret; +} + +/* +* Send the given seqno from all GuCs to all other GuCs in tile/GT order +*/ +static void g2g_test_in_order (struct kunit *test,struct xe_device *xe,u32 seqno) +{ +struct xe_gt *near_gt, *far_gt; +int i, j; + +for_each_gt (near_gt, xe, i) { +u32 near_tile =gt_to_tile (near_gt)->id; +u32 near_dev =G2G_DEV (near_gt); + +for_each_gt (far_gt, xe, j) { +u32 far_tile =gt_to_tile (far_gt)->id; +u32 far_dev =G2G_DEV (far_gt); +struct g2g_test_payload payload; + +if (far_gt->info.id == near_gt->info.id) +continue ; + + payload.tx_dev = near_dev; + payload.tx_tile = near_tile; + payload.rx_dev = far_dev; + payload.rx_tile = far_tile; + payload.seqno = seqno; +g2g_test_send (test, &near_gt->uc.guc, far_tile, far_dev, &payload); + } + } +} + +#define WAIT_TIME_MS 100 +#define WAIT_COUNT (1000 / WAIT_TIME_MS) + +static void g2g_wait_for_complete (void *_xe) +{ +struct xe_device *xe = (struct xe_device *)_xe; +struct kunit *test =kunit_get_current_test (); +int wait =0 ; + +/* Wait for all G2H messages to be received */ +while (atomic_read (&xe->g2g_test_count)) { +if (++wait >WAIT_COUNT ) +break ; + +msleep (WAIT_TIME_MS ); + } + +KUNIT_ASSERT_EQ_MSG (test,0 ,atomic_read (&xe->g2g_test_count), +"Timed out waiting for notifications\n" ); +kunit_info (test,"Got all notifications back\n" ); +} + +#undef WAIT_TIME_MS +#undef WAIT_COUNT + +static void g2g_clean_array (void *_xe) +{ +struct xe_device *xe = (struct xe_device *)_xe; + + xe->g2g_test_array =NULL ; +} + +#define NUM_LOOPS 16 + +static void g2g_run_test (struct kunit *test,struct xe_device *xe) +{ +u32 seqno, max_array; +int ret, i, j; + + max_array = xe->info.gt_count * xe->info.gt_count; + xe->g2g_test_array =kunit_kcalloc (test, max_array,sizeof (u32),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, xe->g2g_test_array); + + ret =kunit_add_action_or_reset (test, g2g_clean_array, xe); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"Failed to register clean up action\n" ); + +/* +* Send incrementing seqnos from all GuCs to all other GuCs in tile/GT order. +* Tile/GT order doesn't really mean anything to the hardware but it is going +* to be a fixed sequence every time. +* +* Verify that each one comes back having taken the correct route. +*/ + ret =kunit_add_action (test, g2g_wait_for_complete, xe); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"Failed to register clean up action\n" ); +for (seqno =1 ; seqno <NUM_LOOPS ; seqno++) +g2g_test_in_order (test, xe, seqno); + seqno--; + +kunit_release_action (test, &g2g_wait_for_complete, xe); + +/* Check for the final seqno in each slot */ +for (i =0 ; i < xe->info.gt_count; i++) { +for (j =0 ; j < xe->info.gt_count; j++) { +u32 idx = (j * xe->info.gt_count) + i; + +if (i == j) +KUNIT_ASSERT_EQ_MSG (test,0 , xe->g2g_test_array[idx], +"identity seqno modified: %d for %dx%d!\n" , + xe->g2g_test_array[idx], i, j); +else +KUNIT_ASSERT_EQ_MSG (test, seqno, xe->g2g_test_array[idx], +"invalid seqno: %d vs %d for %dx%d!\n" , + xe->g2g_test_array[idx], seqno, i, j); + } + } + +kunit_kfree (test, xe->g2g_test_array); +kunit_release_action (test, &g2g_clean_array, xe); + +kunit_info (test,"Test passed\n" ); +} + +#undef NUM_LOOPS + +static void g2g_ct_stop (struct xe_guc *guc) +{ +struct xe_gt *remote_gt, *gt =guc_to_gt (guc); +struct xe_device *xe =gt_to_xe (gt); +int i, t; + +for_each_gt (remote_gt, xe, i) { +u32 tile, dev; + +if (remote_gt->info.id == gt->info.id) +continue ; + + tile =gt_to_tile (remote_gt)->id; + dev =G2G_DEV (remote_gt); + +for (t =0 ; t <XE_G2G_TYPE_LIMIT ; t++) +guc_g2g_deregister (guc, tile, dev, t); + } +} + +/* Size of a single allocation that contains all G2G CTBs across all GTs */ +static u32 g2g_ctb_size (struct kunit *test,struct xe_device *xe) +{
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 310
Quoted 10 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+unsigned int count = xe->info.gt_count; +u32 num_channels = (count * (count -1 )) /2 ; + +kunit_info (test,"Size: (%d * %d / 2) * %d * 0x%08X + 0x%08X => 0x%08X [%d]\n" , + count, count -1 ,XE_G2G_TYPE_LIMIT ,G2G_BUFFER_SIZE ,G2G_DESC_AREA_SIZE , + num_channels *XE_G2G_TYPE_LIMIT *G2G_BUFFER_SIZE +G2G_DESC_AREA_SIZE , + num_channels *XE_G2G_TYPE_LIMIT ); + +return num_channels *XE_G2G_TYPE_LIMIT *G2G_BUFFER_SIZE +G2G_DESC_AREA_SIZE ; +}
Since you're including this file from xe_guc.c, can't you call guc_g2g_size directly? we'll miss the log but I'm not sure how helpful that log is anyway.
Quoted 36 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +36
-0+ +/* +* Use the driver's regular CTB allocation scheme. +*/ +static void g2g_alloc_default (struct kunit *test,struct xe_device *xe) +{ +struct xe_gt *gt; +int i; + +kunit_info (test,"Default [tiles = %d, GTs = %d]\n" , + xe->info.tile_count, xe->info.gt_count); + +for_each_gt (gt, xe, i) { +struct xe_guc *guc = >->uc.guc; +int ret; + + ret =guc_g2g_alloc (guc); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"G2G alloc failed: %pe" ,ERR_PTR (ret)); +continue ; + } +} + +static void g2g_distribute (struct kunit *test,struct xe_device *xe,struct xe_bo *bo) +{ +struct xe_gt *root_gt, *gt; +int i; + + root_gt =xe_device_get_gt (xe,0 ); + root_gt->uc.guc.g2g.bo = bo; + root_gt->uc.guc.g2g.owned = true; +kunit_info (test,"[%d.%d] Assigned 0x%p\n" ,gt_to_tile (root_gt)->id, root_gt->info.id, bo); + +for_each_gt (gt, xe, i) { +if (gt->info.id !=0 ) { + gt->uc.guc.g2g.owned = false; + gt->uc.guc.g2g.bo =xe_bo_get (bo);
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 356
Quoted 10 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+kunit_info (test,"[%d.%d] Pinned 0x%p\n" , +gt_to_tile (gt)->id, gt->info.id, gt->uc.guc.g2g.bo); + } + +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, gt->uc.guc.g2g.bo); + } +} + +/* +* Allocate a single blob on the host and split between all G2G CTBs.
Isn't this the same as the default on integrated? I'm wondering if it's worth skipping xe_live_guc_g2g_kunit_allmem entirely on integrated, given that the default case is already covered by xe_live_guc_g2g_kunit_default
Quoted 176 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +176
-0+*/ +static void g2g_alloc_host (struct kunit *test,struct xe_device *xe) +{ +struct xe_bo *bo; +u32 g2g_size; + +kunit_info (test,"Host [tiles = %d, GTs = %d]\n" , xe->info.tile_count, xe->info.gt_count); + + g2g_size =g2g_ctb_size (test, xe); + bo =xe_managed_bo_create_pin_map (xe,xe_device_get_root_tile (xe), g2g_size, +XE_BO_FLAG_SYSTEM | +XE_BO_FLAG_GGTT | +XE_BO_FLAG_GGTT_ALL | +XE_BO_FLAG_GGTT_INVALIDATE ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, bo); +kunit_info (test,"[HST] G2G buffer create: 0x%p\n" , bo); + +xe_map_memset (xe, &bo->vmap,0 ,0 , g2g_size); + +g2g_distribute (test, xe, bo); +} + +/* +* Allocate a single blob on the given tile and split between all G2G CTBs. +*/ +static void g2g_alloc_tile (struct kunit *test,struct xe_device *xe,struct xe_tile *tile) +{ +struct xe_bo *bo; +u32 g2g_size; + +KUNIT_ASSERT_TRUE (test,IS_DGFX (xe)); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, tile); + +kunit_info (test,"Tile %d [tiles = %d, GTs = %d]\n" , + tile->id, xe->info.tile_count, xe->info.gt_count); + + g2g_size =g2g_ctb_size (test, xe); + bo =xe_managed_bo_create_pin_map (xe, tile, g2g_size, +XE_BO_FLAG_VRAM_IF_DGFX (tile) | +XE_BO_FLAG_GGTT | +XE_BO_FLAG_GGTT_ALL | +XE_BO_FLAG_GGTT_INVALIDATE ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, bo); +kunit_info (test,"[%d.*] G2G buffer create: 0x%p\n" , tile->id, bo); + +xe_map_memset (xe, &bo->vmap,0 ,0 , g2g_size); + +g2g_distribute (test, xe, bo); +} + +static void g2g_free (struct kunit *test,struct xe_device *xe) +{ +struct xe_gt *gt; +struct xe_bo *bo; +int i; + +for_each_gt (gt, xe, i) { + bo = gt->uc.guc.g2g.bo; +if (!bo) +continue ; + +if (gt->uc.guc.g2g.owned) { +xe_managed_bo_unpin_map_no_vm (xe, bo); +kunit_info (test,"[%d.%d] Unmapped 0x%p\n" , +gt_to_tile (gt)->id, gt->info.id, bo); + }else { +xe_bo_put (bo); +kunit_info (test,"[%d.%d] Unpinned 0x%p\n" , +gt_to_tile (gt)->id, gt->info.id, bo); + } + + gt->uc.guc.g2g.bo =NULL ; + } +} + +static void g2g_stop (struct kunit *test,struct xe_device *xe) +{ +struct xe_gt *gt; +int i; + +for_each_gt (gt, xe, i) { +struct xe_guc *guc = >->uc.guc; + +if (!guc->g2g.bo) +continue ; + +g2g_ct_stop (guc); + } + +g2g_free (test, xe); +} + +/* +* Generate a unique id for each bi-directional CTB for each pair of +* near and far tiles/devices. The id can then be used as an index into +* a single allocation that is sub-divided into multiple CTBs. +* +* For example, with two devices per tile and two tiles, the table should +* look like: +* Far <tile>.<dev> +* 0.0 0.1 1.0 1.1 +* N 0.0 --/-- 00/01 02/03 04/05 +* e 0.1 01/00 --/-- 06/07 08/09 +* a 1.0 03/02 07/06 --/-- 10/11 +* r 1.1 05/04 09/08 11/10 --/-- +* +* Where each entry is Rx/Tx channel id. +* +* So GuC #3 (tile 1, dev 1) talking to GuC #2 (tile 1, dev 0) would +* be reading from channel #11 and writing to channel #10. Whereas, +* GuC #2 talking to GuC #3 would be read on #10 and write to #11. +*/ +static int g2g_slot_flat (u32 near_tile,u32 near_dev,u32 far_tile,u32 far_dev, +u32 type,u32 max_inst,bool have_dev) +{ +u32 near = near_tile, far = far_tile; +u32 idx =0 , x, y, direction; +int i; + +if (have_dev) { + near = (near <<1 ) | near_dev; + far = (far <<1 ) | far_dev; + } + +/* No need to send to one's self */ +if (far == near) +return -1 ; + +if (far > near) { +/* Top right table half */ + x = far; + y = near; + +/* T/R is 'forwards' direction */ + direction = type; + }else { +/* Bottom left table half */ + x = near; + y = far; + +/* B/L is 'backwards' direction */ + direction = (1 - type); + } + +/* Count the rows prior to the target */ +for (i = y; i >0 ; i--) + idx += max_inst - i; + +/* Count this row up to the target */ + idx += (x -1 - y); + +/* Slots are in Rx/Tx pairs */ + idx *=2 ; + +/* Pick Rx/Tx direction */ + idx += direction; + +return idx; +} + +static int g2g_register_flat (struct xe_guc *guc,u32 far_tile,u32 far_dev,u32 type,bool have_dev) +{ +struct xe_gt *gt =guc_to_gt (guc); +struct xe_device *xe =gt_to_xe (gt); +u32 near_tile =gt_to_tile (gt)->id; +u32 near_dev =G2G_DEV (gt); +u32 max = xe->info.gt_count; +int idx; +u32 base, desc, buf; + +if (!guc->g2g.bo) +return -ENODEV ; + + idx =g2g_slot_flat (near_tile, near_dev, far_tile, far_dev, type, max, have_dev); +xe_assert (xe, idx >=0 ); +
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 542
Quoted 10 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+ base =guc_bo_ggtt_addr (guc, guc->g2g.bo); + desc = base + idx *G2G_DESC_SIZE ; + buf = base + idx *G2G_BUFFER_SIZE +G2G_DESC_AREA_SIZE ; + +xe_assert (xe, (desc - base +G2G_DESC_SIZE ) <=G2G_DESC_AREA_SIZE ); +xe_assert (xe, (buf - base +G2G_BUFFER_SIZE ) <=xe_bo_size (guc->g2g.bo)); + +return guc_action_register_g2g_buffer (guc, type, far_tile, far_dev, + desc, buf,G2G_BUFFER_SIZE ); +}
Similar comment as above for those 2 _flat functions: can't you just call the original?
Quoted 24 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +24
-0+ +static void g2g_start (struct kunit *test,struct xe_guc *guc) +{ +struct xe_gt *remote_gt, *gt =guc_to_gt (guc); +struct xe_device *xe =gt_to_xe (gt); +unsigned int i; +int t, ret; +bool have_dev; + +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, guc->g2g.bo); + +/* GuC interface will need extending if more GT device types are ever created. */ +KUNIT_ASSERT_TRUE (test, + (gt->info.type ==XE_GT_TYPE_MAIN ) || + (gt->info.type ==XE_GT_TYPE_MEDIA )); + +/* Channel numbering depends on whether there are multiple GTs per tile */ + have_dev = xe->info.gt_count > xe->info.tile_count; + +for_each_gt (remote_gt, xe, i) { +u32 tile, dev; + +if (remote_gt->info.id == gt->info.id) +continue ;
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 576
Quoted 10 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+ + tile =gt_to_tile (remote_gt)->id; + dev =G2G_DEV (remote_gt); + +for (t =0 ; t <XE_G2G_TYPE_LIMIT ; t++) { + ret =g2g_register_flat (guc, tile, dev, t, have_dev); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"G2G register failed: %pe" ,ERR_PTR (ret)); + } + } +}
And this one is almost the same as guc_g2g_start(). Could just do:
static void g2g_start(struct kunit *test, struct xe_guc *guc) {
struct xe_gt *remote_gt, *gt = guc_to_gt(guc); int ret;
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, guc->g2g.bo);
KUNIT_ASSERT_TRUE(test,
(gt->info.type == XE_GT_TYPE_MAIN) || (gt->info.type == XE_GT_TYPE_MEDIA));
ret = guc_g2g_start(guc);
KUNIT_ASSERT_EQ_MSG(test, 0, ret, "G2G register failed: %pe", ERR_PTR(ret)); }
Quoted 32 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +32
-0+ +enum { +G2G_CTB_TYPE_DEFAULT , +G2G_CTB_TYPE_HOST , +G2G_CTB_TYPE_TILE , +}; + +static void g2g_reinit (struct kunit *test,struct xe_device *xe,int ctb_type,struct xe_tile *tile) +{ +struct xe_gt *gt; +int i, found =0 ; + +g2g_stop (test, xe); + +for_each_gt (gt, xe, i) { +struct xe_guc *guc = >->uc.guc; + +KUNIT_ASSERT_NULL (test, guc->g2g.bo); + } + +switch (ctb_type) { +case G2G_CTB_TYPE_DEFAULT : +g2g_alloc_default (test, xe); +break ; + +case G2G_CTB_TYPE_HOST : +g2g_alloc_host (test, xe); +break ; + +case G2G_CTB_TYPE_TILE : +g2g_alloc_tile (test, xe, tile); +break ;
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 618
Quoted 10 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+ +default : +KUNIT_ASSERT_TRUE (test, false); + } + +for_each_gt (gt, xe, i) { +struct xe_guc *guc = >->uc.guc; + +if (!guc->g2g.bo) +continue ;
Do we actually have a case where the g2g buffer is enabled on some GTs but not others?
Daniele
Quoted 233 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +141
-0+ +g2g_start (test, guc); + found++; + } + +KUNIT_ASSERT_GT_MSG (test, found,1 ,"insufficient G2G channels running: %d" , found); + +kunit_info (test,"Testing across %d GTs\n" , found); +} + +static void g2g_recreate_ctb (void *_xe) +{ +struct xe_device *xe = (struct xe_device *)_xe; +struct kunit *test =kunit_get_current_test (); + +g2g_stop (test, xe); + +if (xe_guc_g2g_wanted (xe)) +g2g_reinit (test, xe,G2G_CTB_TYPE_DEFAULT ,NULL ); +} + +static void g2g_pm_runtime_put (void *_xe) +{ +struct xe_device *xe = (struct xe_device *)_xe; + +xe_pm_runtime_put (xe); +} + +static void g2g_pm_runtime_get (struct kunit *test) +{ +struct xe_device *xe = test->priv; +int ret; + +xe_pm_runtime_get (xe); + ret =kunit_add_action_or_reset (test, g2g_pm_runtime_put, xe); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"Failed to register runtime PM action\n" ); +} + +static void g2g_check_skip (struct kunit *test) +{ +struct xe_device *xe = test->priv; +struct xe_gt *gt; +int i; + +if (IS_SRIOV_VF (xe)) +kunit_skip (test,"not supported from a VF" ); + +if (xe->info.gt_count <=1 ) +kunit_skip (test,"not enough GTs" ); + +for_each_gt (gt, xe, i) { +struct xe_guc *guc = >->uc.guc; + +if (guc->fw.build_type ==CSS_UKERNEL_INFO_BUILDTYPE_PROD ) +kunit_skip (test, +"G2G test interface not available in production firmware builds\n" ); + } +} + +/* +* Simple test that does not try to recreate the CTBs. +* Requires that the platform already enables G2G comms +* but has no risk of leaving the system in a broken state +* afterwards. +*/ +static void xe_live_guc_g2g_kunit_default (struct kunit *test) +{ +struct xe_device *xe = test->priv; + +if (!xe_guc_g2g_wanted (xe)) +kunit_skip (test,"G2G not enabled" ); + +g2g_check_skip (test); + +g2g_pm_runtime_get (test); + +kunit_info (test,"Testing default CTBs\n" ); +g2g_run_test (test, xe); + +kunit_release_action (test, &g2g_pm_runtime_put, xe); +} + +/* +* More complex test that re-creates the CTBs in various location to +* test access to each location from each GuC. Can be run even on +* systems that do not enable G2G by default. On the other hand, +* because it recreates the CTBs, if something goes wrong it could +* leave the system with broken G2G comms. +*/ +static void xe_live_guc_g2g_kunit_allmem (struct kunit *test) +{ +struct xe_device *xe = test->priv; +int ret; + +g2g_check_skip (test); + +g2g_pm_runtime_get (test); + +/* Make sure to leave the system as we found it */ + ret =kunit_add_action_or_reset (test, g2g_recreate_ctb, xe); +KUNIT_ASSERT_EQ_MSG (test,0 , ret,"Failed to register CTB re-creation action\n" ); + +kunit_info (test,"Testing CTB type 'default'...\n" ); +g2g_reinit (test, xe,G2G_CTB_TYPE_DEFAULT ,NULL ); +g2g_run_test (test, xe); + +kunit_info (test,"Testing CTB type 'host'...\n" ); +g2g_reinit (test, xe,G2G_CTB_TYPE_HOST ,NULL ); +g2g_run_test (test, xe); + +if (IS_DGFX (xe)) { +struct xe_tile *tile; +int id; + +for_each_tile (tile, xe, id) { +kunit_info (test,"Testing CTB type 'tile: #%d'...\n" , id); + +g2g_reinit (test, xe,G2G_CTB_TYPE_TILE , tile); +g2g_run_test (test, xe); + } + }else { +kunit_info (test,"Skipping local memory on integrated platform\n" ); + } + +kunit_release_action (test, g2g_recreate_ctb, xe); +kunit_release_action (test, g2g_pm_runtime_put, xe); +} + +static struct kunit_case xe_guc_g2g_tests[] = { +KUNIT_CASE_PARAM (xe_live_guc_g2g_kunit_default, xe_pci_live_device_gen_param), +KUNIT_CASE_PARAM (xe_live_guc_g2g_kunit_allmem, xe_pci_live_device_gen_param), + {} +}; + +VISIBLE_IF_KUNIT +struct kunit_suite xe_guc_g2g_test_suite = { + .name ="xe_guc_g2g" , + .test_cases = xe_guc_g2g_tests, + .init = xe_kunit_helper_xe_device_live_test_init, +}; +EXPORT_SYMBOL_IF_KUNIT (xe_guc_g2g_test_suite);drivers/gpu/drm/xe/tests/xe_live_test_mod.c +2
-0@@ -10,12 +10,14 @@ extern struct kunit_suite xe_bo_shrink_test_suite;extern struct kunit_suite xe_dma_buf_test_suite;extern struct kunit_suite xe_migrate_test_suite;extern struct kunit_suite xe_mocs_test_suite; +extern struct kunit_suite xe_guc_g2g_test_suite;kunit_test_suite (xe_bo_test_suite);kunit_test_suite (xe_bo_shrink_test_suite);kunit_test_suite (xe_dma_buf_test_suite);kunit_test_suite (xe_migrate_test_suite);kunit_test_suite (xe_mocs_test_suite); +kunit_test_suite (xe_guc_g2g_test_suite);MODULE_AUTHOR ("Intel Corporation" );MODULE_LICENSE ("GPL" );drivers/gpu/drm/xe/xe_device_types.h +7
-0@@ -576,6 +576,13 @@ struct xe_device {atomic64_t global_total_pages;#endif +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +/** @g2g_test_array: for testing G2G communications */ +u32 *g2g_test_array; +/** @g2g_test_count: for testing G2G communications */ +atomic_t g2g_test_count; +#endif +/* private: */ #if IS_ENABLED (CONFIG_DRM_XE_DISPLAY )drivers/gpu/drm/xe/xe_guc.c +4
-0@@ -1673,3 +1673,7 @@ void xe_guc_declare_wedged(struct xe_guc *guc)xe_guc_ct_stop (&guc->ct);xe_guc_submit_wedge (guc); } + +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +#include "tests/xe_guc_g2g_test.c" +#endif drivers/gpu/drm/xe/xe_guc.h +4
-0@@ -53,6 +53,10 @@ void xe_guc_stop(struct xe_guc *guc);int xe_guc_start (struct xe_guc *guc);void xe_guc_declare_wedged (struct xe_guc *guc); +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +int xe_guc_g2g_test_notification (struct xe_guc *guc,u32 *payload,u32 len); +#endif +static inline u16 xe_engine_class_to_guc_class (enum xe_engine_class class) {switch (class) {drivers/gpu/drm/xe/xe_guc_ct.c +5
-0@@ -1439,6 +1439,11 @@ static int process_g2h_msg(struct xe_guc_ct *ct, u32 *msg, u32 len)case XE_GUC_ACTION_NOTIFY_EXCEPTION : ret =guc_crash_process_msg (ct, action);break ; +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +case XE_GUC_ACTION_TEST_G2G_RECV : + ret =xe_guc_g2g_test_notification (guc, payload, adj_len); +break ; +#endif default :xe_gt_err (gt,"unexpected G2H action 0x%04x\n" , action); }drivers/gpu/drm/xe/xe_guc_fwif.h +1
-0@@ -15,6 +15,7 @@#define G2H_LEN_DW_SCHED_CONTEXT_MODE_SET 4#define G2H_LEN_DW_DEREGISTER_CONTEXT 3#define G2H_LEN_DW_TLB_INVALIDATE 3 +#define G2H_LEN_DW_G2G_NOTIFY_MIN 3#define GUC_ID_MAX 65535#define GUC_ID_UNKNOWN 0xffffffff
Re: [PATCH 4/4] drm/xe/guc: Add test for G2G communications
Quoted 37 lines · Daniele Ceraolo Spurio
Quoted 36 lines · On 7/24/2025 5:21 PM, [email protected] wrote:
From: John Harrison <[email protected]>
Add a test for sending messages from every GuC to every other GuC to test G2G communications.
Note that, being a debug only feature, the test interface only exists in pre-production builds of the GuC firmware.
Signed-off-by John Harrison <[email protected]>---
drivers/gpu/drm/xe/abi/guc_actions_abi.h | 2 + drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c | 759 ++++++++++++++++++++drivers/gpu/drm/xe/tests/xe_live_test_mod.c| 2 + drivers/gpu/drm/xe/xe_device_types.h | 7 + drivers/gpu/drm/xe/xe_guc.c | 4 + drivers/gpu/drm/xe/xe_guc.h | 4 + drivers/gpu/drm/xe/xe_guc_ct.c | 5 + drivers/gpu/drm/xe/xe_guc_fwif.h | 1 +8 files changed, 784 insertions(+)create mode 100644
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.cdrivers/gpu/drm/xe/abi/guc_actions_abi.h +2
-0@@ -154,6 +154,8 @@ enum xe_guc_action { XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE = 0x8003, XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED = 0x8004, XE_GUC_ACTION_NOTIFY_EXCEPTION = 0x8005, + XE_GUC_ACTION_TEST_G2G_SEND = 0xF001, + XE_GUC_ACTION_TEST_G2G_RECV = 0xF002,
XE_GUC_ACTION_LIMIT
};
diff --gita/drivers/gpu/drm/xe/tests/xe_guc_g2g_test.cb/drivers/gpu/drm/xe/tests/xe_guc_g2g_test.cnew file mode 100644
index 000000000000..9bc8a43f7138
Quoted 8 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 3
Quoted 6 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +3
-0@@ -0,0 +1,759 @@ +// SPDX-License-Identifier: GPL-2.0 AND MIT +/* +* Copyright © 2024 Intel Corporation 2025?
This has been in progress for a while!
Quoted 36 lines
Quoted 36 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +17
-0+*/ + +#include <linux/delay.h> + +#include <kunit/test.h> +#include <kunit/visibility.h> + +#include "tests/xe_kunit_helpers.h" +#include "tests/xe_pci_test.h" +#include "tests/xe_test.h" + +#include "xe_bo.h" +#include "xe_device.h" +#include "xe_pm.h" + +/* +* Payload is opaque to GuC. So KMD can define any structure or size it wants.
+ */drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +16
-0+struct g2g_test_payload { + u32 tx_dev; + u32 tx_tile; + u32 rx_dev; + u32 rx_tile; + u32 seqno; +}; + +static void g2g_test_send (struct kunit *test,struct xe_guc *guc, + u32 far_tile, u32 far_dev, + struct g2g_test_payload *payload) +{ + struct xe_device *xe = guc_to_xe(guc); + struct xe_gt *gt = guc_to_gt(guc); + u32 *action, total; + size_t payload_len;
Quoted 8 lines
Quoted 6 lines
+ int ret;
+
+payload_len=sizeof(*payload)/ sizeof(u32);
+ KUNIT_ASSERT_EQ_MSG(test,sizeof(*payload),payload_len* sizeof(u32),
+ "G2G payload not u32 aligned\n");Can't you just use a static assert on the size of the structure, instead of asserting at runtime?
Hmm. Probably.
Quoted 7 lines
Quoted 5 lines
+
+ total = 4 +payload_len;
+ action =kunit_kmalloc_array(test, total, sizeof(*action), GFP_KERNEL);The size here might be clearer to understand as sizeof(u32). Not a blocker.
Not to me.
Quoted 10 lines
Quoted 8 lines
+
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, action);
+
+ action[0] =XE_GUC_ACTION_TEST_G2G_SEND;
+ action[1] =far_tile;
+ action[2] =far_dev;
+ action[3] =payload_len;
+memcpy(action + 4, payload, payload_len * sizeof(u32));
sizeof(*payload), instead ofpayload_len* sizeof(u32) ?
The intent is that once the length has been calculated at the start, everything is based on that and no back assumptions are made as to where that came from.
Quoted 286 lines
Quoted 286 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +5
-0+ + atomic_inc(&xe->g2g_test_count); + + /* +* Should specify the expected response notification here. Problem is that
+ * the response will be coming from a different GuC. By the end, it should
+ * all add up as long as an equal number of messages are sent from each GuC
+ * and to each GuC. However, in the middle negative reservation space errors
+ * and such like can occur. Rather than add intrusive changes to the CT layer
+ * it is simpler to just not bother counting it at all. The system should be
+ * idle when running the selftest, and the selftest's notification total size
+ * is well within the G2H allocation size. So there should be no issues with
+ * needing to block for space, which is all the tracking code is really for.
+ */
+ ret =xe_guc_ct_send(&guc->ct, action, total, 0, 0); +kunit_kfree(test, action);
+ KUNIT_ASSERT_EQ_MSG(test, 0, ret, "G2G send failed: %d [%d:%d -> %d:%d]\n", ret,
+ gt_to_tile(gt)->id,G2G_DEV(gt),far_tile,far_dev);drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +4
-0+} + +/* +* NB: Can't use KUNIT_ASSERT and friends in here as this is called asynchronously
+ * from the G2H notification handler. Need that to actually complete rather than
+ * thread-abort in order to keep the rest of the driver alive!
+ */drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +13
-0+int xe_guc_g2g_test_notification (struct xe_guc *guc,u32 *msg,u32 len) +{ + struct xe_device *xe = guc_to_xe(guc); + struct xe_gt *rx_gt = guc_to_gt(guc), *test_gt, *tx_gt = NULL; + u32 tx_tile, tx_dev, rx_tile, rx_dev, idx, got_len; + struct g2g_test_payload *payload; + size_t payload_len; + int ret = 0, i; + + payload_len = sizeof(*payload) / sizeof(u32); + + if (unlikely(len != (G2H_LEN_DW_G2G_NOTIFY_MIN + payload_len))) { + xe_gt_err(rx_gt, "G2G test notification invalid length %u",len);
+ ret =-EPROTO;
+ goto done;
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +11
-0+ + tx_tile = msg[0]; + tx_dev = msg[1]; + got_len = msg[2]; + payload = (struct g2g_test_payload *)(msg + 3); + + rx_tile = gt_to_tile(rx_gt)->id; + rx_dev = G2G_DEV(rx_gt); + + if (got_len != payload_len) { + xe_gt_err(rx_gt, "G2G: Invalid payload length: %u vs %zu\n",
got_len,payload_len);
+ ret =-EPROTO;
+ goto done;
+ }
+
+ if (payload->tx_dev!=tx_dev||payload->tx_tile!=tx_tile|| +payload->rx_dev!=rx_dev||payload->rx_tile!=rx_tile) { + xe_gt_err(rx_gt, "G2G: Invalid payload: %d:%d -> %d:%d vs %d:%d -> %d:%d! [%d]\n",
+payload->tx_tile,payload->tx_dev,payload->rx_tile,payload->rx_dev,
+tx_tile,tx_dev,rx_tile,rx_dev,payload->seqno); + ret =-EPROTO;
+ goto done;
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +16
-0+ + if (!xe->g2g_test_array) { + xe_gt_err(rx_gt, "G2G: Missing test array!\n"); + ret = -ENOMEM; + goto done; + } + + for_each_gt(test_gt, xe, i) { + if (gt_to_tile(test_gt)->id != tx_tile) + continue; + + if (G2G_DEV(test_gt) != tx_dev) + continue; + + if (tx_gt) { + xe_gt_err(rx_gt, "G2G: Got duplicate TX GTs: %d vs %dfor %d:%d!\n",
+tx_gt->info.id,test_gt->info.id,tx_tile,tx_dev); + ret =-EINVAL;
+ goto done;
+ }
+
+tx_gt=test_gt;
+ }
+ if (!tx_gt) {
+xe_gt_err(rx_gt, "G2G: Failed to find a TX GT for %d:%d!\n", tx_tile, tx_dev);
+ ret =-EINVAL;
+ goto done;
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +5
-0+ + idx = (tx_gt->info.id * xe->info.gt_count) + rx_gt->info.id; + + if (xe->g2g_test_array[idx] != payload->seqno - 1) { + xe_gt_err(rx_gt, "G2G: Seqno mismatch %d vs %d for %d:%d ->%d:%d!\n",
+ xe->g2g_test_array[idx],payload->seqno- 1, +tx_tile,tx_dev,rx_tile,rx_dev); + ret =-EINVAL;
+ goto done;
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +10
-0+ + xe->g2g_test_array[idx] = payload->seqno; + +done: + atomic_dec(&xe->g2g_test_count); + return ret; +} + +/* +* Send the given seqno from all GuCs to all other GuCs in tile/GT order
+ */
+static voidg2g_test_in_order(struct kunit *test, struct xe_device *xe, u32 seqno)drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +22
-0+{ + struct xe_gt *near_gt, *far_gt; + int i, j; + + for_each_gt(near_gt, xe, i) { + u32 near_tile = gt_to_tile(near_gt)->id; + u32 near_dev = G2G_DEV(near_gt); + + for_each_gt(far_gt, xe, j) { + u32 far_tile = gt_to_tile(far_gt)->id; + u32 far_dev = G2G_DEV(far_gt); + struct g2g_test_payload payload; + + if (far_gt->info.id == near_gt->info.id) + continue; + + payload.tx_dev = near_dev; + payload.tx_tile = near_tile; + payload.rx_dev = far_dev; + payload.rx_tile = far_tile; + payload.seqno = seqno; + g2g_test_send(test, &near_gt->uc.guc, far_tile, far_dev,&payload);
+ }
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +43
-0+} + +#define WAIT_TIME_MS 100 +#define WAIT_COUNT (1000 / WAIT_TIME_MS) + +static void g2g_wait_for_complete (void *_xe) +{ + struct xe_device *xe = (struct xe_device *)_xe; + struct kunit *test = kunit_get_current_test(); + int wait = 0; + + /* Wait for all G2H messages to be received */ + while (atomic_read(&xe->g2g_test_count)) { + if (++wait > WAIT_COUNT) + break; + + msleep(WAIT_TIME_MS); + } + + KUNIT_ASSERT_EQ_MSG(test, 0, atomic_read(&xe->g2g_test_count), + "Timed out waiting for notifications\n"); + kunit_info(test, "Got all notifications back\n"); +} + +#undef WAIT_TIME_MS +#undef WAIT_COUNT + +static void g2g_clean_array (void *_xe) +{ + struct xe_device *xe = (struct xe_device *)_xe; + + xe->g2g_test_array = NULL; +} + +#define NUM_LOOPS 16 + +static void g2g_run_test (struct kunit *test,struct xe_device *xe) +{ + u32 seqno, max_array; + int ret, i, j; + + max_array = xe->info.gt_count * xe->info.gt_count; + xe->g2g_test_array = kunit_kcalloc(test, max_array, sizeof(u32),
GFP_KERNEL);
+KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xe->g2g_test_array); +
+ ret =kunit_add_action_or_reset(test, g2g_clean_array, xe); +KUNIT_ASSERT_EQ_MSG(test, 0, ret, "Failed to register clean up action\n");
+
+ /*
+ * Send incrementing seqnos from all GuCs to all other GuCs in tile/GT order.
+ * Tile/GT order doesn't really mean anything to the hardware but it is going
+ * to be a fixed sequence every time.
+ *
+ * Verify that each one comes back having taken the correct route. + */
+ ret =kunit_add_action(test, g2g_wait_for_complete, xe); +KUNIT_ASSERT_EQ_MSG(test, 0, ret, "Failed to register clean up action\n");
+ for (seqno = 1; seqno <NUM_LOOPS; seqno++)
+g2g_test_in_order(test, xe, seqno);
+ seqno--;drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +14
-0+ + kunit_release_action(test, &g2g_wait_for_complete, xe); + + /* Check for the final seqno in each slot */ + for (i = 0; i < xe->info.gt_count; i++) { + for (j = 0; j < xe->info.gt_count; j++) { + u32 idx = (j * xe->info.gt_count) + i; + + if (i == j) + KUNIT_ASSERT_EQ_MSG(test, 0, xe->g2g_test_array[idx], + "identity seqno modified: %d for %dx%d!\n", + xe->g2g_test_array[idx], i, j); + else + KUNIT_ASSERT_EQ_MSG(test, seqno,xe->g2g_test_array[idx],
+ "invalid seqno: %d vs %d for %dx%d!\n", + xe->g2g_test_array[idx], seqno, i, j); + }
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +30
-0+ + kunit_kfree(test, xe->g2g_test_array); + kunit_release_action(test, &g2g_clean_array, xe); + + kunit_info(test, "Test passed\n"); +} + +#undef NUM_LOOPS + +static void g2g_ct_stop (struct xe_guc *guc) +{ + struct xe_gt *remote_gt, *gt = guc_to_gt(guc); + struct xe_device *xe = gt_to_xe(gt); + int i, t; + + for_each_gt(remote_gt, xe, i) { + u32 tile, dev; + + if (remote_gt->info.id == gt->info.id) + continue; + + tile = gt_to_tile(remote_gt)->id; + dev = G2G_DEV(remote_gt); + + for (t = 0; t < XE_G2G_TYPE_LIMIT; t++) + guc_g2g_deregister(guc, tile, dev, t); + } +} + +/* Size of a single allocation that contains all G2G CTBs across all GTs */
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +6
-0+static u32 g2g_ctb_size (struct kunit *test,struct xe_device *xe) +{ + unsigned int count = xe->info.gt_count; + u32 num_channels = (count * (count - 1)) / 2; + + kunit_info(test, "Size: (%d * %d / 2) * %d * 0x%08X + 0x%08X =>0x%08X [%d]\n",
+ count, count - 1,XE_G2G_TYPE_LIMIT,G2G_BUFFER_SIZE,G2G_DESC_AREA_SIZE,
+num_channels*XE_G2G_TYPE_LIMIT*G2G_BUFFER_SIZE+
Quoted 8 lines
Quoted 6 lines
G2G_DESC_AREA_SIZE,
+num_channels*XE_G2G_TYPE_LIMIT);
+
+ returnnum_channels*XE_G2G_TYPE_LIMIT*G2G_BUFFER_SIZE+G2G_DESC_AREA_SIZE;
+}Since you're including this file from
xe_guc.c, can't you callguc_g2g_sizedirectly? we'll miss the log but I'm not sure how helpful that log is anyway.
The intent is that the test does not rely on or make assumptions about any of the 'official' G2G support. The idea being that there are multiple ways of laying out these buffers and the test wants to test specific options. Whereas, the driver might change which option it uses according to the flavour of the day. Therefore, a bunch of code is duplicated here to guarantee that it does not change behind the back of the test.
Quoted 44 lines
Quoted 44 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +18
-0+ +/* +* Use the driver's regular CTB allocation scheme. +*/ +static void g2g_alloc_default (struct kunit *test,struct xe_device *xe) +{ + struct xe_gt *gt; + int i; + + kunit_info(test, "Default [tiles = %d, GTs = %d]\n", + xe->info.tile_count, xe->info.gt_count); + + for_each_gt(gt, xe, i) { + struct xe_guc *guc = >->uc.guc; + int ret; + + ret = guc_g2g_alloc(guc); + KUNIT_ASSERT_EQ_MSG(test, 0, ret, "G2G alloc failed: %pe",
ERR_PTR(ret));
+ continue;
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +3
-0+} + +static void g2g_distribute(struct kunit *test, struct xe_device *xe,struct
xe_bo*bo)drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +8
-0+{ + struct xe_gt *root_gt, *gt; + int i; + + root_gt = xe_device_get_gt(xe, 0); + root_gt->uc.guc.g2g.bo = bo; + root_gt->uc.guc.g2g.owned = true; + kunit_info(test, "[%d.%d] Assigned 0x%p\n",gt_to_tile(root_gt)->id,
root_gt->info.id, bo);drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +9
-0+ + for_each_gt(gt, xe, i) { + if (gt->info.id != 0) { + gt->uc.guc.g2g.owned = false; + gt->uc.guc.g2g.bo = xe_bo_get(bo); + kunit_info(test, "[%d.%d] Pinned 0x%p\n", + gt_to_tile(gt)->id, gt->info.id, gt->uc.guc.g2g.bo); + } +
Quoted 8 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 356
Quoted 6 lines
+
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, gt->uc.guc.g2g.bo); + }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +4
-0+} + +/* +* Allocate a single blob on the host and split between all G2G CTBs. Isn't this the same as the default on integrated? I'm wondering if it's worth skipping
xe_live_guc_g2g_kunit_allmementirely on integrated, given that the default case is already covered byxe_live_guc_g2g_kunit_default
Except that the default might be to not support G2G. Just because a platform has multiple GTs doesn't mean it actually uses G2G comms. And if G2G is disabled at the driver level then the 'default' test will skip. Whereas, we still want to run the test to make sure that the hardware works, just in case we do need to enable the feature later.
So again, the test can't make any assumptions about what the driver itself is doing. That leads to duplication of testing in some situations, but the test is pretty quick. IMHO, the duplication is worth the safety of guaranteeing that the test always does what it thinks it is doing.
Quoted 190 lines
Quoted 190 lines
+ */
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +6
-0+static void g2g_alloc_host (struct kunit *test,struct xe_device *xe) +{ + struct xe_bo *bo; + u32 g2g_size; + + kunit_info(test, "Host [tiles = %d, GTs = %d]\n",
xe->info.tile_count,xe->info.gt_count);
+
+g2g_size=g2g_ctb_size(test, xe);
+ bo = xe_managed_bo_create_pin_map(xe,xe_device_get_root_tile(xe),g2g_size,
+XE_BO_FLAG_SYSTEM|
+XE_BO_FLAG_GGTT|
+XE_BO_FLAG_GGTT_ALL|
+XE_BO_FLAG_GGTT_INVALIDATE); +KUNIT_ASSERT_NOT_ERR_OR_NULL(test, bo);
+kunit_info(test, "[HST] G2G buffer create: 0x%p\n", bo);drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +8
-0+ + xe_map_memset(xe, &bo->vmap, 0, 0, g2g_size); + + g2g_distribute(test, xe, bo); +} + +/* +* Allocate a single blob on the given tile and split between all G2G CTBs.
+ */
+static voidg2g_alloc_tile(struct kunit *test, struct xe_device *xe, struct xe_tile *tile)drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +72
-0+{ + struct xe_bo *bo; + u32 g2g_size; + + KUNIT_ASSERT_TRUE(test, IS_DGFX(xe)); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, tile); + + kunit_info(test, "Tile %d [tiles = %d, GTs = %d]\n", + tile->id, xe->info.tile_count, xe->info.gt_count); + + g2g_size = g2g_ctb_size(test, xe); + bo = xe_managed_bo_create_pin_map(xe, tile, g2g_size, + XE_BO_FLAG_VRAM_IF_DGFX(tile) | + XE_BO_FLAG_GGTT | + XE_BO_FLAG_GGTT_ALL | + XE_BO_FLAG_GGTT_INVALIDATE); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, bo); + kunit_info(test, "[%d.*] G2G buffer create: 0x%p\n", tile->id, bo); + + xe_map_memset(xe, &bo->vmap, 0, 0, g2g_size); + + g2g_distribute(test, xe, bo); +} + +static void g2g_free (struct kunit *test,struct xe_device *xe) +{ + struct xe_gt *gt; + struct xe_bo *bo; + int i; + + for_each_gt(gt, xe, i) { + bo = gt->uc.guc.g2g.bo; + if (!bo) + continue; + + if (gt->uc.guc.g2g.owned) { + xe_managed_bo_unpin_map_no_vm(xe, bo); + kunit_info(test, "[%d.%d] Unmapped 0x%p\n", + gt_to_tile(gt)->id, gt->info.id, bo); + } else { + xe_bo_put(bo); + kunit_info(test, "[%d.%d] Unpinned 0x%p\n", + gt_to_tile(gt)->id, gt->info.id, bo); + } + + gt->uc.guc.g2g.bo = NULL; + } +} + +static void g2g_stop (struct kunit *test,struct xe_device *xe) +{ + struct xe_gt *gt; + int i; + + for_each_gt(gt, xe, i) { + struct xe_guc *guc = >->uc.guc; + + if (!guc->g2g.bo) + continue; + + g2g_ct_stop(guc); + } + + g2g_free(test, xe); +} + +/* +* Generate a unique id for each bi-directional CTB for each pair of +* near and far tiles/devices. The id can then be used as an index into +* a single allocation that is sub-divided into multiple CTBs. +* +* For example, with two devices per tile and two tiles, the table should
+ * look like:
+ * Far <tile>.<dev>
+ * 0.0 0.1 1.0 1.1
+ * N 0.0 --/-- 00/01 02/03 04/05
+ * e 0.1 01/00 --/-- 06/07 08/09
+ * a 1.0 03/02 07/06 --/-- 10/11
+ * r 1.1 05/04 09/08 11/10 --/--
+ *
+ * Where each entry is Rx/Tx channel id.
+ *
+ * So GuC #3 (tile 1, dev 1) talking to GuC #2 (tile 1, dev 0) would
+ * be reading from channel #11 and writing to channel #10. Whereas,
+ * GuC #2 talking to GuC #3 would be read on #10 and write to #11.
+ */
+static int g2g_slot_flat(u32near_tile, u32near_dev, u32far_tile, u32far_dev,
+ u32 type, u32max_inst, boolhave_dev)drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +47
-0+{ + u32 near = near_tile, far = far_tile; + u32 idx = 0, x, y, direction; + int i; + + if (have_dev) { + near = (near << 1) | near_dev; + far = (far << 1) | far_dev; + } + + /* No need to send to one's self */ + if (far == near) + return -1; + + if (far > near) { + /* Top right table half */ + x = far; + y = near; + + /* T/R is 'forwards' direction */ + direction = type; + } else { + /* Bottom left table half */ + x = near; + y = far; + + /* B/L is 'backwards' direction */ + direction = (1 - type); + } + + /* Count the rows prior to the target */ + for (i = y; i > 0; i--) + idx += max_inst - i; + + /* Count this row up to the target */ + idx += (x - 1 - y); + + /* Slots are in Rx/Tx pairs */ + idx *= 2; + + /* Pick Rx/Tx direction */ + idx += direction; + + return idx; +} + +static int g2g_register_flat(struct xe_guc *guc, u32 far_tile, u32
far_dev, u32 type, boolhave_dev)drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +13
-0+{ + struct xe_gt *gt = guc_to_gt(guc); + struct xe_device *xe = gt_to_xe(gt); + u32 near_tile = gt_to_tile(gt)->id; + u32 near_dev = G2G_DEV(gt); + u32 max = xe->info.gt_count; + int idx; + u32 base, desc, buf; + + if (!guc->g2g.bo) + return -ENODEV; + + idx = g2g_slot_flat(near_tile, near_dev, far_tile, far_dev,type, max,
have_dev);
+xe_assert(xe, idx >= 0);drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +6
-0+ + base = guc_bo_ggtt_addr(guc, guc->g2g.bo); + desc = base + idx * G2G_DESC_SIZE; + buf = base + idx * G2G_BUFFER_SIZE + G2G_DESC_AREA_SIZE; + + xe_assert(xe, (desc - base + G2G_DESC_SIZE) <= G2G_DESC_AREA_SIZE);
Quoted 8 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 542
Quoted 6 lines
+
xe_assert(xe, (buf - base + G2G_BUFFER_SIZE) <= xe_bo_size(guc->g2g.bo));drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +4
-0+ + return guc_action_register_g2g_buffer(guc, type, far_tile, far_dev, + desc, buf, G2G_BUFFER_SIZE); +}Similar comment as above for those 2
_flatfunctions: can't you just call the original?
As above, the 'original' might change but the test does not want to.
Quoted 48 lines
Quoted 34 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +12
-0+ +static void g2g_start (struct kunit *test,struct xe_guc *guc) +{ + struct xe_gt *remote_gt, *gt = guc_to_gt(guc); + struct xe_device *xe = gt_to_xe(gt); + unsigned int i; + int t, ret; + bool have_dev; + + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, guc->g2g.bo); + + /* GuC interface will need extending if more GT device types areever created. */
+ KUNIT_ASSERT_TRUE(test,
+ (gt->info.type==XE_GT_TYPE_MAIN) ||
+ (gt->info.type==XE_GT_TYPE_MEDIA));
+
+ /* Channel numbering depends on whether there are multiple GTs per tile */
+have_dev=xe->info.gt_count>xe->info.tile_count;drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +13
-0+ + for_each_gt(remote_gt, xe, i) { + u32 tile, dev; + + if (remote_gt->info.id == gt->info.id) + continue; + + tile = gt_to_tile(remote_gt)->id; + dev = G2G_DEV(remote_gt); + + for (t = 0; t < XE_G2G_TYPE_LIMIT; t++) { + ret = g2g_register_flat(guc, tile, dev, t, have_dev); + KUNIT_ASSERT_EQ_MSG(test, 0, ret, "G2G register failed:Quoted 4 lines
%pe",
ERR_PTR(ret));
+ }
+ }
+}And this one is almost the same as
guc_g2g_start(). Could just do:static void
g2g_start(struct kunit *test, struct xe_guc *guc){
structxe_gt*remote_gt, *gt =guc_to_gt(guc); int ret;
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, guc->g2g.bo);
Quoted 8 lines
KUNIT_ASSERT_TRUE(test,
(gt->info.type==XE_GT_TYPE_MAIN) || (gt->info.type==XE_GT_TYPE_MEDIA));ret =
guc_g2g_start(guc);
KUNIT_ASSERT_EQ_MSG(test, 0, ret, "G2G register failed: %pe", ERR_PTR(ret)); }
You are correct, but see above.
Quoted 38 lines
Quoted 38 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +8
-0+ +enum { + G2G_CTB_TYPE_DEFAULT, + G2G_CTB_TYPE_HOST, + G2G_CTB_TYPE_TILE, +}; + +static void g2g_reinit(struct kunit *test, struct xe_device *xe, int
ctb_type, structxe_tile*tile)drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +28
-0+{ + struct xe_gt *gt; + int i, found = 0; + + g2g_stop(test, xe); + + for_each_gt(gt, xe, i) { + struct xe_guc *guc = >->uc.guc; + + KUNIT_ASSERT_NULL(test, guc->g2g.bo); + } + + switch (ctb_type) { + case G2G_CTB_TYPE_DEFAULT: + g2g_alloc_default(test, xe); + break; + + case G2G_CTB_TYPE_HOST: + g2g_alloc_host(test, xe); + break; + + case G2G_CTB_TYPE_TILE: + g2g_alloc_tile(test, xe, tile); + break; + + default: + KUNIT_ASSERT_TRUE(test, false); + }
Quoted 8 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c line 441
Quoted 6 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +6
-0+ + for_each_gt(gt, xe, i) { + struct xe_guc *guc = >->uc.guc; + + if (!guc->g2g.bo) + continue;Do we actually have a case where the g2g buffer is enabled on some GTs but not others?
Not that I am aware, but for the sake of a single if statement we can avoid a null pointer deref if that ever happens. E.g. if we had a multi-tile/multi-GT device and the multiple render GTs needed to chat but the media GTs did not.
There is also the option that each tile has its own memory allocation for the bo and one tile failed to allocate, for example.
John.
Quoted 240 lines
Daniele
Quoted 236 lines
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +6
-0+ + g2g_start(test, guc); + found++; + } + + KUNIT_ASSERT_GT_MSG(test, found, 1, "insufficient G2G channelsrunning: %d", found);
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +30
-0+ + kunit_info(test, "Testing across %d GTs\n", found); +} + +static void g2g_recreate_ctb (void *_xe) +{ + struct xe_device *xe = (struct xe_device *)_xe; + struct kunit *test = kunit_get_current_test(); + + g2g_stop(test, xe); + + if (xe_guc_g2g_wanted(xe)) + g2g_reinit(test, xe, G2G_CTB_TYPE_DEFAULT, NULL); +} + +static void g2g_pm_runtime_put (void *_xe) +{ + struct xe_device *xe = (struct xe_device *)_xe; + + xe_pm_runtime_put(xe); +} + +static void g2g_pm_runtime_get (struct kunit *test) +{ + struct xe_device *xe = test->priv; + int ret; + + xe_pm_runtime_get(xe); + ret = kunit_add_action_or_reset(test, g2g_pm_runtime_put, xe); + KUNIT_ASSERT_EQ_MSG(test, 0, ret, "Failed to register runtime PMaction\n");
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +20
-0+} + +static void g2g_check_skip (struct kunit *test) +{ + struct xe_device *xe = test->priv; + struct xe_gt *gt; + int i; + + if (IS_SRIOV_VF(xe)) + kunit_skip(test, "not supported from a VF"); + + if (xe->info.gt_count <= 1) + kunit_skip(test, "not enough GTs"); + + for_each_gt(gt, xe, i) { + struct xe_guc *guc = >->uc.guc; + + if (guc->fw.build_type == CSS_UKERNEL_INFO_BUILDTYPE_PROD) + kunit_skip(test, + "G2G test interface not available in productionfirmware builds\n");
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +44
-0+} + +/* +* Simple test that does not try to recreate the CTBs. +* Requires that the platform already enables G2G comms +* but has no risk of leaving the system in a broken state +* afterwards. +*/ +static void xe_live_guc_g2g_kunit_default (struct kunit *test) +{ + struct xe_device *xe = test->priv; + + if (!xe_guc_g2g_wanted(xe)) + kunit_skip(test, "G2G not enabled"); + + g2g_check_skip(test); + + g2g_pm_runtime_get(test); + + kunit_info(test, "Testing default CTBs\n"); + g2g_run_test(test, xe); + + kunit_release_action(test, &g2g_pm_runtime_put, xe); +} + +/* +* More complex test that re-creates the CTBs in various location to +* test access to each location from each GuC. Can be run even on +* systems that do not enable G2G by default. On the other hand, +* because it recreates the CTBs, if something goes wrong it could +* leave the system with broken G2G comms. +*/ +static void xe_live_guc_g2g_kunit_allmem (struct kunit *test) +{ + struct xe_device *xe = test->priv; + int ret; + + g2g_check_skip(test); + + g2g_pm_runtime_get(test); + + /* Make sure to leave the system as we found it */ + ret = kunit_add_action_or_reset(test, g2g_recreate_ctb, xe); + KUNIT_ASSERT_EQ_MSG(test, 0, ret, "Failed to register CTBre-creation action\n");
drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +21
-0+ + kunit_info(test, "Testing CTB type 'default'...\n"); + g2g_reinit(test, xe, G2G_CTB_TYPE_DEFAULT, NULL); + g2g_run_test(test, xe); + + kunit_info(test, "Testing CTB type 'host'...\n"); + g2g_reinit(test, xe, G2G_CTB_TYPE_HOST, NULL); + g2g_run_test(test, xe); + + if (IS_DGFX(xe)) { + struct xe_tile *tile; + int id; + + for_each_tile(tile, xe, id) { + kunit_info(test, "Testing CTB type 'tile: #%d'...\n", id); + + g2g_reinit(test, xe, G2G_CTB_TYPE_TILE, tile); + g2g_run_test(test, xe); + } + } else { + kunit_info(test, "Skipping local memory on integratedplatform\n");
+ }drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +7
-0+ + kunit_release_action(test, g2g_recreate_ctb, xe); + kunit_release_action(test, g2g_pm_runtime_put, xe); +} + +static struct kunit_case xe_guc_g2g_tests[] = { + KUNIT_CASE_PARAM(xe_live_guc_g2g_kunit_default,
xe_pci_live_device_gen_param),
+KUNIT_CASE_PARAM(xe_live_guc_g2g_kunit_allmem, xe_pci_live_device_gen_param),
+ {}drivers/gpu/drm/xe/tests/xe_guc_g2g_test.c new file +9
-0+}; + +VISIBLE_IF_KUNIT +struct kunit_suite xe_guc_g2g_test_suite = { + .name = "xe_guc_g2g", + .test_cases = xe_guc_g2g_tests, + .init = xe_kunit_helper_xe_device_live_test_init, +}; +EXPORT_SYMBOL_IF_KUNIT (xe_guc_g2g_test_suite);drivers/gpu/drm/xe/tests/xe_live_test_mod.c +2
-0@@ -10,12 +10,14 @@ extern struct kunit_suite xe_bo_shrink_test_suite; extern struct kunit_suite xe_dma_buf_test_suite; extern struct kunit_suite xe_migrate_test_suite; extern struct kunit_suite xe_mocs_test_suite; +extern struct kunit_suite xe_guc_g2g_test_suite; kunit_test_suite(xe_bo_test_suite); kunit_test_suite(xe_bo_shrink_test_suite); kunit_test_suite(xe_dma_buf_test_suite); kunit_test_suite(xe_migrate_test_suite); kunit_test_suite(xe_mocs_test_suite); +kunit_test_suite (xe_guc_g2g_test_suite); MODULE_AUTHOR("Intel Corporation"); MODULE_LICENSE("GPL");drivers/gpu/drm/xe/xe_device_types.h +6
-0@@ -576,6 +576,13 @@ struct xe_device { atomic64_t global_total_pages; #endif +#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST) + /** @g2g_test_array: for testing G2G communications */ + u32 *g2g_test_array; + /** @g2g_test_count: for testing G2G communications */ + atomic_t g2g_test_count; +#endif + /* private: */ #if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)drivers/gpu/drm/xe/xe_guc.c +4
-0@@ -1673,3 +1673,7 @@ void xe_guc_declare_wedged(struct xe_guc *guc) xe_guc_ct_stop(&guc->ct); xe_guc_submit_wedge(guc); } + +#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) +#include "tests/xe_guc_g2g_test.c" +#endif drivers/gpu/drm/xe/xe_guc.h +3
-0@@ -53,6 +53,10 @@ void xe_guc_stop(struct xe_guc *guc); int xe_guc_start(struct xe_guc *guc); void xe_guc_declare_wedged(struct xe_guc *guc); +#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST) +int xe_guc_g2g_test_notification (struct xe_guc *guc,u32 *payload,u32 len); +#endif + static inline u16 xe_engine_class_to_guc_class(enum xe_engine_class class) {switch (class) {
drivers/gpu/drm/xe/xe_guc_ct.c +0
-0@@ -1439,6 +1439,11 @@ static int process_g2h_msg(struct xe_guc_ct *ct, u32 *msg, u32 len)case
XE_GUC_ACTION_NOTIFY_EXCEPTION:
ret =guc_crash_process_msg(ct, action); break;drivers/gpu/drm/xe/xe_guc_ct.c +5
-0+#if IS_ENABLED (CONFIG_DRM_XE_KUNIT_TEST ) + case XE_GUC_ACTION_TEST_G2G_RECV: + ret = xe_guc_g2g_test_notification(guc, payload, adj_len); + break; +#endif default:
xe_gt_err(gt, "unexpected G2H action 0x%04x\n", action); }drivers/gpu/drm/xe/xe_guc_fwif.h +1
-0@@ -15,6 +15,7 @@ #define G2H_LEN_DW_SCHED_CONTEXT_MODE_SET 4 #define G2H_LEN_DW_DEREGISTER_CONTEXT 3 #define G2H_LEN_DW_TLB_INVALIDATE 3 +#define G2H_LEN_DW_G2G_NOTIFY_MIN 3 #define GUC_ID_MAX 65535 #define GUC_ID_UNKNOWN 0xffffffff
Patchwork
CI✗ CI.checkpatch: warning for Add test for G2G communications
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Add test for G2G communications
URL : https://patchwork.freedesktop.org/series/152101/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 63535c743231a7497a612c53f6edbb8a7d14412d
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit e144d64426a8b39ea2ae90968f7c80af6ff18de2
Author: John Harrison <[email protected]> Date: Thu Jul 24 17:21:05 2025 -0700
drm/xe/guc: Add test for G2G communications
Add a test for sending messages from every GuC to every other GuC to test G2G communications.
Note that, being a debug only feature, the test interface only exists in pre-production builds of the GuC firmware.
+ /mt/dim checkpatch e4a00177f7a294b0e63959774b9ad3e5363cbd12 drm-intel caa674074283 drm/xe/guc: Update CSS header structures3eddac6c848e drm/xe/guc: Add firmware build type to available info8996afc95c07 drm/xe: Allow freeing of a managed boe144d64426a8 drm/xe/guc: Add test for G2G communications
-:28: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #28:
new file mode 100644
-:800: WARNING:AVOID_EXTERNS: externs should be avoided in .c files #800: FILE: drivers/gpu/drm/xe/tests/xe_live_test_mod.c:13:
+extern struct kunit_suite xe_guc_g2g_test_suite;
total: 0 errors, 2 warnings, 0 checks, 829 lines checked
Patchwork
CI✓ CI.KUnit: success for Add test for G2G communications
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Add test for G2G communications
URL : https://patchwork.freedesktop.org/series/152101/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [00:27:20] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [00:27:25] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25 [00:27:59] Starting KUnit Kernel (1/1)... [00:27:59] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [00:27:59] ================== guc_buf (11 subtests) =================== [00:27:59] [PASSED] test_smallest [00:27:59] [PASSED] test_largest [00:27:59] [PASSED] test_granular [00:27:59] [PASSED] test_unique [00:27:59] [PASSED] test_overlap [00:27:59] [PASSED] test_reusable [00:27:59] [PASSED] test_too_big [00:27:59] [PASSED] test_flush [00:27:59] [PASSED] test_lookup [00:27:59] [PASSED] test_data [00:27:59] [PASSED] test_class [00:27:59] ===================== [PASSED] guc_buf ===================== [00:27:59] =================== guc_dbm (7 subtests) =================== [00:27:59] [PASSED] test_empty [00:27:59] [PASSED] test_default [00:27:59] ======================== test_size ======================== [00:27:59] [PASSED] 4 [00:27:59] [PASSED] 8 [00:27:59] [PASSED] 32 [00:27:59] [PASSED] 256 [00:27:59] ==================== [PASSED] test_size ==================== [00:27:59] ======================= test_reuse ======================== [00:27:59] [PASSED] 4 [00:27:59] [PASSED] 8 [00:27:59] [PASSED] 32 [00:27:59] [PASSED] 256 [00:27:59] =================== [PASSED] test_reuse ==================== [00:27:59] =================== test_range_overlap ==================== [00:27:59] [PASSED] 4 [00:27:59] [PASSED] 8 [00:27:59] [PASSED] 32 [00:27:59] [PASSED] 256 [00:27:59] =============== [PASSED] test_range_overlap ================ [00:27:59] =================== test_range_compact ==================== [00:27:59] [PASSED] 4 [00:27:59] [PASSED] 8 [00:27:59] [PASSED] 32 [00:27:59] [PASSED] 256 [00:27:59] =============== [PASSED] test_range_compact ================ [00:27:59] ==================== test_range_spare ===================== [00:27:59] [PASSED] 4 [00:27:59] [PASSED] 8 [00:27:59] [PASSED] 32 [00:27:59] [PASSED] 256 [00:27:59] ================ [PASSED] test_range_spare ================= [00:27:59] ===================== [PASSED] guc_dbm ===================== [00:27:59] =================== guc_idm (6 subtests) =================== [00:27:59] [PASSED] bad_init [00:27:59] [PASSED] no_init [00:27:59] [PASSED] init_fini [00:27:59] [PASSED] check_used [00:27:59] [PASSED] check_quota [00:27:59] [PASSED] check_all [00:27:59] ===================== [PASSED] guc_idm ===================== [00:27:59] ================== no_relay (3 subtests) =================== [00:27:59] [PASSED] xe_drops_guc2pf_if_not_ready [00:27:59] [PASSED] xe_drops_guc2vf_if_not_ready [00:27:59] [PASSED] xe_rejects_send_if_not_ready [00:27:59] ==================== [PASSED] no_relay ===================== [00:27:59] ================== pf_relay (14 subtests) ================== [00:27:59] [PASSED] pf_rejects_guc2pf_too_short [00:27:59] [PASSED] pf_rejects_guc2pf_too_long [00:27:59] [PASSED] pf_rejects_guc2pf_no_payload [00:27:59] [PASSED] pf_fails_no_payload [00:27:59] [PASSED] pf_fails_bad_origin [00:27:59] [PASSED] pf_fails_bad_type [00:27:59] [PASSED] pf_txn_reports_error [00:27:59] [PASSED] pf_txn_sends_pf2guc [00:27:59] [PASSED] pf_sends_pf2guc [00:27:59] [SKIPPED] pf_loopback_nop [00:27:59] [SKIPPED] pf_loopback_echo [00:27:59] [SKIPPED] pf_loopback_fail [00:27:59] [SKIPPED] pf_loopback_busy [00:27:59] [SKIPPED] pf_loopback_retry [00:27:59] ==================== [PASSED] pf_relay ===================== [00:27:59] ================== vf_relay (3 subtests) =================== [00:27:59] [PASSED] vf_rejects_guc2vf_too_short [00:27:59] [PASSED] vf_rejects_guc2vf_too_long [00:27:59] [PASSED] vf_rejects_guc2vf_no_payload [00:27:59] ==================== [PASSED] vf_relay ===================== [00:27:59] ===================== lmtt (1 subtest) ===================== [00:27:59] ======================== test_ops ========================= [00:27:59] [PASSED] 2-level [00:27:59] [PASSED] multi-level [00:27:59] ==================== [PASSED] test_ops ===================== [00:27:59] ====================== [PASSED] lmtt ======================= [00:27:59] ================= pf_service (11 subtests) ================= [00:27:59] [PASSED] pf_negotiate_any [00:27:59] [PASSED] pf_negotiate_base_match [00:27:59] [PASSED] pf_negotiate_base_newer [00:27:59] [PASSED] pf_negotiate_base_next [00:27:59] [SKIPPED] pf_negotiate_base_older [00:27:59] [PASSED] pf_negotiate_base_prev [00:27:59] [PASSED] pf_negotiate_latest_match [00:27:59] [PASSED] pf_negotiate_latest_newer [00:27:59] [PASSED] pf_negotiate_latest_next [00:27:59] [SKIPPED] pf_negotiate_latest_older [00:27:59] [SKIPPED] pf_negotiate_latest_prev [00:27:59] =================== [PASSED] pf_service ==================== [00:27:59] ================= xe_guc_g2g (2 subtests) ================== [00:27:59] ============== xe_live_guc_g2g_kunit_default ============== [00:27:59] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ========== [00:27:59] ============== xe_live_guc_g2g_kunit_allmem =============== [00:27:59] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ========== [00:27:59] =================== [SKIPPED] xe_guc_g2g =================== [00:27:59] =================== xe_mocs (2 subtests) =================== [00:27:59] ================ xe_live_mocs_kernel_kunit ================ [00:27:59] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [00:27:59] ================ xe_live_mocs_reset_kunit ================= [00:27:59] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [00:27:59] ==================== [SKIPPED] xe_mocs ===================== [00:27:59] ================= xe_migrate (2 subtests) ================== [00:27:59] ================= xe_migrate_sanity_kunit ================= [00:27:59] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [00:27:59] ================== xe_validate_ccs_kunit ================== [00:27:59] ============= [SKIPPED] xe_validate_ccs_kunit ============== [00:27:59] =================== [SKIPPED] xe_migrate =================== [00:27:59] ================== xe_dma_buf (1 subtest) ================== [00:27:59] ==================== xe_dma_buf_kunit ===================== [00:27:59] ================ [SKIPPED] xe_dma_buf_kunit ================ [00:27:59] =================== [SKIPPED] xe_dma_buf =================== [00:27:59] ================= xe_bo_shrink (1 subtest) ================= [00:27:59] =================== xe_bo_shrink_kunit ==================== [00:27:59] =============== [SKIPPED] xe_bo_shrink_kunit =============== [00:27:59] ================== [SKIPPED] xe_bo_shrink ================== [00:27:59] ==================== xe_bo (2 subtests) ==================== [00:27:59] ================== xe_ccs_migrate_kunit =================== [00:27:59] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [00:27:59] ==================== xe_bo_evict_kunit ==================== [00:27:59] =============== [SKIPPED] xe_bo_evict_kunit ================ [00:27:59] ===================== [SKIPPED] xe_bo ====================== [00:27:59] ==================== args (11 subtests) ==================== [00:27:59] [PASSED] count_args_test [00:27:59] [PASSED] call_args_example [00:27:59] [PASSED] call_args_test [00:27:59] [PASSED] drop_first_arg_example [00:27:59] [PASSED] drop_first_arg_test [00:27:59] [PASSED] first_arg_example [00:27:59] [PASSED] first_arg_test [00:27:59] [PASSED] last_arg_example [00:27:59] [PASSED] last_arg_test [00:27:59] [PASSED] pick_arg_example [00:27:59] [PASSED] sep_comma_example [00:27:59] ====================== [PASSED] args ======================= [00:27:59] =================== xe_pci (3 subtests) ==================== [00:27:59] ==================== check_graphics_ip ==================== [00:27:59] [PASSED] 12.70 Xe_LPG [00:27:59] [PASSED] 12.71 Xe_LPG [00:27:59] [PASSED] 12.74 Xe_LPG+ [00:27:59] [PASSED] 20.01 Xe2_HPG [00:27:59] [PASSED] 20.02 Xe2_HPG [00:27:59] [PASSED] 20.04 Xe2_LPG [00:27:59] [PASSED] 30.00 Xe3_LPG [00:27:59] [PASSED] 30.01 Xe3_LPG [00:27:59] [PASSED] 30.03 Xe3_LPG [00:27:59] ================ [PASSED] check_graphics_ip ================ [00:27:59] ===================== check_media_ip ====================== [00:27:59] [PASSED] 13.00 Xe_LPM+ [00:27:59] [PASSED] 13.01 Xe2_HPM [00:27:59] [PASSED] 20.00 Xe2_LPM [00:27:59] [PASSED] 30.00 Xe3_LPM [00:27:59] [PASSED] 30.02 Xe3_LPM [00:27:59] ================= [PASSED] check_media_ip ================== [00:27:59] ================= check_platform_gt_count ================= [00:27:59] [PASSED] 0x9A60 (TIGERLAKE) [00:27:59] [PASSED] 0x9A68 (TIGERLAKE) [00:27:59] [PASSED] 0x9A70 (TIGERLAKE) [00:27:59] [PASSED] 0x9A40 (TIGERLAKE) [00:27:59] [PASSED] 0x9A49 (TIGERLAKE) [00:27:59] [PASSED] 0x9A59 (TIGERLAKE) [00:27:59] [PASSED] 0x9A78 (TIGERLAKE) [00:27:59] [PASSED] 0x9AC0 (TIGERLAKE) [00:27:59] [PASSED] 0x9AC9 (TIGERLAKE) [00:27:59] [PASSED] 0x9AD9 (TIGERLAKE) [00:27:59] [PASSED] 0x9AF8 (TIGERLAKE) [00:27:59] [PASSED] 0x4C80 (ROCKETLAKE) [00:27:59] [PASSED] 0x4C8A (ROCKETLAKE) [00:27:59] [PASSED] 0x4C8B (ROCKETLAKE) [00:27:59] [PASSED] 0x4C8C (ROCKETLAKE) [00:27:59] [PASSED] 0x4C90 (ROCKETLAKE) [00:27:59] [PASSED] 0x4C9A (ROCKETLAKE) [00:27:59] [PASSED] 0x4680 (ALDERLAKE_S) [00:27:59] [PASSED] 0x4682 (ALDERLAKE_S) [00:27:59] [PASSED] 0x4688 (ALDERLAKE_S) [00:27:59] [PASSED] 0x468A (ALDERLAKE_S) [00:27:59] [PASSED] 0x468B (ALDERLAKE_S) [00:27:59] [PASSED] 0x4690 (ALDERLAKE_S) [00:27:59] [PASSED] 0x4692 (ALDERLAKE_S) [00:27:59] [PASSED] 0x4693 (ALDERLAKE_S) [00:27:59] [PASSED] 0x46A0 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46A1 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46A2 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46A3 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46A6 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46A8 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46AA (ALDERLAKE_P) [00:27:59] [PASSED] 0x462A (ALDERLAKE_P) [00:27:59] [PASSED] 0x4626 (ALDERLAKE_P) [00:27:59] [PASSED] 0x4628 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46B0 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46B1 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46B2 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46B3 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46C0 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46C1 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46C2 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46C3 (ALDERLAKE_P) [00:27:59] [PASSED] 0x46D0 (ALDERLAKE_N) [00:27:59] [PASSED] 0x46D1 (ALDERLAKE_N) [00:27:59] [PASSED] 0x46D2 (ALDERLAKE_N) [00:27:59] [PASSED] 0x46D3 (ALDERLAKE_N) [00:27:59] [PASSED] 0x46D4 (ALDERLAKE_N) [00:27:59] [PASSED] 0xA721 (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7A1 (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7A9 (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7AC (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7AD (ALDERLAKE_P) [00:27:59] [PASSED] 0xA720 (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7A0 (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7A8 (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7AA (ALDERLAKE_P) [00:27:59] [PASSED] 0xA7AB (ALDERLAKE_P) [00:27:59] [PASSED] 0xA780 (ALDERLAKE_S) [00:27:59] [PASSED] 0xA781 (ALDERLAKE_S) [00:27:59] [PASSED] 0xA782 (ALDERLAKE_S) [00:27:59] [PASSED] 0xA783 (ALDERLAKE_S) [00:27:59] [PASSED] 0xA788 (ALDERLAKE_S) [00:27:59] [PASSED] 0xA789 (ALDERLAKE_S) [00:27:59] [PASSED] 0xA78A (ALDERLAKE_S) [00:27:59] [PASSED] 0xA78B (ALDERLAKE_S) [00:27:59] [PASSED] 0x4905 (DG1) [00:27:59] [PASSED] 0x4906 (DG1) [00:27:59] [PASSED] 0x4907 (DG1) [00:27:59] [PASSED] 0x4908 (DG1) [00:27:59] [PASSED] 0x4909 (DG1) [00:27:59] [PASSED] 0x56C0 (DG2) [00:27:59] [PASSED] 0x56C2 (DG2) [00:27:59] [PASSED] 0x56C1 (DG2) [00:27:59] [PASSED] 0x7D51 (METEORLAKE) [00:27:59] [PASSED] 0x7DD1 (METEORLAKE) [00:27:59] [PASSED] 0x7D41 (METEORLAKE) [00:27:59] [PASSED] 0x7D67 (METEORLAKE) [00:27:59] [PASSED] 0xB640 (METEORLAKE) [00:27:59] [PASSED] 0x56A0 (DG2) [00:27:59] [PASSED] 0x56A1 (DG2) [00:27:59] [PASSED] 0x56A2 (DG2) [00:27:59] [PASSED] 0x56BE (DG2) [00:27:59] [PASSED] 0x56BF (DG2) [00:27:59] [PASSED] 0x5690 (DG2) [00:27:59] [PASSED] 0x5691 (DG2) [00:27:59] [PASSED] 0x5692 (DG2) [00:27:59] [PASSED] 0x56A5 (DG2) [00:27:59] [PASSED] 0x56A6 (DG2) [00:27:59] [PASSED] 0x56B0 (DG2) [00:27:59] [PASSED] 0x56B1 (DG2) [00:27:59] [PASSED] 0x56BA (DG2) [00:27:59] [PASSED] 0x56BB (DG2) [00:27:59] [PASSED] 0x56BC (DG2) [00:27:59] [PASSED] 0x56BD (DG2) [00:27:59] [PASSED] 0x5693 (DG2) [00:27:59] [PASSED] 0x5694 (DG2) [00:27:59] [PASSED] 0x5695 (DG2) [00:27:59] [PASSED] 0x56A3 (DG2) [00:27:59] [PASSED] 0x56A4 (DG2) [00:27:59] [PASSED] 0x56B2 (DG2) [00:27:59] [PASSED] 0x56B3 (DG2) [00:27:59] [PASSED] 0x5696 (DG2) [00:27:59] [PASSED] 0x5697 (DG2) [00:27:59] [PASSED] 0xB69 (PVC) [00:27:59] [PASSED] 0xB6E (PVC) [00:27:59] [PASSED] 0xBD4 (PVC) [00:27:59] [PASSED] 0xBD5 (PVC) [00:27:59] [PASSED] 0xBD6 (PVC) [00:27:59] [PASSED] 0xBD7 (PVC) [00:27:59] [PASSED] 0xBD8 (PVC) [00:27:59] [PASSED] 0xBD9 (PVC) [00:27:59] [PASSED] 0xBDA (PVC) [00:27:59] [PASSED] 0xBDB (PVC) [00:27:59] [PASSED] 0xBE0 (PVC) [00:27:59] [PASSED] 0xBE1 (PVC) [00:27:59] [PASSED] 0xBE5 (PVC) [00:27:59] [PASSED] 0x7D40 (METEORLAKE) [00:27:59] [PASSED] 0x7D45 (METEORLAKE) [00:27:59] [PASSED] 0x7D55 (METEORLAKE) [00:27:59] [PASSED] 0x7D60 (METEORLAKE) [00:27:59] [PASSED] 0x7DD5 (METEORLAKE) [00:27:59] [PASSED] 0x6420 (LUNARLAKE) [00:27:59] [PASSED] 0x64A0 (LUNARLAKE) [00:27:59] [PASSED] 0x64B0 (LUNARLAKE) [00:27:59] [PASSED] 0xE202 (BATTLEMAGE) [00:27:59] [PASSED] 0xE209 (BATTLEMAGE) [00:27:59] [PASSED] 0xE20B (BATTLEMAGE) [00:27:59] [PASSED] 0xE20C (BATTLEMAGE) [00:27:59] [PASSED] 0xE20D (BATTLEMAGE) [00:27:59] [PASSED] 0xE210 (BATTLEMAGE) [00:27:59] [PASSED] 0xE211 (BATTLEMAGE) [00:27:59] [PASSED] 0xE212 (BATTLEMAGE) [00:27:59] [PASSED] 0xE216 (BATTLEMAGE) [00:27:59] [PASSED] 0xE220 (BATTLEMAGE) [00:27:59] [PASSED] 0xE221 (BATTLEMAGE) [00:27:59] [PASSED] 0xE222 (BATTLEMAGE) [00:27:59] [PASSED] 0xE223 (BATTLEMAGE) [00:27:59] [PASSED] 0xB080 (PANTHERLAKE) [00:27:59] [PASSED] 0xB081 (PANTHERLAKE) [00:27:59] [PASSED] 0xB082 (PANTHERLAKE) [00:27:59] [PASSED] 0xB083 (PANTHERLAKE) [00:27:59] [PASSED] 0xB084 (PANTHERLAKE) [00:27:59] [PASSED] 0xB085 (PANTHERLAKE) [00:27:59] [PASSED] 0xB086 (PANTHERLAKE) [00:27:59] [PASSED] 0xB087 (PANTHERLAKE) [00:27:59] [PASSED] 0xB08F (PANTHERLAKE) [00:27:59] [PASSED] 0xB090 (PANTHERLAKE) [00:27:59] [PASSED] 0xB0A0 (PANTHERLAKE) [00:27:59] [PASSED] 0xB0B0 (PANTHERLAKE) [00:27:59] [PASSED] 0xFD80 (PANTHERLAKE) [00:27:59] [PASSED] 0xFD81 (PANTHERLAKE) [00:27:59] ============= [PASSED] check_platform_gt_count ============= [00:27:59] ===================== [PASSED] xe_pci ====================== [00:27:59] =================== xe_rtp (2 subtests) ==================== [00:27:59] =============== xe_rtp_process_to_sr_tests ================ [00:27:59] [PASSED] coalesce-same-reg [00:27:59] [PASSED] no-match-no-add [00:27:59] [PASSED] match-or [00:27:59] [PASSED] match-or-xfail [00:27:59] [PASSED] no-match-no-add-multiple-rules [00:27:59] [PASSED] two-regs-two-entries [00:27:59] [PASSED] clr-one-set-other [00:27:59] [PASSED] set-field [00:27:59] [PASSED] conflict-duplicate [00:27:59] [PASSED] conflict-not-disjoint [00:27:59] [PASSED] conflict-reg-type [00:27:59] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [00:27:59] ================== xe_rtp_process_tests =================== [00:27:59] [PASSED] active1 [00:27:59] [PASSED] active2 [00:27:59] [PASSED] active-inactive [00:27:59] [PASSED] inactive-active [00:27:59] [PASSED] inactive-1st_or_active-inactive [00:27:59] [PASSED] inactive-2nd_or_active-inactive [00:27:59] [PASSED] inactive-last_or_active-inactive [00:27:59] [PASSED] inactive-no_or_active-inactive [00:27:59] ============== [PASSED] xe_rtp_process_tests =============== [00:27:59] ===================== [PASSED] xe_rtp ====================== [00:27:59] ==================== xe_wa (1 subtest) ===================== [00:27:59] ======================== xe_wa_gt ========================= [00:27:59] [PASSED] TIGERLAKE (B0) [00:27:59] [PASSED] DG1 (A0) [00:27:59] [PASSED] DG1 (B0) [00:27:59] [PASSED] ALDERLAKE_S (A0) [00:27:59] [PASSED] ALDERLAKE_S (B0) [00:27:59] [PASSED] ALDERLAKE_S (C0) [00:27:59] [PASSED] ALDERLAKE_S (D0) [00:27:59] [PASSED] ALDERLAKE_P (A0) [00:27:59] [PASSED] ALDERLAKE_P (B0) stty: 'standard input': Inappropriate ioctl for device [00:27:59] [PASSED] ALDERLAKE_P (C0) [00:27:59] [PASSED] ALDERLAKE_S_RPLS (D0) [00:27:59] [PASSED] ALDERLAKE_P_RPLU (E0) [00:27:59] [PASSED] DG2_G10 (C0) [00:27:59] [PASSED] DG2_G11 (B1) [00:27:59] [PASSED] DG2_G12 (A1) [00:27:59] [PASSED] METEORLAKE (g:A0, m:A0) [00:27:59] [PASSED] METEORLAKE (g:A0, m:A0) [00:27:59] [PASSED] METEORLAKE (g:A0, m:A0) [00:27:59] [PASSED] LUNARLAKE (g:A0, m:A0) [00:27:59] [PASSED] LUNARLAKE (g:B0, m:A0) [00:27:59] [PASSED] BATTLEMAGE (g:A0, m:A1) [00:27:59] ==================== [PASSED] xe_wa_gt ===================== [00:27:59] ====================== [PASSED] xe_wa ====================== [00:27:59] ============================================================ [00:27:59] Testing complete. Ran 299 tests: passed: 281, skipped: 18 [00:27:59] Elapsed time: 38.905s total, 4.462s configuring, 34.076s building, 0.317s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [00:27:59] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [00:28:01] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25 [00:28:27] Starting KUnit Kernel (1/1)... [00:28:27] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [00:28:27] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [00:28:27] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [00:28:27] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [00:28:27] =========== drm_validate_clone_mode (2 subtests) =========== [00:28:27] ============== drm_test_check_in_clone_mode =============== [00:28:27] [PASSED] in_clone_mode [00:28:27] [PASSED] not_in_clone_mode [00:28:27] ========== [PASSED] drm_test_check_in_clone_mode =========== [00:28:27] =============== drm_test_check_valid_clones =============== [00:28:27] [PASSED] not_in_clone_mode [00:28:27] [PASSED] valid_clone [00:28:27] [PASSED] invalid_clone [00:28:27] =========== [PASSED] drm_test_check_valid_clones =========== [00:28:27] ============= [PASSED] drm_validate_clone_mode ============= [00:28:27] ============= drm_validate_modeset (1 subtest) ============= [00:28:27] [PASSED] drm_test_check_connector_changed_modeset [00:28:27] ============== [PASSED] drm_validate_modeset =============== [00:28:27] ====== drm_test_bridge_get_current_state (2 subtests) ====== [00:28:27] [PASSED] drm_test_drm_bridge_get_current_state_atomic [00:28:27] [PASSED] drm_test_drm_bridge_get_current_state_legacy [00:28:27] ======== [PASSED] drm_test_bridge_get_current_state ======== [00:28:27] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [00:28:27] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [00:28:27] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [00:28:27] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy [00:28:27] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [00:28:27] ============== drm_bridge_alloc (2 subtests) =============== [00:28:27] [PASSED] drm_test_drm_bridge_alloc_basic [00:28:27] [PASSED] drm_test_drm_bridge_alloc_get_put [00:28:27] ================ [PASSED] drm_bridge_alloc ================= [00:28:27] ================== drm_buddy (7 subtests) ================== [00:28:27] [PASSED] drm_test_buddy_alloc_limit [00:28:27] [PASSED] drm_test_buddy_alloc_optimistic [00:28:27] [PASSED] drm_test_buddy_alloc_pessimistic [00:28:27] [PASSED] drm_test_buddy_alloc_pathological [00:28:27] [PASSED] drm_test_buddy_alloc_contiguous [00:28:27] [PASSED] drm_test_buddy_alloc_clear [00:28:27] [PASSED] drm_test_buddy_alloc_range_bias [00:28:27] ==================== [PASSED] drm_buddy ==================== [00:28:27] ============= drm_cmdline_parser (40 subtests) ============= [00:28:27] [PASSED] drm_test_cmdline_force_d_only [00:28:27] [PASSED] drm_test_cmdline_force_D_only_dvi [00:28:27] [PASSED] drm_test_cmdline_force_D_only_hdmi [00:28:27] [PASSED] drm_test_cmdline_force_D_only_not_digital [00:28:27] [PASSED] drm_test_cmdline_force_e_only [00:28:27] [PASSED] drm_test_cmdline_res [00:28:27] [PASSED] drm_test_cmdline_res_vesa [00:28:27] [PASSED] drm_test_cmdline_res_vesa_rblank [00:28:27] [PASSED] drm_test_cmdline_res_rblank [00:28:27] [PASSED] drm_test_cmdline_res_bpp [00:28:27] [PASSED] drm_test_cmdline_res_refresh [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [00:28:27] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [00:28:27] [PASSED] drm_test_cmdline_res_margins_force_on [00:28:27] [PASSED] drm_test_cmdline_res_vesa_margins [00:28:27] [PASSED] drm_test_cmdline_name [00:28:27] [PASSED] drm_test_cmdline_name_bpp [00:28:27] [PASSED] drm_test_cmdline_name_option [00:28:27] [PASSED] drm_test_cmdline_name_bpp_option [00:28:27] [PASSED] drm_test_cmdline_rotate_0 [00:28:27] [PASSED] drm_test_cmdline_rotate_90 [00:28:27] [PASSED] drm_test_cmdline_rotate_180 [00:28:27] [PASSED] drm_test_cmdline_rotate_270 [00:28:27] [PASSED] drm_test_cmdline_hmirror [00:28:27] [PASSED] drm_test_cmdline_vmirror [00:28:27] [PASSED] drm_test_cmdline_margin_options [00:28:27] [PASSED] drm_test_cmdline_multiple_options [00:28:27] [PASSED] drm_test_cmdline_bpp_extra_and_option [00:28:27] [PASSED] drm_test_cmdline_extra_and_option [00:28:27] [PASSED] drm_test_cmdline_freestanding_options [00:28:27] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [00:28:27] [PASSED] drm_test_cmdline_panel_orientation [00:28:27] ================ drm_test_cmdline_invalid ================= [00:28:27] [PASSED] margin_only [00:28:27] [PASSED] interlace_only [00:28:27] [PASSED] res_missing_x [00:28:27] [PASSED] res_missing_y [00:28:27] [PASSED] res_bad_y [00:28:27] [PASSED] res_missing_y_bpp [00:28:27] [PASSED] res_bad_bpp [00:28:27] [PASSED] res_bad_refresh [00:28:27] [PASSED] res_bpp_refresh_force_on_off [00:28:27] [PASSED] res_invalid_mode [00:28:27] [PASSED] res_bpp_wrong_place_mode [00:28:27] [PASSED] name_bpp_refresh [00:28:27] [PASSED] name_refresh [00:28:27] [PASSED] name_refresh_wrong_mode [00:28:27] [PASSED] name_refresh_invalid_mode [00:28:27] [PASSED] rotate_multiple [00:28:27] [PASSED] rotate_invalid_val [00:28:27] [PASSED] rotate_truncated [00:28:27] [PASSED] invalid_option [00:28:27] [PASSED] invalid_tv_option [00:28:27] [PASSED] truncated_tv_option [00:28:27] ============ [PASSED] drm_test_cmdline_invalid ============= [00:28:27] =============== drm_test_cmdline_tv_options =============== [00:28:27] [PASSED] NTSC [00:28:27] [PASSED] NTSC_443 [00:28:27] [PASSED] NTSC_J [00:28:27] [PASSED] PAL [00:28:27] [PASSED] PAL_M [00:28:27] [PASSED] PAL_N [00:28:27] [PASSED] SECAM [00:28:27] [PASSED] MONO_525 [00:28:27] [PASSED] MONO_625 [00:28:27] =========== [PASSED] drm_test_cmdline_tv_options =========== [00:28:27] =============== [PASSED] drm_cmdline_parser ================ [00:28:27] ========== drmm_connector_hdmi_init (20 subtests) ========== [00:28:27] [PASSED] drm_test_connector_hdmi_init_valid [00:28:27] [PASSED] drm_test_connector_hdmi_init_bpc_8 [00:28:27] [PASSED] drm_test_connector_hdmi_init_bpc_10 [00:28:27] [PASSED] drm_test_connector_hdmi_init_bpc_12 [00:28:27] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [00:28:27] [PASSED] drm_test_connector_hdmi_init_bpc_null [00:28:27] [PASSED] drm_test_connector_hdmi_init_formats_empty [00:28:27] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [00:28:27] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [00:28:27] [PASSED] supported_formats=0x9 yuv420_allowed=1 [00:28:27] [PASSED] supported_formats=0x9 yuv420_allowed=0 [00:28:27] [PASSED] supported_formats=0x3 yuv420_allowed=1 [00:28:27] [PASSED] supported_formats=0x3 yuv420_allowed=0 [00:28:27] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [00:28:27] [PASSED] drm_test_connector_hdmi_init_null_ddc [00:28:27] [PASSED] drm_test_connector_hdmi_init_null_product [00:28:27] [PASSED] drm_test_connector_hdmi_init_null_vendor [00:28:27] [PASSED] drm_test_connector_hdmi_init_product_length_exact [00:28:27] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [00:28:27] [PASSED] drm_test_connector_hdmi_init_product_valid [00:28:27] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [00:28:27] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [00:28:27] [PASSED] drm_test_connector_hdmi_init_vendor_valid [00:28:27] ========= drm_test_connector_hdmi_init_type_valid ========= [00:28:27] [PASSED] HDMI-A [00:28:27] [PASSED] HDMI-B [00:28:27] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [00:28:27] ======== drm_test_connector_hdmi_init_type_invalid ======== [00:28:27] [PASSED] Unknown [00:28:27] [PASSED] VGA [00:28:27] [PASSED] DVI-I [00:28:27] [PASSED] DVI-D [00:28:27] [PASSED] DVI-A [00:28:27] [PASSED] Composite [00:28:27] [PASSED] SVIDEO [00:28:27] [PASSED] LVDS [00:28:27] [PASSED] Component [00:28:27] [PASSED] DIN [00:28:27] [PASSED] DP [00:28:27] [PASSED] TV [00:28:27] [PASSED] eDP [00:28:27] [PASSED] Virtual [00:28:27] [PASSED] DSI [00:28:27] [PASSED] DPI [00:28:27] [PASSED] Writeback [00:28:27] [PASSED] SPI [00:28:27] [PASSED] USB [00:28:27] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [00:28:27] ============ [PASSED] drmm_connector_hdmi_init ============= [00:28:27] ============= drmm_connector_init (3 subtests) ============= [00:28:27] [PASSED] drm_test_drmm_connector_init [00:28:27] [PASSED] drm_test_drmm_connector_init_null_ddc [00:28:27] ========= drm_test_drmm_connector_init_type_valid ========= [00:28:27] [PASSED] Unknown [00:28:27] [PASSED] VGA [00:28:27] [PASSED] DVI-I [00:28:27] [PASSED] DVI-D [00:28:27] [PASSED] DVI-A [00:28:27] [PASSED] Composite [00:28:27] [PASSED] SVIDEO [00:28:27] [PASSED] LVDS [00:28:27] [PASSED] Component [00:28:27] [PASSED] DIN [00:28:27] [PASSED] DP [00:28:27] [PASSED] HDMI-A [00:28:27] [PASSED] HDMI-B [00:28:27] [PASSED] TV [00:28:27] [PASSED] eDP [00:28:27] [PASSED] Virtual [00:28:27] [PASSED] DSI [00:28:27] [PASSED] DPI [00:28:27] [PASSED] Writeback [00:28:27] [PASSED] SPI [00:28:27] [PASSED] USB [00:28:27] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [00:28:27] =============== [PASSED] drmm_connector_init =============== [00:28:27] ========= drm_connector_dynamic_init (6 subtests) ========== [00:28:27] [PASSED] drm_test_drm_connector_dynamic_init [00:28:27] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [00:28:27] [PASSED] drm_test_drm_connector_dynamic_init_not_added [00:28:27] [PASSED] drm_test_drm_connector_dynamic_init_properties [00:28:27] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [00:28:27] [PASSED] Unknown [00:28:27] [PASSED] VGA [00:28:27] [PASSED] DVI-I [00:28:27] [PASSED] DVI-D [00:28:27] [PASSED] DVI-A [00:28:27] [PASSED] Composite [00:28:27] [PASSED] SVIDEO [00:28:27] [PASSED] LVDS [00:28:27] [PASSED] Component [00:28:27] [PASSED] DIN [00:28:27] [PASSED] DP [00:28:27] [PASSED] HDMI-A [00:28:27] [PASSED] HDMI-B [00:28:27] [PASSED] TV [00:28:27] [PASSED] eDP [00:28:27] [PASSED] Virtual [00:28:27] [PASSED] DSI [00:28:27] [PASSED] DPI [00:28:27] [PASSED] Writeback [00:28:27] [PASSED] SPI [00:28:27] [PASSED] USB [00:28:27] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [00:28:27] ======== drm_test_drm_connector_dynamic_init_name ========= [00:28:27] [PASSED] Unknown [00:28:27] [PASSED] VGA [00:28:27] [PASSED] DVI-I [00:28:27] [PASSED] DVI-D [00:28:27] [PASSED] DVI-A [00:28:27] [PASSED] Composite [00:28:27] [PASSED] SVIDEO [00:28:27] [PASSED] LVDS [00:28:27] [PASSED] Component [00:28:27] [PASSED] DIN [00:28:27] [PASSED] DP [00:28:27] [PASSED] HDMI-A [00:28:27] [PASSED] HDMI-B [00:28:27] [PASSED] TV [00:28:27] [PASSED] eDP [00:28:27] [PASSED] Virtual [00:28:27] [PASSED] DSI [00:28:27] [PASSED] DPI [00:28:27] [PASSED] Writeback [00:28:27] [PASSED] SPI [00:28:27] [PASSED] USB [00:28:27] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [00:28:27] =========== [PASSED] drm_connector_dynamic_init ============ [00:28:27] ==== drm_connector_dynamic_register_early (4 subtests) ===== [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [00:28:27] ====== [PASSED] drm_connector_dynamic_register_early ======= [00:28:27] ======= drm_connector_dynamic_register (7 subtests) ======== [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_on_list [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_no_init [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [00:28:27] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [00:28:27] ========= [PASSED] drm_connector_dynamic_register ========== [00:28:27] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [00:28:27] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [00:28:27] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [00:28:27] === [PASSED] drm_connector_attach_broadcast_rgb_property === [00:28:27] ========== drm_get_tv_mode_from_name (2 subtests) ========== [00:28:27] ========== drm_test_get_tv_mode_from_name_valid =========== [00:28:27] [PASSED] NTSC [00:28:27] [PASSED] NTSC-443 [00:28:27] [PASSED] NTSC-J [00:28:27] [PASSED] PAL [00:28:27] [PASSED] PAL-M [00:28:27] [PASSED] PAL-N [00:28:27] [PASSED] SECAM [00:28:27] [PASSED] Mono [00:28:27] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [00:28:27] [PASSED] drm_test_get_tv_mode_from_name_truncated [00:28:27] ============ [PASSED] drm_get_tv_mode_from_name ============ [00:28:27] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [00:28:27] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [00:28:27] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [00:28:27] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [00:28:27] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [00:28:27] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [00:28:27] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [00:28:27] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [00:28:27] [PASSED] VIC 96 [00:28:27] [PASSED] VIC 97 [00:28:27] [PASSED] VIC 101 [00:28:27] [PASSED] VIC 102 [00:28:27] [PASSED] VIC 106 [00:28:27] [PASSED] VIC 107 [00:28:27] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [00:28:27] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [00:28:27] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [00:28:27] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [00:28:27] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [00:28:27] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [00:28:27] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [00:28:27] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [00:28:27] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [00:28:27] [PASSED] Automatic [00:28:27] [PASSED] Full [00:28:27] [PASSED] Limited 16:235 [00:28:27] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [00:28:27] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [00:28:27] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [00:28:27] == drm_hdmi_connector_get_output_format_name (2 subtests) == [00:28:27] === drm_test_drm_hdmi_connector_get_output_format_name ==== [00:28:27] [PASSED] RGB [00:28:27] [PASSED] YUV 4:2:0 [00:28:27] [PASSED] YUV 4:2:2 [00:28:27] [PASSED] YUV 4:4:4 [00:28:27] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [00:28:27] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [00:28:27] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [00:28:27] ============= drm_damage_helper (21 subtests) ============== [00:28:27] [PASSED] drm_test_damage_iter_no_damage [00:28:27] [PASSED] drm_test_damage_iter_no_damage_fractional_src [00:28:27] [PASSED] drm_test_damage_iter_no_damage_src_moved [00:28:27] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [00:28:27] [PASSED] drm_test_damage_iter_no_damage_not_visible [00:28:27] [PASSED] drm_test_damage_iter_no_damage_no_crtc [00:28:27] [PASSED] drm_test_damage_iter_no_damage_no_fb [00:28:27] [PASSED] drm_test_damage_iter_simple_damage [00:28:27] [PASSED] drm_test_damage_iter_single_damage [00:28:27] [PASSED] drm_test_damage_iter_single_damage_intersect_src [00:28:27] [PASSED] drm_test_damage_iter_single_damage_outside_src [00:28:27] [PASSED] drm_test_damage_iter_single_damage_fractional_src [00:28:27] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [00:28:27] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [00:28:27] [PASSED] drm_test_damage_iter_single_damage_src_moved [00:28:27] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [00:28:27] [PASSED] drm_test_damage_iter_damage [00:28:27] [PASSED] drm_test_damage_iter_damage_one_intersect [00:28:27] [PASSED] drm_test_damage_iter_damage_one_outside [00:28:27] [PASSED] drm_test_damage_iter_damage_src_moved [00:28:27] [PASSED] drm_test_damage_iter_damage_not_visible [00:28:27] ================ [PASSED] drm_damage_helper ================ [00:28:27] ============== drm_dp_mst_helper (3 subtests) ============== [00:28:27] ============== drm_test_dp_mst_calc_pbn_mode ============== [00:28:27] [PASSED] Clock 154000 BPP 30 DSC disabled [00:28:27] [PASSED] Clock 234000 BPP 30 DSC disabled [00:28:27] [PASSED] Clock 297000 BPP 24 DSC disabled [00:28:27] [PASSED] Clock 332880 BPP 24 DSC enabled [00:28:27] [PASSED] Clock 324540 BPP 24 DSC enabled [00:28:27] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [00:28:27] ============== drm_test_dp_mst_calc_pbn_div =============== [00:28:27] [PASSED] Link rate 2000000 lane count 4 [00:28:27] [PASSED] Link rate 2000000 lane count 2 [00:28:27] [PASSED] Link rate 2000000 lane count 1 [00:28:27] [PASSED] Link rate 1350000 lane count 4 [00:28:27] [PASSED] Link rate 1350000 lane count 2 [00:28:27] [PASSED] Link rate 1350000 lane count 1 [00:28:27] [PASSED] Link rate 1000000 lane count 4 [00:28:27] [PASSED] Link rate 1000000 lane count 2 [00:28:27] [PASSED] Link rate 1000000 lane count 1 [00:28:27] [PASSED] Link rate 810000 lane count 4 [00:28:27] [PASSED] Link rate 810000 lane count 2 [00:28:27] [PASSED] Link rate 810000 lane count 1 [00:28:27] [PASSED] Link rate 540000 lane count 4 [00:28:27] [PASSED] Link rate 540000 lane count 2 [00:28:27] [PASSED] Link rate 540000 lane count 1 [00:28:27] [PASSED] Link rate 270000 lane count 4 [00:28:27] [PASSED] Link rate 270000 lane count 2 [00:28:27] [PASSED] Link rate 270000 lane count 1 [00:28:27] [PASSED] Link rate 162000 lane count 4 [00:28:27] [PASSED] Link rate 162000 lane count 2 [00:28:27] [PASSED] Link rate 162000 lane count 1 [00:28:27] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [00:28:27] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [00:28:27] [PASSED] DP_ENUM_PATH_RESOURCES with port number [00:28:27] [PASSED] DP_POWER_UP_PHY with port number [00:28:27] [PASSED] DP_POWER_DOWN_PHY with port number [00:28:27] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [00:28:27] [PASSED] DP_ALLOCATE_PAYLOAD with port number [00:28:27] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [00:28:27] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [00:28:27] [PASSED] DP_QUERY_PAYLOAD with port number [00:28:27] [PASSED] DP_QUERY_PAYLOAD with VCPI [00:28:27] [PASSED] DP_REMOTE_DPCD_READ with port number [00:28:27] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [00:28:27] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [00:28:27] [PASSED] DP_REMOTE_DPCD_WRITE with port number [00:28:27] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [00:28:27] [PASSED] DP_REMOTE_DPCD_WRITE with data array [00:28:27] [PASSED] DP_REMOTE_I2C_READ with port number [00:28:27] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [00:28:27] [PASSED] DP_REMOTE_I2C_READ with transactions array [00:28:27] [PASSED] DP_REMOTE_I2C_WRITE with port number [00:28:27] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [00:28:27] [PASSED] DP_REMOTE_I2C_WRITE with data array [00:28:27] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [00:28:27] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [00:28:27] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [00:28:27] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [00:28:27] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [00:28:27] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [00:28:27] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [00:28:27] ================ [PASSED] drm_dp_mst_helper ================ [00:28:27] ================== drm_exec (7 subtests) =================== [00:28:27] [PASSED] sanitycheck [00:28:27] [PASSED] test_lock [00:28:27] [PASSED] test_lock_unlock [00:28:27] [PASSED] test_duplicates [00:28:27] [PASSED] test_prepare [00:28:27] [PASSED] test_prepare_array [00:28:27] [PASSED] test_multiple_loops [00:28:27] ==================== [PASSED] drm_exec ===================== [00:28:27] =========== drm_format_helper_test (17 subtests) =========== [00:28:27] ============== drm_test_fb_xrgb8888_to_gray8 ============== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [00:28:27] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [00:28:27] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [00:28:27] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [00:28:27] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [00:28:27] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [00:28:27] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [00:28:27] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [00:28:27] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [00:28:27] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [00:28:27] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [00:28:27] ============== drm_test_fb_xrgb8888_to_mono =============== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [00:28:27] ==================== drm_test_fb_swab ===================== [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ================ [PASSED] drm_test_fb_swab ================= [00:28:27] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [00:28:27] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [00:28:27] [PASSED] single_pixel_source_buffer [00:28:27] [PASSED] single_pixel_clip_rectangle [00:28:27] [PASSED] well_known_colors [00:28:27] [PASSED] destination_pitch [00:28:27] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [00:28:27] ================= drm_test_fb_clip_offset ================= [00:28:27] [PASSED] pass through [00:28:27] [PASSED] horizontal offset [00:28:27] [PASSED] vertical offset [00:28:27] [PASSED] horizontal and vertical offset [00:28:27] [PASSED] horizontal offset (custom pitch) [00:28:27] [PASSED] vertical offset (custom pitch) [00:28:27] [PASSED] horizontal and vertical offset (custom pitch) [00:28:27] ============= [PASSED] drm_test_fb_clip_offset ============= [00:28:27] =================== drm_test_fb_memcpy ==================== [00:28:27] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [00:28:27] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [00:28:27] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [00:28:27] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [00:28:27] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [00:28:27] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [00:28:27] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [00:28:27] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [00:28:27] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [00:28:27] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [00:28:27] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [00:28:27] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [00:28:27] =============== [PASSED] drm_test_fb_memcpy ================ [00:28:27] ============= [PASSED] drm_format_helper_test ============== [00:28:27] ================= drm_format (18 subtests) ================= [00:28:27] [PASSED] drm_test_format_block_width_invalid [00:28:27] [PASSED] drm_test_format_block_width_one_plane [00:28:27] [PASSED] drm_test_format_block_width_two_plane [00:28:27] [PASSED] drm_test_format_block_width_three_plane [00:28:27] [PASSED] drm_test_format_block_width_tiled [00:28:27] [PASSED] drm_test_format_block_height_invalid [00:28:27] [PASSED] drm_test_format_block_height_one_plane [00:28:27] [PASSED] drm_test_format_block_height_two_plane [00:28:27] [PASSED] drm_test_format_block_height_three_plane [00:28:27] [PASSED] drm_test_format_block_height_tiled [00:28:27] [PASSED] drm_test_format_min_pitch_invalid [00:28:27] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [00:28:27] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [00:28:27] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [00:28:27] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [00:28:27] [PASSED] drm_test_format_min_pitch_two_plane [00:28:27] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [00:28:27] [PASSED] drm_test_format_min_pitch_tiled [00:28:27] =================== [PASSED] drm_format ==================== [00:28:27] ============== drm_framebuffer (10 subtests) =============== [00:28:27] ========== drm_test_framebuffer_check_src_coords ========== [00:28:27] [PASSED] Success: source fits into fb [00:28:27] [PASSED] Fail: overflowing fb with x-axis coordinate [00:28:27] [PASSED] Fail: overflowing fb with y-axis coordinate [00:28:27] [PASSED] Fail: overflowing fb with source width [00:28:27] [PASSED] Fail: overflowing fb with source height [00:28:27] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [00:28:27] [PASSED] drm_test_framebuffer_cleanup [00:28:27] =============== drm_test_framebuffer_create =============== [00:28:27] [PASSED] ABGR8888 normal sizes [00:28:27] [PASSED] ABGR8888 max sizes [00:28:27] [PASSED] ABGR8888 pitch greater than min required [00:28:27] [PASSED] ABGR8888 pitch less than min required [00:28:27] [PASSED] ABGR8888 Invalid width [00:28:27] [PASSED] ABGR8888 Invalid buffer handle [00:28:27] [PASSED] No pixel format [00:28:27] [PASSED] ABGR8888 Width 0 [00:28:27] [PASSED] ABGR8888 Height 0 [00:28:27] [PASSED] ABGR8888 Out of bound height * pitch combination [00:28:27] [PASSED] ABGR8888 Large buffer offset [00:28:27] [PASSED] ABGR8888 Buffer offset for inexistent plane [00:28:27] [PASSED] ABGR8888 Invalid flag [00:28:27] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [00:28:27] [PASSED] ABGR8888 Valid buffer modifier [00:28:27] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [00:28:27] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] NV12 Normal sizes [00:28:27] [PASSED] NV12 Max sizes [00:28:27] [PASSED] NV12 Invalid pitch [00:28:27] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [00:28:27] [PASSED] NV12 different modifier per-plane [00:28:27] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [00:28:27] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] NV12 Modifier for inexistent plane [00:28:27] [PASSED] NV12 Handle for inexistent plane [00:28:27] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [00:28:27] [PASSED] YVU420 Normal sizes [00:28:27] [PASSED] YVU420 Max sizes [00:28:27] [PASSED] YVU420 Invalid pitch [00:28:27] [PASSED] YVU420 Different pitches [00:28:27] [PASSED] YVU420 Different buffer offsets/pitches [00:28:27] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [00:28:27] [PASSED] YVU420 Valid modifier [00:28:27] [PASSED] YVU420 Different modifiers per plane [00:28:27] [PASSED] YVU420 Modifier for inexistent plane [00:28:27] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [00:28:27] [PASSED] X0L2 Normal sizes [00:28:27] [PASSED] X0L2 Max sizes [00:28:27] [PASSED] X0L2 Invalid pitch [00:28:27] [PASSED] X0L2 Pitch greater than minimum required [00:28:27] [PASSED] X0L2 Handle for inexistent plane [00:28:27] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [00:28:27] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [00:28:27] [PASSED] X0L2 Valid modifier [00:28:27] [PASSED] X0L2 Modifier for inexistent plane [00:28:27] =========== [PASSED] drm_test_framebuffer_create =========== [00:28:27] [PASSED] drm_test_framebuffer_free [00:28:27] [PASSED] drm_test_framebuffer_init [00:28:27] [PASSED] drm_test_framebuffer_init_bad_format [00:28:27] [PASSED] drm_test_framebuffer_init_dev_mismatch [00:28:27] [PASSED] drm_test_framebuffer_lookup [00:28:27] [PASSED] drm_test_framebuffer_lookup_inexistent [00:28:27] [PASSED] drm_test_framebuffer_modifiers_not_supported [00:28:27] ================= [PASSED] drm_framebuffer ================= [00:28:27] ================ drm_gem_shmem (8 subtests) ================ [00:28:27] [PASSED] drm_gem_shmem_test_obj_create [00:28:27] [PASSED] drm_gem_shmem_test_obj_create_private [00:28:27] [PASSED] drm_gem_shmem_test_pin_pages [00:28:27] [PASSED] drm_gem_shmem_test_vmap [00:28:27] [PASSED] drm_gem_shmem_test_get_pages_sgt [00:28:27] [PASSED] drm_gem_shmem_test_get_sg_table [00:28:27] [PASSED] drm_gem_shmem_test_madvise [00:28:27] [PASSED] drm_gem_shmem_test_purge [00:28:27] ================== [PASSED] drm_gem_shmem ================== [00:28:27] === drm_atomic_helper_connector_hdmi_check (27 subtests) === [00:28:27] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [00:28:27] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [00:28:27] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [00:28:27] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [00:28:27] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [00:28:27] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [00:28:27] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [00:28:27] [PASSED] Automatic [00:28:27] [PASSED] Full [00:28:27] [PASSED] Limited 16:235 [00:28:27] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [00:28:27] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [00:28:27] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [00:28:27] [PASSED] drm_test_check_disable_connector [00:28:27] [PASSED] drm_test_check_hdmi_funcs_reject_rate [00:28:27] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [00:28:27] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [00:28:27] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [00:28:27] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [00:28:27] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [00:28:27] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [00:28:27] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [00:28:27] [PASSED] drm_test_check_output_bpc_dvi [00:28:27] [PASSED] drm_test_check_output_bpc_format_vic_1 [00:28:27] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [00:28:27] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [00:28:27] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [00:28:27] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [00:28:27] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [00:28:27] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [00:28:27] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [00:28:27] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [00:28:27] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [00:28:27] [PASSED] drm_test_check_broadcast_rgb_value [00:28:27] [PASSED] drm_test_check_bpc_8_value [00:28:27] [PASSED] drm_test_check_bpc_10_value [00:28:27] [PASSED] drm_test_check_bpc_12_value [00:28:27] [PASSED] drm_test_check_format_value [00:28:27] [PASSED] drm_test_check_tmds_char_value [00:28:27] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [00:28:27] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) = [00:28:27] [PASSED] drm_test_check_mode_valid [00:28:27] [PASSED] drm_test_check_mode_valid_reject [00:28:27] [PASSED] drm_test_check_mode_valid_reject_rate [00:28:27] [PASSED] drm_test_check_mode_valid_reject_max_clock [00:28:27] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [00:28:27] ================= drm_managed (2 subtests) ================= [00:28:27] [PASSED] drm_test_managed_release_action [00:28:27] [PASSED] drm_test_managed_run_action [00:28:27] =================== [PASSED] drm_managed =================== [00:28:27] =================== drm_mm (6 subtests) ==================== [00:28:27] [PASSED] drm_test_mm_init [00:28:27] [PASSED] drm_test_mm_debug [00:28:27] [PASSED] drm_test_mm_align32 [00:28:27] [PASSED] drm_test_mm_align64 [00:28:27] [PASSED] drm_test_mm_lowest [00:28:27] [PASSED] drm_test_mm_highest [00:28:27] ===================== [PASSED] drm_mm ====================== [00:28:27] ============= drm_modes_analog_tv (5 subtests) ============= [00:28:27] [PASSED] drm_test_modes_analog_tv_mono_576i [00:28:27] [PASSED] drm_test_modes_analog_tv_ntsc_480i [00:28:27] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [00:28:27] [PASSED] drm_test_modes_analog_tv_pal_576i [00:28:27] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [00:28:27] =============== [PASSED] drm_modes_analog_tv =============== [00:28:27] ============== drm_plane_helper (2 subtests) =============== [00:28:27] =============== drm_test_check_plane_state ================ [00:28:27] [PASSED] clipping_simple [00:28:27] [PASSED] clipping_rotate_reflect [00:28:27] [PASSED] positioning_simple [00:28:27] [PASSED] upscaling [00:28:27] [PASSED] downscaling [00:28:27] [PASSED] rounding1 [00:28:27] [PASSED] rounding2 [00:28:27] [PASSED] rounding3 [00:28:27] [PASSED] rounding4 [00:28:27] =========== [PASSED] drm_test_check_plane_state ============ [00:28:27] =========== drm_test_check_invalid_plane_state ============ [00:28:27] [PASSED] positioning_invalid [00:28:27] [PASSED] upscaling_invalid [00:28:27] [PASSED] downscaling_invalid [00:28:27] ======= [PASSED] drm_test_check_invalid_plane_state ======== [00:28:27] ================ [PASSED] drm_plane_helper ================= [00:28:27] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [00:28:27] ====== drm_test_connector_helper_tv_get_modes_check ======= [00:28:27] [PASSED] None [00:28:27] [PASSED] PAL [00:28:27] [PASSED] NTSC [00:28:27] [PASSED] Both, NTSC Default [00:28:27] [PASSED] Both, PAL Default [00:28:27] [PASSED] Both, NTSC Default, with PAL on command-line [00:28:27] [PASSED] Both, PAL Default, with NTSC on command-line [00:28:27] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [00:28:27] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [00:28:27] ================== drm_rect (9 subtests) =================== [00:28:27] [PASSED] drm_test_rect_clip_scaled_div_by_zero [00:28:27] [PASSED] drm_test_rect_clip_scaled_not_clipped [00:28:27] [PASSED] drm_test_rect_clip_scaled_clipped [00:28:27] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [00:28:27] ================= drm_test_rect_intersect ================= [00:28:27] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [00:28:27] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [00:28:27] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [00:28:27] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [00:28:27] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [00:28:27] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [00:28:27] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [00:28:27] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [00:28:27] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [00:28:27] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [00:28:27] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [00:28:27] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [00:28:27] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [00:28:27] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [00:28:27] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [00:28:27] ============= [PASSED] drm_test_rect_intersect ============= [00:28:27] ================ drm_test_rect_calc_hscale ================ [00:28:27] [PASSED] normal use [00:28:27] [PASSED] out of max range [00:28:27] [PASSED] out of min range [00:28:27] [PASSED] zero dst [00:28:27] [PASSED] negative src [00:28:27] [PASSED] negative dst [00:28:27] ============ [PASSED] drm_test_rect_calc_hscale ============ [00:28:27] ================ drm_test_rect_calc_vscale ================ [00:28:27] [PASSED] normal use [00:28:27] [PASSED] out of max range [00:28:27] [PASSED] out of min range [00:28:27] [PASSED] zero dst [00:28:27] [PASSED] negative src [00:28:27] [PASSED] negative dst [00:28:27] ============ [PASSED] drm_test_rect_calc_vscale ============ [00:28:27] ================== drm_test_rect_rotate =================== [00:28:27] [PASSED] reflect-x [00:28:27] [PASSED] reflect-y [00:28:27] [PASSED] rotate-0 [00:28:27] [PASSED] rotate-90 [00:28:27] [PASSED] rotate-180 [00:28:27] [PASSED] rotate-270 stty: 'standard input': Inappropriate ioctl for device [00:28:27] ============== [PASSED] drm_test_rect_rotate =============== [00:28:27] ================ drm_test_rect_rotate_inv ================= [00:28:27] [PASSED] reflect-x [00:28:27] [PASSED] reflect-y [00:28:27] [PASSED] rotate-0 [00:28:27] [PASSED] rotate-90 [00:28:27] [PASSED] rotate-180 [00:28:27] [PASSED] rotate-270 [00:28:27] ============ [PASSED] drm_test_rect_rotate_inv ============= [00:28:27] ==================== [PASSED] drm_rect ===================== [00:28:27] ============ drm_sysfb_modeset_test (1 subtest) ============ [00:28:27] ============ drm_test_sysfb_build_fourcc_list ============= [00:28:27] [PASSED] no native formats [00:28:27] [PASSED] XRGB8888 as native format [00:28:27] [PASSED] remove duplicates [00:28:27] [PASSED] convert alpha formats [00:28:27] [PASSED] random formats [00:28:27] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [00:28:27] ============= [PASSED] drm_sysfb_modeset_test ============== [00:28:27] ============================================================ [00:28:27] Testing complete. Ran 616 tests: passed: 616 [00:28:27] Elapsed time: 28.095s total, 1.616s configuring, 26.259s building, 0.187s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [00:28:27] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [00:28:29] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25 [00:28:37] Starting KUnit Kernel (1/1)... [00:28:37] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [00:28:37] ================= ttm_device (5 subtests) ================== [00:28:37] [PASSED] ttm_device_init_basic [00:28:37] [PASSED] ttm_device_init_multiple [00:28:37] [PASSED] ttm_device_fini_basic [00:28:37] [PASSED] ttm_device_init_no_vma_man [00:28:37] ================== ttm_device_init_pools ================== [00:28:37] [PASSED] No DMA allocations, no DMA32 required [00:28:37] [PASSED] DMA allocations, DMA32 required [00:28:37] [PASSED] No DMA allocations, DMA32 required [00:28:37] [PASSED] DMA allocations, no DMA32 required [00:28:37] ============== [PASSED] ttm_device_init_pools ============== [00:28:37] =================== [PASSED] ttm_device ==================== [00:28:37] ================== ttm_pool (8 subtests) =================== [00:28:37] ================== ttm_pool_alloc_basic =================== [00:28:37] [PASSED] One page [00:28:37] [PASSED] More than one page [00:28:37] [PASSED] Above the allocation limit [00:28:37] [PASSED] One page, with coherent DMA mappings enabled [00:28:37] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [00:28:37] ============== [PASSED] ttm_pool_alloc_basic =============== [00:28:37] ============== ttm_pool_alloc_basic_dma_addr ============== [00:28:37] [PASSED] One page [00:28:37] [PASSED] More than one page [00:28:37] [PASSED] Above the allocation limit [00:28:37] [PASSED] One page, with coherent DMA mappings enabled [00:28:37] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [00:28:37] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [00:28:37] [PASSED] ttm_pool_alloc_order_caching_match [00:28:37] [PASSED] ttm_pool_alloc_caching_mismatch [00:28:37] [PASSED] ttm_pool_alloc_order_mismatch [00:28:37] [PASSED] ttm_pool_free_dma_alloc [00:28:37] [PASSED] ttm_pool_free_no_dma_alloc [00:28:37] [PASSED] ttm_pool_fini_basic [00:28:37] ==================== [PASSED] ttm_pool ===================== [00:28:37] ================ ttm_resource (8 subtests) ================= [00:28:37] ================= ttm_resource_init_basic ================= [00:28:37] [PASSED] Init resource in TTM_PL_SYSTEM [00:28:37] [PASSED] Init resource in TTM_PL_VRAM [00:28:37] [PASSED] Init resource in a private placement [00:28:37] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [00:28:37] ============= [PASSED] ttm_resource_init_basic ============= [00:28:37] [PASSED] ttm_resource_init_pinned [00:28:37] [PASSED] ttm_resource_fini_basic [00:28:37] [PASSED] ttm_resource_manager_init_basic [00:28:37] [PASSED] ttm_resource_manager_usage_basic [00:28:37] [PASSED] ttm_resource_manager_set_used_basic [00:28:37] [PASSED] ttm_sys_man_alloc_basic [00:28:37] [PASSED] ttm_sys_man_free_basic [00:28:37] ================== [PASSED] ttm_resource =================== [00:28:37] =================== ttm_tt (15 subtests) =================== [00:28:37] ==================== ttm_tt_init_basic ==================== [00:28:37] [PASSED] Page-aligned size [00:28:37] [PASSED] Extra pages requested [00:28:37] ================ [PASSED] ttm_tt_init_basic ================ [00:28:37] [PASSED] ttm_tt_init_misaligned [00:28:37] [PASSED] ttm_tt_fini_basic [00:28:37] [PASSED] ttm_tt_fini_sg [00:28:37] [PASSED] ttm_tt_fini_shmem [00:28:37] [PASSED] ttm_tt_create_basic [00:28:37] [PASSED] ttm_tt_create_invalid_bo_type [00:28:37] [PASSED] ttm_tt_create_ttm_exists [00:28:37] [PASSED] ttm_tt_create_failed [00:28:37] [PASSED] ttm_tt_destroy_basic [00:28:37] [PASSED] ttm_tt_populate_null_ttm [00:28:37] [PASSED] ttm_tt_populate_populated_ttm [00:28:37] [PASSED] ttm_tt_unpopulate_basic [00:28:37] [PASSED] ttm_tt_unpopulate_empty_ttm [00:28:37] [PASSED] ttm_tt_swapin_basic [00:28:37] ===================== [PASSED] ttm_tt ====================== [00:28:37] =================== ttm_bo (14 subtests) =================== [00:28:37] =========== ttm_bo_reserve_optimistic_no_ticket =========== [00:28:37] [PASSED] Cannot be interrupted and sleeps [00:28:37] [PASSED] Cannot be interrupted, locks straight away [00:28:37] [PASSED] Can be interrupted, sleeps [00:28:37] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [00:28:37] [PASSED] ttm_bo_reserve_locked_no_sleep [00:28:37] [PASSED] ttm_bo_reserve_no_wait_ticket [00:28:37] [PASSED] ttm_bo_reserve_double_resv [00:28:37] [PASSED] ttm_bo_reserve_interrupted [00:28:37] [PASSED] ttm_bo_reserve_deadlock [00:28:37] [PASSED] ttm_bo_unreserve_basic [00:28:37] [PASSED] ttm_bo_unreserve_pinned [00:28:37] [PASSED] ttm_bo_unreserve_bulk [00:28:37] [PASSED] ttm_bo_put_basic [00:28:37] [PASSED] ttm_bo_put_shared_resv [00:28:37] [PASSED] ttm_bo_pin_basic [00:28:37] [PASSED] ttm_bo_pin_unpin_resource [00:28:37] [PASSED] ttm_bo_multiple_pin_one_unpin [00:28:37] ===================== [PASSED] ttm_bo ====================== [00:28:37] ============== ttm_bo_validate (21 subtests) =============== [00:28:37] ============== ttm_bo_init_reserved_sys_man =============== [00:28:37] [PASSED] Buffer object for userspace [00:28:37] [PASSED] Kernel buffer object [00:28:37] [PASSED] Shared buffer object [00:28:37] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [00:28:37] ============== ttm_bo_init_reserved_mock_man ============== [00:28:37] [PASSED] Buffer object for userspace [00:28:37] [PASSED] Kernel buffer object [00:28:37] [PASSED] Shared buffer object [00:28:37] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [00:28:37] [PASSED] ttm_bo_init_reserved_resv [00:28:37] ================== ttm_bo_validate_basic ================== [00:28:37] [PASSED] Buffer object for userspace [00:28:37] [PASSED] Kernel buffer object [00:28:37] [PASSED] Shared buffer object [00:28:37] ============== [PASSED] ttm_bo_validate_basic ============== [00:28:37] [PASSED] ttm_bo_validate_invalid_placement [00:28:37] ============= ttm_bo_validate_same_placement ============== [00:28:37] [PASSED] System manager [00:28:37] [PASSED] VRAM manager [00:28:37] ========= [PASSED] ttm_bo_validate_same_placement ========== [00:28:37] [PASSED] ttm_bo_validate_failed_alloc [00:28:37] [PASSED] ttm_bo_validate_pinned [00:28:37] [PASSED] ttm_bo_validate_busy_placement [00:28:37] ================ ttm_bo_validate_multihop ================= [00:28:37] [PASSED] Buffer object for userspace [00:28:37] [PASSED] Kernel buffer object [00:28:37] [PASSED] Shared buffer object [00:28:37] ============ [PASSED] ttm_bo_validate_multihop ============= [00:28:37] ========== ttm_bo_validate_no_placement_signaled ========== [00:28:37] [PASSED] Buffer object in system domain, no page vector [00:28:37] [PASSED] Buffer object in system domain with an existing page vector [00:28:37] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [00:28:37] ======== ttm_bo_validate_no_placement_not_signaled ======== [00:28:37] [PASSED] Buffer object for userspace [00:28:37] [PASSED] Kernel buffer object [00:28:37] [PASSED] Shared buffer object [00:28:37] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [00:28:37] [PASSED] ttm_bo_validate_move_fence_signaled [00:28:37] ========= ttm_bo_validate_move_fence_not_signaled ========= [00:28:37] [PASSED] Waits for GPU [00:28:37] [PASSED] Tries to lock straight away [00:28:37] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [00:28:37] [PASSED] ttm_bo_validate_happy_evict [00:28:37] [PASSED] ttm_bo_validate_all_pinned_evict [00:28:37] [PASSED] ttm_bo_validate_allowed_only_evict [00:28:37] [PASSED] ttm_bo_validate_deleted_evict [00:28:37] [PASSED] ttm_bo_validate_busy_domain_evict [00:28:37] [PASSED] ttm_bo_validate_evict_gutting [00:28:37] [PASSED] ttm_bo_validate_recrusive_evict stty: 'standard input': Inappropriate ioctl for device [00:28:37] ================= [PASSED] ttm_bo_validate ================= [00:28:37] ============================================================ [00:28:37] Testing complete. Ran 101 tests: passed: 101 [00:28:37] Elapsed time: 9.732s total, 1.608s configuring, 7.857s building, 0.231s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✓ Xe.CI.BAT: success for Add test for G2G communications
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Add test for G2G communications
URL : https://patchwork.freedesktop.org/series/152101/
State : success
== Summary ==
CI Bug Log - changes from xe-3472-e4a00177f7a294b0e63959774b9ad3e5363cbd12_BAT -> xe-pw-152101v1_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (9 -> 8)
------------------------------
Missing (1): bat-adlp-vm
Known issues
------------
Here are the changes found in xe-pw-152101v1_BAT that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@kms_flip@basic-plain-flip@b-edp1:
- bat-adlp-7: [DMESG-WARN][1] ([Intel XE#4543]) -> [PASS][2] +1 other test pass
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3472-e4a00177f7a294b0e63959774b9ad3e5363cbd12/bat-adlp-7/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-152101v1/bat-adlp-7/igt@kms_flip@[email protected]
[Intel XE#4543]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4543
Build changes
-------------
* Linux: xe-3472-e4a00177f7a294b0e63959774b9ad3e5363cbd12 -> xe-pw-152101v1
IGT_8476: 232d4de46aa5ec03aee240657c0b36110f8a6246 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-3472-e4a00177f7a294b0e63959774b9ad3e5363cbd12: e4a00177f7a294b0e63959774b9ad3e5363cbd12
xe-pw-152101v1: 152101v1
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-152101v1/index.html