Introducing firmware late binding
Subsystems (6)
v4 cover Introducing firmware late binding
Introducing firmware late binding feature to enable firmware loading for the devices, such as the fan controller and voltage regulator, during the driver probe.
Typically, firmware for these devices are part of IFWI flash image but can be replaced at probe after OEM tuning.
v2:
- Dropped voltage regulator specific code as binaries for it will not be available for upstreaming as of now.
- Address review comments
v3:
- Dropped fwctl patch for now
- Added new patch to extract binary version
- Address v2 review comments
v4:
- Address v3 review comments
Alexander Usyskin (2):
mei: bus: add mei_cldev_mtu interface
mei: late_bind: add late binding component driver
Badal Nilawar (8):
drm/xe/xe_late_bind_fw: Introducing xe_late_bind_fw drm/xe/xe_late_bind_fw: Initialize late binding firmware drm/xe/xe_late_bind_fw: Load late binding firmware drm/xe/xe_late_bind_fw: Reload late binding fw in rpm resume drm/xe/xe_late_bind_fw: Reload late binding fw during system resume drm/xe/xe_late_bind_fw: Introduce debug fs node to disable late
binding
drm/xe/xe_late_bind_fw: Extract and print version info drm/xe/xe_late_bind_fw: Select INTEL_MEI_LATE_BIND for CI
drivers/gpu/drm/xe/Kconfig | 1 + drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_debugfs.c | 41 ++ drivers/gpu/drm/xe/xe_device.c | 5 + drivers/gpu/drm/xe/xe_device_types.h | 6 + drivers/gpu/drm/xe/xe_late_bind_fw.c | 465 ++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw.h | 17 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 81 ++++ drivers/gpu/drm/xe/xe_pci.c | 3 + drivers/gpu/drm/xe/xe_pm.c | 10 + drivers/gpu/drm/xe/xe_uc_fw_abi.h | 66 +++ drivers/misc/mei/Kconfig | 1 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/bus.c | 13 + drivers/misc/mei/late_bind/Kconfig | 13 + drivers/misc/mei/late_bind/Makefile | 9 + drivers/misc/mei/late_bind/mei_late_bind.c | 281 ++++++++++++ include/drm/intel/i915_component.h | 1 + include/drm/intel/late_bind_mei_interface.h | 64 +++ include/linux/mei_cl_bus.h | 1 + 20 files changed, 1080 insertions(+) create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw.c create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw.h create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw_types.h create mode 100644 drivers/misc/mei/late_bind/Kconfig create mode 100644 drivers/misc/mei/late_bind/Makefile create mode 100644 drivers/misc/mei/late_bind/mei_late_bind.c create mode 100644 include/drm/intel/late_bind_mei_interface.h
Signature · 1 line
2.34.1
PATCH v4 1/10 mei: bus: add mei_cldev_mtu interface
From: Alexander Usyskin <[email protected]>
Allow to bus client to obtain client mtu.
--- drivers/misc/mei/bus.c | 13 +++++++++++++ include/linux/mei_cl_bus.h | 1 + 2 files changed, 14 insertions(+)
drivers/misc/mei/bus.c +13 -0
@@ -614,6 +614,19 @@ u8 mei_cldev_ver(const struct mei_cl_device *cldev) }EXPORT_SYMBOL_GPL (mei_cldev_ver); +/** +* mei_cldev_mtu - max message that client can send and receive +* +* @cldev: mei client device +* +* Return: mtu or 0 if client is not connected +*/ +size_t mei_cldev_mtu (const struct mei_cl_device *cldev) +{ +return mei_cl_mtu (cldev->cl); +} +EXPORT_SYMBOL_GPL (mei_cldev_mtu); +/** * mei_cldev_enabled - check whether the device is enabled *
include/linux/mei_cl_bus.h +1 -0
@@ -113,6 +113,7 @@ int mei_cldev_register_notif_cb(struct mei_cl_device *cldev, mei_cldev_cb_t notif_cb);u8 mei_cldev_ver (const struct mei_cl_device *cldev); +size_t mei_cldev_mtu (const struct mei_cl_device *cldev);void *mei_cldev_get_drvdata (const struct mei_cl_device *cldev);void mei_cldev_set_drvdata (struct mei_cl_device *cldev,void *data);
Signature · 1 line
2.34.1
PATCH v4 2/10 mei: late_bind: add late binding component driver
In reply to Badal NilawarFrom: Alexander Usyskin <[email protected]>
Add late binding component driver.
It allows pushing the late binding configuration from, for example, the Xe graphics driver to the Intel discrete graphics card's CSE device.
---
v2:
- Use generic naming (Jani)
- Drop xe_late_bind_component struct to move to xe code (Daniele/Sasha)
v3:
- Updated kconfig description
- Move CSC late binding specific flags/defines to late_bind_mei_interface.h (Daniele)
v4:
- Add match for PCI_CLASS_DISPLAY_OTHER to support headless cards (Anshuman)
v5:
- Add fixes in push_config (Sasha)
- Use INTEL_ prefix for component, refine doc,
add status enum to headerlate_bind_mei_interface.h (Anshuman)
--- drivers/misc/mei/Kconfig | 1 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/late_bind/Kconfig | 13 + drivers/misc/mei/late_bind/Makefile | 9 + drivers/misc/mei/late_bind/mei_late_bind.c | 281 ++++++++++++++++++++ include/drm/intel/i915_component.h | 1 + include/drm/intel/late_bind_mei_interface.h | 64 +++++ 7 files changed, 370 insertions(+) create mode 100644 drivers/misc/mei/late_bind/Kconfig create mode 100644 drivers/misc/mei/late_bind/Makefile create mode 100644 drivers/misc/mei/late_bind/mei_late_bind.c create mode 100644 include/drm/intel/late_bind_mei_interface.h
drivers/misc/mei/Kconfig +1 -0
@@ -84,5 +84,6 @@ config INTEL_MEI_VSC source "drivers/misc/mei/hdcp/Kconfig" source "drivers/misc/mei/pxp/Kconfig" source "drivers/misc/mei/gsc_proxy/Kconfig" +source "drivers/misc/mei/late_bind/Kconfig" endif
drivers/misc/mei/Makefile +1 -0
@@ -31,6 +31,7 @@ CFLAGS_mei-trace.o = -I$(src) obj-$(CONFIG_INTEL_MEI_HDCP) += hdcp/ obj-$(CONFIG_INTEL_MEI_PXP) += pxp/ obj-$(CONFIG_INTEL_MEI_GSC_PROXY) += gsc_proxy/ +obj-$(CONFIG_INTEL_MEI_LATE_BIND) += late_bind/ obj-$(CONFIG_INTEL_MEI_VSC_HW) += mei-vsc-hw.o mei-vsc-hw-y := vsc-tp.o
drivers/misc/mei/late_bind/Kconfig new file +13 -0
@@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# +config INTEL_MEI_LATE_BIND + tristate "Intel late binding support on ME Interface" + select INTEL_MEI_ME + depends on DRM_XE + help + MEI Support for Late Binding for Intel graphics card. + + Enables the ME FW interfaces for Late Binding feature, + allowing loading of firmware for the devices like Fan + Controller during by Intel Xe driver.
drivers/misc/mei/late_bind/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# +# Makefile - Late Binding client driver for Intel MEI Bus Driver. + +subdir-ccflags-y += -I$(srctree)/drivers/misc/mei/ + +obj-$(CONFIG_INTEL_MEI_LATE_BIND) += mei_late_bind.o
drivers/misc/mei/late_bind/mei_late_bind.c new file +281 -0
281 lines not on this page · raw message
include/drm/intel/i915_component.h +1 -0
@@ -31,6 +31,7 @@ enum i915_component_type {I915_COMPONENT_HDCP ,I915_COMPONENT_PXP ,I915_COMPONENT_GSC_PROXY , + INTEL_COMPONENT_LATE_BIND, };/* MAX_PORT is the number of port
include/drm/intel/late_bind_mei_interface.h new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
2.34.1
RE: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 300 lines
-----Original Message-----
From: Nilawar, Badal <[email protected]>
Sent: Wednesday, June 25, 2025 10:30 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: Gupta, Anshuman <[email protected]>; Vivi, Rodrigo <[email protected]>; Usyskin, Alexander <[email protected]>; [email protected]; Ceraolo Spurio, Daniele <[email protected]>
Subject: [PATCH v4 02/10] mei:late_bind: add late binding component driverFrom: Alexander Usyskin <[email protected]>
Add late binding component driver.
It allows pushing the late binding configuration from, for example, the Xe graphics driver to the Intel discrete graphics card's CSE device.Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Badal Nilawar <[email protected]>---
v2:
- Use generic naming (Jani)
- Dropxe_late_bind_componentstruct to move to xe code (Daniele/Sasha)
v3:
- Updated kconfig description
- Move CSC late binding specific flags/defines tolate_bind_mei_interface.h
(Daniele)
v4:
- Add match forPCI_CLASS_DISPLAY_OTHERto support headless cards
(Anshuman)
v5:
- Add fixes inpush_config(Sasha)
- UseINTEL_prefix for component, refine doc,
add status enum toheaderlate_bind_mei_interface.h(Anshuman)--- drivers/misc/mei/Kconfig | 1 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/late_bind/Kconfig | 13 + drivers/misc/mei/late_bind/Makefile | 9 + drivers/misc/mei/late_bind/mei_late_bind.c | 281 ++++++++++++++++++++ include/drm/intel/i915_component.h | 1 + include/drm/intel/late_bind_mei_interface.h | 64 +++++ 7 files changed, 370 insertions(+) create mode 100644 drivers/misc/mei/late_bind/Kconfig create mode 100644 drivers/misc/mei/late_bind/Makefile create mode 100644 drivers/misc/mei/late_bind/mei_late_bind.c create mode 100644 include/drm/intel/late_bind_mei_interface.hdrivers/misc/mei/Kconfig index renamed from drivers/misc/mei/Kconfig +0
-0
7575fee96cc6..771becc68095100644drivers/misc/mei/Kconfig +1
-0@@ -84,5 +84,6 @@ config INTEL_MEI_VSC source "drivers/misc/mei/hdcp/Kconfig" source "drivers/misc/mei/pxp/Kconfig" source "drivers/misc/mei/gsc_proxy/Kconfig" +source "drivers/misc/mei/late_bind/Kconfig" endifdrivers/misc/mei/Makefile index renamed from drivers/misc/mei/Makefile +0
-0
6f9fdbf1a495..84bfde888d81100644drivers/misc/mei/Makefile +1
-0@@ -31,6 +31,7 @@ CFLAGS_mei-trace.o = -I$(src) obj-$(CONFIG_INTEL_MEI_HDCP) += hdcp/ obj-$(CONFIG_INTEL_MEI_PXP) += pxp/ obj-$(CONFIG_INTEL_MEI_GSC_PROXY) += gsc_proxy/ +obj-$(CONFIG_INTEL_MEI_LATE_BIND) += late_bind/ obj-$(CONFIG_INTEL_MEI_VSC_HW) += mei-vsc-hw.o mei-vsc-hw-y := vsc-tp.o diff --git a/drivers/misc/mei/late_bind/Kconfig b/drivers/misc/mei/late_bind/Kconfig
new file mode 100644
index 000000000000..65c7180c5678drivers/misc/mei/late_bind/Kconfig new file +13
-0@@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# +config INTEL_MEI_LATE_BIND + tristate "Intel late binding support on ME Interface" + select INTEL_MEI_ME + depends on DRM_XE + help + MEI Support for Late Binding for Intel graphics card. + + Enables the ME FW interfaces for Late Binding feature, + allowing loading of firmware for the devices like Fan + Controller during by Intel Xe driver.drivers/misc/mei/late_bind/Makefile new file +9
-0@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# +# Makefile - Late Binding client driver for Intel MEI Bus Driver. + +subdir-ccflags-y += -I$(srctree)/drivers/misc/mei/ + +obj-$(CONFIG_INTEL_MEI_LATE_BIND) += mei_late_bind.odrivers/misc/mei/late_bind/mei_late_bind.c new file +17
-0@@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2025 Intel Corporation */ #include +<drm/intel/i915_component.h> #include +<drm/intel/late_bind_mei_interface.h> +#include <linux/component.h> +#include <linux/pci.h> +#include <linux/mei_cl_bus.h> +#include <linux/module.h> +#include <linux/overflow.h> +#include <linux/slab.h> +#include <linux/uuid.h> + +#include "mkhi.h" + +#define GFX_SRV_MKHI_LATE_BINDING_CMD 0x12 #define +GFX_SRV_MKHI_LATE_BINDING_RSP (GFX_SRV_MKHI_LATE_BINDING_CMD|
0x80)drivers/misc/mei/late_bind/mei_late_bind.c new file +44
-0+ +#define LATE_BIND_SEND_TIMEOUT_MSEC 3000 #define +LATE_BIND_RECV_TIMEOUT_MSEC 3000 + +/** +* struct csc_heci_late_bind_req - late binding request +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @flags: flags to be passed to the firmware +* @reserved: reserved field +* @payload_size: size of the payload data in bytes +* @payload: data to be sent to the firmware */ struct +csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags; +u32 reserved[2 ]; +u32 payload_size; + u8 payload[] __counted_by(payload_size); } __packed; + +/** +* struct csc_heci_late_bind_rsp - late binding response +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @reserved: reserved field +* @status: status of the late binding command execution by firmware +*/ struct csc_heci_late_bind_rsp { +struct mkhi_msg_hdr header; +u32 type; +u32 reserved[2 ]; +u32 status; +} __packed; + +static int mei_late_bind_check_response (const struct device *dev,const +struct mkhi_msg_hdr *hdr) { +if (hdr->group_id !=MKHI_GROUP_ID_GFX ) { +dev_err (dev,"Mismatch group id: 0x%x instead of 0x%x\n" , + hdr->group_id,MKHI_GROUP_ID_GFX ); +return -EINVAL ; + } + +if (hdr->command !=GFX_SRV_MKHI_LATE_BINDING_RSP ) { + dev_err(dev, "Mismatch command: 0x%x instead of 0x%x\n", + hdr->command,
GFX_SRV_MKHI_LATE_BINDING_RSP);drivers/misc/mei/late_bind/mei_late_bind.c new file +64
-0+return -EINVAL ; + } + +if (hdr->result) { +dev_err (dev,"Error in result: 0x%x\n" , hdr->result); +return -EINVAL ; + } + +return 0 ; +} + +/** +* mei_late_bind_push_config - Sends a config to the firmware. +* @dev: device struct corresponding to the mei device +* @type: payload type +* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +static int mei_late_bind_push_config (struct device *dev,u32 type,u32 flags, +const void *payload,size_t payload_size) { +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp; +size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ; + + cldev =to_mei_cl_device (dev); + + ret =mei_cldev_enable (cldev); +if (ret <0 ) { +dev_dbg (dev,"mei_cldev_enable failed. %zd\n" , ret); +return ret; + } + + req_size =struct_size (req, payload, payload_size); +if (req_size >mei_cldev_mtu (cldev)) { +dev_err (dev,"Payload is too big %zu\n" , payload_size); + ret = -EMSGSIZE ; + goto end; + } + + req =kmalloc (req_size,GFP_KERNEL ); +if (!req) { + ret = -ENOMEM ; + goto end; + } + + req->header.group_id =MKHI_GROUP_ID_GFX ; + req->header.command =GFX_SRV_MKHI_LATE_BINDING_CMD ; + req->type = type; + req->flags = flags; + req->reserved[0 ] =0 ; + req->reserved[1 ] =0 ; + req->payload_size = payload_size; +memcpy (req->payload, payload, payload_size); + + ret = mei_cldev_send_timeout(cldev, (void *)req, req_size,
LATE_BIND_SEND_TIMEOUT_MSEC);drivers/misc/mei/late_bind/mei_late_bind.c new file +6
-0+if (ret <0 ) { +dev_err (dev,"mei_cldev_send failed. %zd\n" , ret); + goto end; + } + + ret = mei_cldev_recv_timeout(cldev, (void *)&rsp, sizeof(rsp),
LATE_BIND_RECV_TIMEOUT_MSEC);drivers/misc/mei/late_bind/mei_late_bind.c new file +6
-0+if (ret <0 ) { +dev_err (dev,"mei_cldev_recv failed. %zd\n" , ret); + goto end; + } +if (ret <sizeof (rsp.header)) { + dev_err(dev, "bad response header from the firmware: size%zd < %zu\n",
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+ ret, sizeof(rsp.header)); + goto end; + } +if (ret <sizeof (rsp)) { + dev_err(dev, "bad response from the firmware: size %zd <%zu\n",
drivers/misc/mei/late_bind/mei_late_bind.c new file +7
-0+ ret, sizeof(rsp)); + goto end; + } + + ret =mei_late_bind_check_response (dev, &rsp.header); +if (ret) { + dev_err(dev, "bad result response from the firmware:0x%x\n",
drivers/misc/mei/late_bind/mei_late_bind.c new file +29
-0+ *(uint32_t *)&rsp.header); + goto end; + } + + ret = (int )rsp.status; +dev_dbg (dev,"%s status = %zd\n" , __func__, ret); + +end: +mei_cldev_disable (cldev); +kfree (req); +return ret; +} + +static const struct late_bind_component_ops mei_late_bind_ops = { + .owner =THIS_MODULE , + .push_config = mei_late_bind_push_config, }; + +static int mei_component_master_bind (struct device *dev) { +return component_bind_all (dev, (void *)&mei_late_bind_ops); } + +static void mei_component_master_unbind (struct device *dev) { +component_unbind_all (dev, (void *)&mei_late_bind_ops); } + +static const struct component_master_ops mei_component_master_ops = { + .bind = mei_component_master_bind, + .unbind = mei_component_master_unbind, }; + +/** +* mei_late_bind_component_match - compare function for matching mei
Quoted 4 lines
late bind.
+ *
+ * The function checks if requester is IntelPCI_CLASS_DISPLAY_VGAor
+ *PCI_CLASS_DISPLAY_OTHERdevice, and checks if the parent of requester
DOC is still wrong dev is requester here, you are checking base == dev. With fixing of that.
Thanks,
Anshuman
Quoted 172 lines
+ * and the grand parent of
mei_ifare the same device
+ *
+ * @dev: master device
+ * @subcomponent: subcomponent to match (INTEL_COMPONENT_LATE_BIND)
+ * @data: compare data (late_bindmei device on mei bus)
+ *
+ * Return:
+ * * 1 - if components match
+ * * 0 - otherwise
+ */
+static int mei_late_bind_component_match(struct device *dev, int subcomponent,drivers/misc/mei/late_bind/mei_late_bind.c new file +39
-0+ void *data) +{ +struct device *base = data; +struct pci_dev *pdev; + +if (!dev) +return 0 ; + +if (!dev_is_pci (dev)) +return 0 ; + + pdev =to_pci_dev (dev); + +if (pdev->vendor !=PCI_VENDOR_ID_INTEL ) +return 0 ; + +if (pdev->class != (PCI_CLASS_DISPLAY_VGA <<8 ) && + pdev->class != (PCI_CLASS_DISPLAY_OTHER <<8 )) +return 0 ; + +if (subcomponent !=INTEL_COMPONENT_LATE_BIND ) +return 0 ; + + base = base->parent; +if (!base)/* mei device */ +return 0 ; + + base = base->parent;/* pci device */ + +return !!base && dev == base; +} + +static int mei_late_bind_probe (struct mei_cl_device *cldev, +const struct mei_cl_device_id *id) { +struct component_match *master_match =NULL ; +int ret; + + component_match_add_typed(&cldev->dev, &master_match, + mei_late_bind_component_match, &cldev-Quoted 1 line
dev);
drivers/misc/mei/late_bind/mei_late_bind.c new file +14
-0+if (IS_ERR_OR_NULL (master_match)) +return -ENOMEM ; + + ret =component_master_add_with_match (&cldev->dev, + &mei_component_master_ops, + master_match); +if (ret <0 ) +dev_err (&cldev->dev,"Master comp add failed %d\n" , ret); + +return ret; +} + +static void mei_late_bind_remove (struct mei_cl_device *cldev) { + component_master_del(&cldev->dev,
&mei_component_master_ops); }drivers/misc/mei/late_bind/mei_late_bind.c new file +22
-0+ +#define MEI_GUID_MKHI UUID_LE(0xe2c2afa2, 0x3817, 0x4d19, \ + 0x9d, 0x95, 0x6, 0xb1, 0x6b, 0x58, 0x8a, 0x5d) + +static struct mei_cl_device_id mei_late_bind_tbl[] = { + { .uuid =MEI_GUID_MKHI , .version =MEI_CL_VERSION_ANY }, + { } +}; +MODULE_DEVICE_TABLE (mei, mei_late_bind_tbl); + +static struct mei_cl_driver mei_late_bind_driver = { + .id_table = mei_late_bind_tbl, + .name =KBUILD_MODNAME , + .probe = mei_late_bind_probe, + .remove = mei_late_bind_remove, +}; + +module_mei_cl_driver (mei_late_bind_driver); + +MODULE_AUTHOR ("Intel Corporation" ); +MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("MEI Late Binding" );include/drm/intel/i915_component.h +1
-0@@ -31,6 +31,7 @@ enum i915_component_type {I915_COMPONENT_HDCP ,I915_COMPONENT_PXP ,I915_COMPONENT_GSC_PROXY , + INTEL_COMPONENT_LATE_BIND, };/* MAX_PORT is the number of port include/drm/intel/late_bind_mei_interface.h new file +60
-1@@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright (c) 2025 Intel Corporation */ + +#ifndef _LATE_BIND_MEI_INTERFACE_H_ +#define _LATE_BIND_MEI_INTERFACE_H_ + +#include <linux/types.h> + +struct device ; +struct module ; + +/** +* Late Binding flags +* Persistent across warm reset +*/ +#define CSC_LATE_BINDING_FLAGS_IS_PERSISTENT BIT(0) + +/** +* xe_late_bind_fw_type - enum to determine late binding fw type */ +enum late_bind_type { +CSC_LATE_BINDING_TYPE_FAN_CONTROL =1 , }; + +/** +* Late Binding payload status +*/ +enum csc_late_binding_status { +CSC_LATE_BINDING_STATUS_SUCCESS =0 , +CSC_LATE_BINDING_STATUS_4ID_MISMATCH =1 , +CSC_LATE_BINDING_STATUS_ARB_FAILURE =2 , +CSC_LATE_BINDING_STATUS_GENERAL_ERROR =3 , +CSC_LATE_BINDING_STATUS_INVALID_PARAMS =4 , +CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE =5 , +CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD =6 , +CSC_LATE_BINDING_STATUS_TIMEOUT =7 , +}; + +/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner; + +/** +* @push_config: Sends a config to FW. +* @dev: device struct corresponding to the mei device +* @type: payload type +* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +int (*push_config)(struct device *dev,u32 type,u32 flags, +const void *payload,size_t payload_size); }; + +#endif /* _LATE_BIND_MEI_INTERFACE_H_ */ --2.34.1
Re: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 305 lines · Anshuman
Quoted 299 lines
-----Original Message-----
From: Nilawar, Badal <[email protected]>
Sent: Wednesday, June 25, 2025 10:30 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: Gupta, Anshuman <[email protected]>; Vivi, Rodrigo <[email protected]>; Usyskin, Alexander <[email protected]>; [email protected]; Ceraolo Spurio, Daniele <[email protected]>
Subject: [PATCH v4 02/10] mei:late_bind: add late binding component driverFrom: Alexander Usyskin <[email protected]>
Add late binding component driver.
It allows pushing the late binding configuration from, for example, the Xe graphics driver to the Intel discrete graphics card's CSE device.Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Badal Nilawar <[email protected]>---
v2:
- Use generic naming (Jani)
- Dropxe_late_bind_componentstruct to move to xe code (Daniele/Sasha)
v3:
- Updated kconfig description
- Move CSC late binding specific flags/defines tolate_bind_mei_interface.h
(Daniele)
v4:
- Add match forPCI_CLASS_DISPLAY_OTHERto support headless cards
(Anshuman)
v5:
- Add fixes inpush_config(Sasha)
- UseINTEL_prefix for component, refine doc,
add status enum toheaderlate_bind_mei_interface.h(Anshuman)--- drivers/misc/mei/Kconfig | 1 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/late_bind/Kconfig | 13 + drivers/misc/mei/late_bind/Makefile | 9 + drivers/misc/mei/late_bind/mei_late_bind.c | 281 ++++++++++++++++++++ include/drm/intel/i915_component.h | 1 + include/drm/intel/late_bind_mei_interface.h | 64 +++++ 7 files changed, 370 insertions(+)create mode 100644
drivers/misc/mei/late_bind/Kconfigcreate mode 100644drivers/misc/mei/late_bind/Makefilecreate mode 100644drivers/misc/mei/late_bind/mei_late_bind.ccreate mode 100644include/drm/intel/late_bind_mei_interface.hdrivers/misc/mei/Kconfig index renamed from drivers/misc/mei/Kconfig +0
-0
7575fee96cc6..771becc68095100644drivers/misc/mei/Kconfig +1
-0@@ -84,5 +84,6 @@ config INTEL_MEI_VSC source "drivers/misc/mei/hdcp/Kconfig" source "drivers/misc/mei/pxp/Kconfig" source "drivers/misc/mei/gsc_proxy/Kconfig" +source "drivers/misc/mei/late_bind/Kconfig" endifdrivers/misc/mei/Makefile index renamed from drivers/misc/mei/Makefile +0
-0
6f9fdbf1a495..84bfde888d81100644drivers/misc/mei/Makefile +1
-0@@ -31,6 +31,7 @@ CFLAGS_mei-trace.o = -I$(src) obj-$(CONFIG_INTEL_MEI_HDCP) += hdcp/ obj-$(CONFIG_INTEL_MEI_PXP) += pxp/ obj-$(CONFIG_INTEL_MEI_GSC_PROXY) += gsc_proxy/ +obj-$(CONFIG_INTEL_MEI_LATE_BIND) += late_bind/ obj-$(CONFIG_INTEL_MEI_VSC_HW) += mei-vsc-hw.o mei-vsc-hw-y := vsc-tp.o diff --git a/drivers/misc/mei/late_bind/Kconfig b/drivers/misc/mei/late_bind/Kconfig
new file mode 100644
index 000000000000..65c7180c5678drivers/misc/mei/late_bind/Kconfig new file +13
-0@@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# +config INTEL_MEI_LATE_BIND + tristate "Intel late binding support on ME Interface" + select INTEL_MEI_ME + depends on DRM_XE + help + MEI Support for Late Binding for Intel graphics card. + + Enables the ME FW interfaces for Late Binding feature, + allowing loading of firmware for the devices like Fan + Controller during by Intel Xe driver.drivers/misc/mei/late_bind/Makefile new file +9
-0@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# +# Makefile - Late Binding client driver for Intel MEI Bus Driver. + +subdir-ccflags-y += -I$(srctree)/drivers/misc/mei/ + +obj-$(CONFIG_INTEL_MEI_LATE_BIND) += mei_late_bind.odrivers/misc/mei/late_bind/mei_late_bind.c new file +17
-0@@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2025 Intel Corporation */ #include +<drm/intel/i915_component.h> #include +<drm/intel/late_bind_mei_interface.h> +#include <linux/component.h> +#include <linux/pci.h> +#include <linux/mei_cl_bus.h> +#include <linux/module.h> +#include <linux/overflow.h> +#include <linux/slab.h> +#include <linux/uuid.h> + +#include "mkhi.h" + +#define GFX_SRV_MKHI_LATE_BINDING_CMD 0x12 #define +GFX_SRV_MKHI_LATE_BINDING_RSP (GFX_SRV_MKHI_LATE_BINDING_CMD|
0x80)drivers/misc/mei/late_bind/mei_late_bind.c new file +44
-0+ +#define LATE_BIND_SEND_TIMEOUT_MSEC 3000 #define +LATE_BIND_RECV_TIMEOUT_MSEC 3000 + +/** +* struct csc_heci_late_bind_req - late binding request +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @flags: flags to be passed to the firmware +* @reserved: reserved field +* @payload_size: size of the payload data in bytes +* @payload: data to be sent to the firmware */ struct +csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags; +u32 reserved[2 ]; +u32 payload_size; + u8 payload[] __counted_by(payload_size); } __packed; + +/** +* struct csc_heci_late_bind_rsp - late binding response +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @reserved: reserved field +* @status: status of the late binding command execution by firmware +*/ struct csc_heci_late_bind_rsp { +struct mkhi_msg_hdr header; +u32 type; +u32 reserved[2 ]; +u32 status; +} __packed; + +static int mei_late_bind_check_response (const struct device *dev,const +struct mkhi_msg_hdr *hdr) { +if (hdr->group_id !=MKHI_GROUP_ID_GFX ) { +dev_err (dev,"Mismatch group id: 0x%x instead of 0x%x\n" , + hdr->group_id,MKHI_GROUP_ID_GFX ); +return -EINVAL ; + } + +if (hdr->command !=GFX_SRV_MKHI_LATE_BINDING_RSP ) { + dev_err(dev, "Mismatch command: 0x%x instead of 0x%x\n", + hdr->command,
GFX_SRV_MKHI_LATE_BINDING_RSP);drivers/misc/mei/late_bind/mei_late_bind.c new file +64
-0+return -EINVAL ; + } + +if (hdr->result) { +dev_err (dev,"Error in result: 0x%x\n" , hdr->result); +return -EINVAL ; + } + +return 0 ; +} + +/** +* mei_late_bind_push_config - Sends a config to the firmware. +* @dev: device struct corresponding to the mei device +* @type: payload type +* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +static int mei_late_bind_push_config (struct device *dev,u32 type,u32 flags, +const void *payload,size_t payload_size) { +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp; +size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ; + + cldev =to_mei_cl_device (dev); + + ret =mei_cldev_enable (cldev); +if (ret <0 ) { +dev_dbg (dev,"mei_cldev_enable failed. %zd\n" , ret); +return ret; + } + + req_size =struct_size (req, payload, payload_size); +if (req_size >mei_cldev_mtu (cldev)) { +dev_err (dev,"Payload is too big %zu\n" , payload_size); + ret = -EMSGSIZE ; + goto end; + } + + req =kmalloc (req_size,GFP_KERNEL ); +if (!req) { + ret = -ENOMEM ; + goto end; + } + + req->header.group_id =MKHI_GROUP_ID_GFX ; + req->header.command =GFX_SRV_MKHI_LATE_BINDING_CMD ; + req->type = type; + req->flags = flags; + req->reserved[0 ] =0 ; + req->reserved[1 ] =0 ; + req->payload_size = payload_size; +memcpy (req->payload, payload, payload_size); + + ret = mei_cldev_send_timeout(cldev, (void *)req, req_size,
LATE_BIND_SEND_TIMEOUT_MSEC);drivers/misc/mei/late_bind/mei_late_bind.c new file +6
-0+if (ret <0 ) { +dev_err (dev,"mei_cldev_send failed. %zd\n" , ret); + goto end; + } + + ret = mei_cldev_recv_timeout(cldev, (void *)&rsp, sizeof(rsp),
LATE_BIND_RECV_TIMEOUT_MSEC);drivers/misc/mei/late_bind/mei_late_bind.c new file +6
-0+if (ret <0 ) { +dev_err (dev,"mei_cldev_recv failed. %zd\n" , ret); + goto end; + } +if (ret <sizeof (rsp.header)) { + dev_err(dev, "bad response header from the firmware: size%zd < %zu\n",
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+ ret, sizeof(rsp.header)); + goto end; + } +if (ret <sizeof (rsp)) { + dev_err(dev, "bad response from the firmware: size %zd <%zu\n",
drivers/misc/mei/late_bind/mei_late_bind.c new file +7
-0+ ret, sizeof(rsp)); + goto end; + } + + ret =mei_late_bind_check_response (dev, &rsp.header); +if (ret) { + dev_err(dev, "bad result response from the firmware:0x%x\n",
drivers/misc/mei/late_bind/mei_late_bind.c new file +29
-0+ *(uint32_t *)&rsp.header); + goto end; + } + + ret = (int )rsp.status; +dev_dbg (dev,"%s status = %zd\n" , __func__, ret); + +end: +mei_cldev_disable (cldev); +kfree (req); +return ret; +} + +static const struct late_bind_component_ops mei_late_bind_ops = { + .owner =THIS_MODULE , + .push_config = mei_late_bind_push_config, }; + +static int mei_component_master_bind (struct device *dev) { +return component_bind_all (dev, (void *)&mei_late_bind_ops); } + +static void mei_component_master_unbind (struct device *dev) { +component_unbind_all (dev, (void *)&mei_late_bind_ops); } + +static const struct component_master_ops mei_component_master_ops = { + .bind = mei_component_master_bind, + .unbind = mei_component_master_unbind, }; + +/** +* mei_late_bind_component_match - compare function for matching mei Quoted 4 lines
late bind.
+ *
+ * The function checks if requester is IntelPCI_CLASS_DISPLAY_VGAor
+ *PCI_CLASS_DISPLAY_OTHERdevice, and checks if the parent of requesterDOC is still wrong dev is requester here, you are checking base == dev. With fixing of that.
Quoted 1 line
Reviewed-by Anshuman Gupta <[email protected]>
It should be requester is grand parent of late_bind mei device.
Thanks,
Badal
Quoted 175 lines
Thanks,
AnshumanQuoted 172 lines
+ * and the grand parent of
mei_ifare the same device
+ *
+ * @dev: master device
+ * @subcomponent: subcomponent to match (INTEL_COMPONENT_LATE_BIND)
+ * @data: compare data (late_bindmei device on mei bus)
+ *
+ * Return:
+ * * 1 - if components match
+ * * 0 - otherwise
+ */
+static int mei_late_bind_component_match(struct device *dev, int subcomponent,drivers/misc/mei/late_bind/mei_late_bind.c new file +39
-0+ void *data) +{ +struct device *base = data; +struct pci_dev *pdev; + +if (!dev) +return 0 ; + +if (!dev_is_pci (dev)) +return 0 ; + + pdev =to_pci_dev (dev); + +if (pdev->vendor !=PCI_VENDOR_ID_INTEL ) +return 0 ; + +if (pdev->class != (PCI_CLASS_DISPLAY_VGA <<8 ) && + pdev->class != (PCI_CLASS_DISPLAY_OTHER <<8 )) +return 0 ; + +if (subcomponent !=INTEL_COMPONENT_LATE_BIND ) +return 0 ; + + base = base->parent; +if (!base)/* mei device */ +return 0 ; + + base = base->parent;/* pci device */ + +return !!base && dev == base; +} + +static int mei_late_bind_probe (struct mei_cl_device *cldev, +const struct mei_cl_device_id *id) { +struct component_match *master_match =NULL ; +int ret; + + component_match_add_typed(&cldev->dev, &master_match, + mei_late_bind_component_match, &cldev-Quoted 1 line
dev);
drivers/misc/mei/late_bind/mei_late_bind.c new file +14
-0+if (IS_ERR_OR_NULL (master_match)) +return -ENOMEM ; + + ret =component_master_add_with_match (&cldev->dev, + &mei_component_master_ops, + master_match); +if (ret <0 ) +dev_err (&cldev->dev,"Master comp add failed %d\n" , ret); + +return ret; +} + +static void mei_late_bind_remove (struct mei_cl_device *cldev) { + component_master_del(&cldev->dev,
&mei_component_master_ops); }drivers/misc/mei/late_bind/mei_late_bind.c new file +22
-0+ +#define MEI_GUID_MKHI UUID_LE(0xe2c2afa2, 0x3817, 0x4d19, \ + 0x9d, 0x95, 0x6, 0xb1, 0x6b, 0x58, 0x8a, 0x5d) + +static struct mei_cl_device_id mei_late_bind_tbl[] = { + { .uuid =MEI_GUID_MKHI , .version =MEI_CL_VERSION_ANY }, + { } +}; +MODULE_DEVICE_TABLE (mei, mei_late_bind_tbl); + +static struct mei_cl_driver mei_late_bind_driver = { + .id_table = mei_late_bind_tbl, + .name =KBUILD_MODNAME , + .probe = mei_late_bind_probe, + .remove = mei_late_bind_remove, +}; + +module_mei_cl_driver (mei_late_bind_driver); + +MODULE_AUTHOR ("Intel Corporation" ); +MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("MEI Late Binding" );include/drm/intel/i915_component.h +1
-0@@ -31,6 +31,7 @@ enum i915_component_type {I915_COMPONENT_HDCP ,I915_COMPONENT_PXP ,I915_COMPONENT_GSC_PROXY , + INTEL_COMPONENT_LATE_BIND, };/* MAX_PORT is the number of port include/drm/intel/late_bind_mei_interface.h new file +60
-1@@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright (c) 2025 Intel Corporation */ + +#ifndef _LATE_BIND_MEI_INTERFACE_H_ +#define _LATE_BIND_MEI_INTERFACE_H_ + +#include <linux/types.h> + +struct device ; +struct module ; + +/** +* Late Binding flags +* Persistent across warm reset +*/ +#define CSC_LATE_BINDING_FLAGS_IS_PERSISTENT BIT(0) + +/** +* xe_late_bind_fw_type - enum to determine late binding fw type */ +enum late_bind_type { +CSC_LATE_BINDING_TYPE_FAN_CONTROL =1 , }; + +/** +* Late Binding payload status +*/ +enum csc_late_binding_status { +CSC_LATE_BINDING_STATUS_SUCCESS =0 , +CSC_LATE_BINDING_STATUS_4ID_MISMATCH =1 , +CSC_LATE_BINDING_STATUS_ARB_FAILURE =2 , +CSC_LATE_BINDING_STATUS_GENERAL_ERROR =3 , +CSC_LATE_BINDING_STATUS_INVALID_PARAMS =4 , +CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE =5 , +CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD =6 , +CSC_LATE_BINDING_STATUS_TIMEOUT =7 , +}; + +/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner; + +/** +* @push_config: Sends a config to FW. +* @dev: device struct corresponding to the mei device +* @type: payload type +* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +int (*push_config)(struct device *dev,u32 type,u32 flags, +const void *payload,size_t payload_size); }; + +#endif /* _LATE_BIND_MEI_INTERFACE_H_ */ --2.34.1
Greg KH
maintainerRe: [PATCH v4 02/10] mei: late_bind: add late binding component driver
In reply to Badal NilawarQuoted 21 lines · Badal Nilawar
drivers/misc/mei/late_bind/mei_late_bind.c new file +18
-0@@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2025 Intel Corporation +*/ +#include <drm/intel/i915_component.h> +#include <drm/intel/late_bind_mei_interface.h> +#include <linux/component.h> +#include <linux/pci.h> +#include <linux/mei_cl_bus.h> +#include <linux/module.h> +#include <linux/overflow.h> +#include <linux/slab.h> +#include <linux/uuid.h> + +#include "mkhi.h" + +#define GFX_SRV_MKHI_LATE_BINDING_CMD 0x12 +#define GFX_SRV_MKHI_LATE_BINDING_RSP (GFX_SRV_MKHI_LATE_BINDING_CMD | 0x80)
drivers/misc/mei/late_bind/mei_late_bind.c line 28
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +10
-0+ +#define LATE_BIND_SEND_TIMEOUT_MSEC 3000 +#define LATE_BIND_RECV_TIMEOUT_MSEC 3000 + +/** +* struct csc_heci_late_bind_req - late binding request +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @flags: flags to be passed to the firmware +* @reserved: reserved field
Reserved for what? All reserved fields need to be set to a default value, please document that here.
drivers/misc/mei/late_bind/mei_late_bind.c line 35
Quoted 7 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +7
-0+* @payload_size: size of the payload data in bytes +* @payload: data to be sent to the firmware +*/ +struct csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags;
What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be __u32?
drivers/misc/mei/late_bind/mei_late_bind.c line 52
Quoted 12 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +12
-0+/** +* struct csc_heci_late_bind_rsp - late binding response +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @reserved: reserved field +* @status: status of the late binding command execution by firmware +*/ +struct csc_heci_late_bind_rsp { +struct mkhi_msg_hdr header; +u32 type; +u32 reserved[2 ]; +u32 status;
Same questions as above.
drivers/misc/mei/late_bind/mei_late_bind.c line 80
Quoted 5 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+} __packed; +/** +* mei_late_bind_push_config - Sends a config to the firmware. +* @dev: device struct corresponding to the mei device +* @type: payload type
Shouldn't type be an enum?
drivers/misc/mei/late_bind/mei_late_bind.c line 89
Quoted 9 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +static int mei_late_bind_push_config (struct device *dev,u32 type,u32 flags, +const void *payload,size_t payload_size)
Why do static functions need kerneldoc formatting?
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 9 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+{ +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp; +size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ;
How can any of these ever happen as you control the callers of this function?
drivers/misc/mei/late_bind/mei_late_bind.c line 103
Quoted 5 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+ + cldev =to_mei_cl_device (dev); + + ret =mei_cldev_enable (cldev); +if (ret <0 ) {
You mean:
if (ret)
right?
drivers/misc/mei/late_bind/mei_late_bind.c line 104
Quoted 1 line
drivers/misc/mei/late_bind/mei_late_bind.c new file +1
-0+dev_dbg (dev,"mei_cldev_enable failed. %zd\n" , ret);
Why display the error again if this failed? The caller already did that.
And the function returns an int, not a ssize_t, didn't the compiler complain?
thanks,
greg k-h
Re: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 26 lines · Greg KH
Quoted 25 lines · Badal Nilawar
drivers/misc/mei/late_bind/mei_late_bind.c new file +22
-0@@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2025 Intel Corporation +*/ +#include <drm/intel/i915_component.h> +#include <drm/intel/late_bind_mei_interface.h> +#include <linux/component.h> +#include <linux/pci.h> +#include <linux/mei_cl_bus.h> +#include <linux/module.h> +#include <linux/overflow.h> +#include <linux/slab.h> +#include <linux/uuid.h> + +#include "mkhi.h" + +#define GFX_SRV_MKHI_LATE_BINDING_CMD 0x12 +#define GFX_SRV_MKHI_LATE_BINDING_RSP (GFX_SRV_MKHI_LATE_BINDING_CMD | 0x80) + +#define LATE_BIND_SEND_TIMEOUT_MSEC 3000 +#define LATE_BIND_RECV_TIMEOUT_MSEC 3000 +
Quoted 8 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 28
Quoted 6 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +6
-0+/** +* struct csc_heci_late_bind_req - late binding request +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @flags: flags to be passed to the firmware +* @reserved: reserved field Reserved for what? All reserved fields need to be set to a default value, please document that here.
Reserved by CSC firmware probably for future use. default value should be 0.
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 35
Quoted 8 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +7
-0+* @payload_size: size of the payload data in bytes +* @payload: data to be sent to the firmware +*/ +struct csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags;What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?
endian of these fields is little endian, all the headers are little endian. I will add comment at top. On __u32 I doubt we need to do it as csc send copy it to internal buffer.
Sasha can help to answer.
Quoted 15 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 52
Quoted 13 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +12
-0+/** +* struct csc_heci_late_bind_rsp - late binding response +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @reserved: reserved field +* @status: status of the late binding command execution by firmware +*/ +struct csc_heci_late_bind_rsp { +struct mkhi_msg_hdr header; +u32 type; +u32 reserved[2 ]; +u32 status;Same questions as above.
Quoted 6 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 80
Quoted 5 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+} __packed; +/** +* mei_late_bind_push_config - Sends a config to the firmware. +* @dev: device struct corresponding to the mei device +* @type: payload type Shouldn't type be an enum?
Sure will make enum.
Quoted 11 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 89
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +static int mei_late_bind_push_config (struct device *dev,u32 type,u32 flags, +const void *payload,size_t payload_size)Why do static functions need kerneldoc formatting?
Sasha can help to answer this.
Quoted 12 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+{ +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp; +size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ;How can any of these ever happen as you control the callers of this function?
I will add WARN here.
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 103
Quoted 7 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+ + cldev =to_mei_cl_device (dev); + + ret =mei_cldev_enable (cldev); +if (ret <0 ) {You mean:
if (ret)
right?
yes
Quoted 8 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 104
Quoted 3 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +1
-0+dev_dbg (dev,"mei_cldev_enable failed. %zd\n" , ret);Why display the error again if this failed? The caller already did that.
And the function returns an int, not a
ssize_t, didn't the compiler complain
It didn't. This is for debug from mei side, this can be removed or will fix format specifier.
Thanks,
Badal
Quoted 4 lines
thanks,
greg k-h
Greg KH
maintainerRe: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 11 lines · Badal
Quoted 9 lines · Greg KH
drivers/misc/mei/late_bind/mei_late_bind.c line 35
Quoted 7 lines
+ * @payload_size: size of the payload data in bytes
+ * @payload: data to be sent to the firmware
+ */drivers/misc/mei/late_bind/mei_late_bind.c new file +4
-0+struct csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags;What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?
Quoted 2 lines
endian of these fields is little endian, all the headers are little endian. I will add comment at top.
No, use the proper types if this is little endian. Don't rely on a comment to catch things when it goes wrong.
Quoted 1 line
On
__u32I doubt we need to do it as csc send copy it to internal buffer.
If this crosses the kernel boundry, it needs to use the proper type.
Quoted 11 lines
Quoted 11 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 9 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+{ +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp; +size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ;How can any of these ever happen as you control the callers of this function?
Quoted 1 line
I will add WARN here.
So you will end up crashing the machine and getting a CVE assigned for it?
Please no. If it can't happen, then don't check for it. If it can happen, great, handle it properly. Don't just give up and cause a system to reboot, that's a horrible way to write kernel code.
thanks,
greg k-h
Re: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 11 lines · Greg KH
Quoted 10 lines · Badal
Quoted 9 lines · Greg KH
drivers/misc/mei/late_bind/mei_late_bind.c line 35
Quoted 7 lines
+ * @payload_size: size of the payload data in bytes
+ * @payload: data to be sent to the firmware
+ */drivers/misc/mei/late_bind/mei_late_bind.c new file +4
-0+struct csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags;What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?
Quoted 7 lines
Quoted 2 lines
endian of these fields is little endian, all the headers are little endian. I will add comment at top.
No, use the proper types if this is little endian. Don't rely on a comment to catch things when it goes wrong.
Quoted 1 line
On
__u32I doubt we need to do it as csc send copy it to internal buffer.If this crosses the kernel boundry, it needs to use the proper type.
Understood. I will proceed with using __le32 in this context, provided that Sasha agrees.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+{ +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp; +size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ;How can any of these ever happen as you control the callers of this function?
Quoted 7 lines
Quoted 1 line
I will add WARN here.
So you will end up crashing the machine and getting a CVE assigned for it?
Please no. If it can't happen, then don't check for it. If it can happen, great, handle it properly. Don't just give up and cause a system to reboot, that's a horrible way to write kernel code.
Fine, will drop the idea of WARN here.
Thanks,
Badal
Quoted 4 lines
thanks,
greg k-h
Re: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 15 lines · Badal
Quoted 13 lines · Greg KH
Quoted 12 lines · Badal
Quoted 9 lines · Greg KH
Quoted 7 lines
+ * @payload_size: size of the payload data in bytes
+ * @payload: data to be sent to the firmware
+ */
+structcsc_heci_late_bind_req{
+ structmkhi_msg_hdrheader;
+ u32 type;
+ u32 flags;What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?endian of these fields is little endian, all the headers are little endian. I will add comment at top.
Quoted 7 lines
Quoted 5 lines
No, use the proper types if this is little endian. Don't rely on a comment to catch things when it goes wrong.
Quoted 1 line
On
__u32I doubt we need to do it as csc send copy it to internal buffer.If this crosses the kernel boundry, it needs to use the proper type.
Understood. I will proceed with using
__le32in this context, provided that Sasha agrees.
I believe __le{32, 16} is used only when the byte order is fixed and matches the host system's native endianness. Since the CSC controller is little-endian, is it necessary to specify the endianness here? If it is mandatory to use the __le{32, 16} endian type, then is there need to convert endianness using cpu_to_le and le_to_cpu?
Quoted 30 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 11 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+{ + struct mei_cl_device *cldev; + struct csc_heci_late_bind_req *req = NULL; + struct csc_heci_late_bind_rsp rsp; + size_t req_size; + ssize_t ret; + + if (!dev || !payload || !payload_size) + return -EINVAL;How can any of these ever happen as you control the callers of this function?
Quoted 7 lines
Quoted 1 line
I will add WARN here.
So you will end up crashing the machine and getting a CVE assigned for it?
Please no. If it can't happen, then don't check for it. If it can happen, great, handle it properly. Don't just give up and cause a system to reboot, that's a horrible way to write kernel code.
Fine, will drop the idea of WARN here.
Thanks,
BadalQuoted 4 lines
thanks,
greg k-h
Rodrigo Vivi
maintainerRe: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 25 lines · Badal
Quoted 23 lines · Badal
Quoted 20 lines · Greg KH
Quoted 8 lines · Badal
Quoted 7 lines · Greg KH
Quoted 7 lines
+ * @payload_size: size of the payload data in bytes
+ * @payload: data to be sent to the firmware
+ */
+structcsc_heci_late_bind_req{
+ structmkhi_msg_hdrheader;
+ u32 type;
+ u32 flags;Quoted 5 lines
Quoted 2 lines
What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?endian of these fields is little endian, all the headers are little endian.
I will add comment at top.No, use the proper types if this is little endian. Don't rely on a comment to catch things when it goes wrong.
Quoted 2 lines
On
__u32I doubt we need to do it as csc send copy it to internal buffer.If this crosses the kernel boundry, it needs to use the proper type.
Quoted 8 lines
Quoted 2 lines
Understood. I will proceed with using
__le32in this context, provided that Sasha agrees.I believe __le{32, 16} is used only when the byte order is fixed and matches the host system's native endianness. Since the CSC controller is little-endian, is it necessary to specify the endianness here? If it is mandatory to use the __le{32, 16} endian type, then is there need to convert endianness using
cpu_to_leandle_to_cpu?
I honestly don't believe that specifying endianness here is **needed**. I mean, it might be future safe to use the __le32 and
flags = cpu_to_le32(1 << 0) just in case someone decide to port all the GPU code to run in big-endian CPU. Very unlikely I'd say, and much more cases to resolve before we get to this gpu use case here I'm afraid.
Weel, unless this mei here can be used outside of GPU context?!
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 12 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +9
-0+{ + struct mei_cl_device *cldev; + struct csc_heci_late_bind_req *req = NULL; + struct csc_heci_late_bind_rsp rsp; + size_t req_size; + ssize_t ret; + + if (!dev || !payload || !payload_size) + return -EINVAL;How can any of these ever happen as you control the callers of this function?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
I will add WARN here.
So you will end up crashing the machine and getting a CVE assigned for it?
Please no. If it can't happen, then don't check for it. If it can happen, great, handle it properly. Don't just give up and cause a system to reboot, that's a horrible way to write kernel code.
I agree here that the WARN is not a good way to handle that. We either don't check (remove it) or handle properly (keep as is).
With the context of where this driver is used I'd say it can't happen. Since xe is properly setting it right now and I don't believe we have other usages of this mei driver here.
But if there's a chance of this getting used outside of xe, then we need to keep the check...
But if you keep the check, then also use __lb32() because we need some consistency in the reasoning, one way or the other.
Quoted 10 lines
Quoted 10 lines
Fine, will drop the idea of WARN here.
Thanks,
BadalQuoted 4 lines
thanks,
greg k-h
RE: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 48 lines
-----Original Message-----
From: Vivi, Rodrigo <[email protected]>
Sent: Tuesday, July 1, 2025 11:05 PM
To: Nilawar, Badal <[email protected]>
Cc: Greg KH <[email protected]>; Usyskin, Alexander <[email protected]>; [email protected]; dri- [email protected]; [email protected]; Gupta, Anshuman <[email protected]>; Ceraolo Spurio, Daniele <[email protected]>
Subject: Re: [PATCH v4 02/10] mei:late_bind: add late binding component driverQuoted 24 lines · Badal
Quoted 22 lines · Badal
Quoted 19 lines · Greg KH
Quoted 7 lines · Badal
Quoted 6 lines · Greg KH
Quoted 6 lines
+ * @payload_size: size of the payload data in bytes
+ * @payload: data to be sent to the firmware */ struct +csc_heci_late_bind_req {
+ structmkhi_msg_hdrheader;
+ u32 type;
+ u32 flags;Quoted 5 lines
Quoted 2 lines
What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?endian of these fields is little endian, all the headers are little endian.
I will add comment at top.No, use the proper types if this is little endian. Don't rely on a comment to catch things when it goes wrong.
Quoted 2 lines
On
__u32I doubt we need to do it as csc send copy it to internal buffer.If this crosses the kernel boundry, it needs to use the proper type.
Quoted 8 lines
Quoted 2 lines
Understood. I will proceed with using
__le32in this context, provided that Sasha agrees.I believe __le{32, 16} is used only when the byte order is fixed and matches the host system's native endianness. Since the CSC controller is little-endian, is it necessary to specify the endianness here? If it is mandatory to use the __le{32, 16} endian type, then is there need to convert endianness using
cpu_to_leandle_to_cpu?
Quoted 7 lines
I honestly don't believe that specifying endianness here is **needed**. I mean, it might be future safe to use the
__le32and flags = cpu_to_le32(1 <<
0) just in case someone decide to port all the GPU code to run in big-endian CPU. Very unlikely I'd say, and much more cases to resolve before we get to this gpu use case here I'm afraid.Weel, unless this mei here can be used outside of GPU context?!
MEI is interface driver for CSC firmware that is also part of our GPU.
So, it is completely un-realistic CSC having different endianness as compared to HOST and GPU. @Usyskin, Alexander what is you opinion ?
Thanks,
Anshuman.
Quoted 46 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Review
Quoted 13 lines
(quoted diff) +9
-0+{ + struct mei_cl_device *cldev; + struct csc_heci_late_bind_req *req = NULL; + struct csc_heci_late_bind_rsp rsp; + size_t req_size; + ssize_t ret; + + if (!dev || !payload || !payload_size) + return -EINVAL;How can any of these ever happen as you control the callers of this function?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
I will add WARN here.
So you will end up crashing the machine and getting a CVE assigned for it?
Please no. If it can't happen, then don't check for it. If it can happen, great, handle it properly. Don't just give up and cause a system to reboot, that's a horrible way to write kernel code.
I agree here that the WARN is not a good way to handle that. We either don't check (remove it) or handle properly (keep as is).
With the context of where this driver is used I'd say it can't happen. Since xe is properly setting it right now and I don't believe we have other usages of this mei driver here.
But if there's a chance of this getting used outside of xe, then we need to keep the check...
But if you keep the check, then also use
__lb32()because we need some consistency in the reasoning, one way or the other.Quoted 10 lines
Quoted 10 lines
Fine, will drop the idea of WARN here.
Thanks,
BadalQuoted 4 lines
thanks,
greg k-h
Usyskin, Alexander
maintainerRE: [PATCH v4 02/10] mei: late_bind: add late binding component driver
In reply to Rodrigo ViviQuoted 38 lines
Subject: Re: [PATCH v4 02/10] mei:
late_bind: add late binding component driverQuoted 25 lines · Badal
Quoted 23 lines · Badal
Quoted 20 lines · Greg KH
Quoted 8 lines · Badal
Quoted 7 lines · Greg KH
Quoted 7 lines
+ * @payload_size: size of the payload data in bytes
+ * @payload: data to be sent to the firmware
+ */
+structcsc_heci_late_bind_req{
+ structmkhi_msg_hdrheader;
+ u32 type;
+ u32 flags;Quoted 5 lines
Quoted 2 lines
What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?endian of these fields is little endian, all the headers are little endian.
I will add comment at top.No, use the proper types if this is little endian. Don't rely on a comment to catch things when it goes wrong.
Quoted 2 lines
On
__u32I doubt we need to do it as csc send copy it to internal buffer.If this crosses the kernel boundry, it needs to use the proper type.
Quoted 8 lines
Quoted 2 lines
Understood. I will proceed with using
__le32in this context, provided that Sasha agrees.I believe __le{32, 16} is used only when the byte order is fixed and matches the host system's native endianness. Since the CSC controller is little-endian, is it necessary to specify the endianness here? If it is mandatory to use the __le{32, 16} endian type, then is there need to convert endianness using
cpu_to_leandle_to_cpu?
Quoted 8 lines
I honestly don't believe that specifying endianness here is **needed**. I mean, it might be future safe to use the
__le32and
flags =cpu_to_le32(1 << 0)just in case someone decide to port all the GPU code to run in big-endian CPU. Very unlikely I'd say, and much more cases to resolve before we get to this gpu use case here I'm afraid.Weel, unless this mei here can be used outside of GPU context?!
There is nothing useful in this outside of GPU context. This module is tailored for GPU use-case.
If Xe driver is bound to be little-endian, this one should be too. Other similar modules use u32.
- -
Thanks,
Sasha
Quoted 45 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Review
Quoted 12 lines
(quoted diff) +9
-0+{ + struct mei_cl_device *cldev; + struct csc_heci_late_bind_req *req = NULL; + struct csc_heci_late_bind_rsp rsp; + size_t req_size; + ssize_t ret; + + if (!dev || !payload || !payload_size) + return -EINVAL;How can any of these ever happen as you control the callers of this function?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
I will add WARN here.
So you will end up crashing the machine and getting a CVE assigned for it?
Please no. If it can't happen, then don't check for it. If it can happen, great, handle it properly. Don't just give up and cause a system to reboot, that's a horrible way to write kernel code.
I agree here that the WARN is not a good way to handle that. We either don't check (remove it) or handle properly (keep as is).
With the context of where this driver is used I'd say it can't happen. Since xe is properly setting it right now and I don't believe we have other usages of this mei driver here.
But if there's a chance of this getting used outside of xe, then we need to keep the check...
But if you keep the check, then also use
__lb32()because we need some consistency in the reasoning, one way or the other.Quoted 10 lines
Quoted 10 lines
Fine, will drop the idea of WARN here.
Thanks,
BadalQuoted 4 lines
thanks,
greg k-h
Usyskin, Alexander
maintainerRE: [PATCH v4 02/10] mei: late_bind: add late binding component driver
In reply to Greg KHQuoted 93 lines
-----Original Message-----
From: Greg KH <[email protected]>
Sent: Saturday, June 28, 2025 3:18 PM
To: Nilawar, Badal <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; Gupta, Anshuman <[email protected]>; Vivi, Rodrigo <[email protected]>; Usyskin, Alexander <[email protected]>; Ceraolo Spurio, Daniele <[email protected]>
Subject: Re: [PATCH v4 02/10] mei:late_bind: add late binding component driverQuoted 11 lines · Badal Nilawar
drivers/misc/mei/late_bind/mei_late_bind.c new file +8
-0@@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2025 Intel Corporation +*/ +#include <drm/intel/i915_component.h> +#include <drm/intel/late_bind_mei_interface.h> +#include <linux/component.h> +#include <linux/pci.h> drivers/misc/mei/late_bind/mei_late_bind.c line 18
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +10
-0+#include <linux/mei_cl_bus.h> +#include <linux/module.h> +#include <linux/overflow.h> +#include <linux/slab.h> +#include <linux/uuid.h> + +#include "mkhi.h" + +#define GFX_SRV_MKHI_LATE_BINDING_CMD 0x12 +#define GFX_SRV_MKHI_LATE_BINDING_RSP (
GFX_SRV_MKHI_LATE_BINDING_CMD|0x80)drivers/misc/mei/late_bind/mei_late_bind.c line 28
Quoted 10 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +10
-0+ +#define LATE_BIND_SEND_TIMEOUT_MSEC 3000 +#define LATE_BIND_RECV_TIMEOUT_MSEC 3000 + +/** +* struct csc_heci_late_bind_req - late binding request +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @flags: flags to be passed to the firmware +* @reserved: reserved field Reserved for what? All reserved fields need to be set to a default value, please document that here.
drivers/misc/mei/late_bind/mei_late_bind.c line 35
Quoted 7 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +7
-0+* @payload_size: size of the payload data in bytes +* @payload: data to be sent to the firmware +*/ +struct csc_heci_late_bind_req { +struct mkhi_msg_hdr header; +u32 type; +u32 flags;What is the endian of these fields? And as this crosses the kernel/hardware boundry, shouldn't these be
__u32?drivers/misc/mei/late_bind/mei_late_bind.c line 52
Quoted 12 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +12
-0+/** +* struct csc_heci_late_bind_rsp - late binding response +* @header: @ref mkhi_msg_hdr +* @type: type of the late binding payload +* @reserved: reserved field +* @status: status of the late binding command execution by firmware +*/ +struct csc_heci_late_bind_rsp { +struct mkhi_msg_hdr header; +u32 type; +u32 reserved[2 ]; +u32 status;Same questions as above.
drivers/misc/mei/late_bind/mei_late_bind.c line 80
Quoted 5 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+} __packed; +/** +* mei_late_bind_push_config - Sends a config to the firmware. +* @dev: device struct corresponding to the mei device +* @type: payload type Shouldn't type be an enum?
drivers/misc/mei/late_bind/mei_late_bind.c
Quoted 8 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +8
-0+* @flags: payload flags +* @payload: payload buffer +* @payload_size: payload buffer size +* +* Return: 0 success, negative errno value on transport failure, +* positive status returned by FW +*/ +static int mei_late_bind_push_config(struct device *dev, u32 type, u32
Quoted 5 lines
flags,
drivers/misc/mei/late_bind/mei_late_bind.c line 89
Quoted 1 line
drivers/misc/mei/late_bind/mei_late_bind.c new file +1
-0+ const void *payload, size_t payload_size)Why do static functions need kerneldoc formatting?
The push_config function pointer is documented in late_bind_component_ops. We can drop one here.
Quoted 4 lines
Quoted 4 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +4
-0+{ +struct mei_cl_device *cldev; +struct csc_heci_late_bind_req *req =NULL ; +struct csc_heci_late_bind_rsp rsp;
Quoted 9 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 98
Quoted 5 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+size_t req_size; +ssize_t ret; + +if (!dev || !payload || !payload_size) +return -EINVAL ;How can any of these ever happen as you control the callers of this function?
This is the callback provided to another driver via component framework, there is no control.
Should we trust caller here?
Quoted 11 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 103
Quoted 6 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +5
-0+ + cldev =to_mei_cl_device (dev); + + ret =mei_cldev_enable (cldev); +if (ret <0 ) {You mean:
if (ret)
right?
Yes, mei_cldev_enable should never return >0
Quoted 6 lines
drivers/misc/mei/late_bind/mei_late_bind.c line 104
Quoted 2 lines
drivers/misc/mei/late_bind/mei_late_bind.c new file +1
-0+dev_dbg (dev,"mei_cldev_enable failed. %zd\n" , ret);Why display the error again if this failed? The caller already did that.
It is a separate module, and dynamic debug can be enabled separately. I see it as debug refinement, but this can be dropped if seemed unneeded.
Quoted 3 lines
And the function returns an int, not a
ssize_t, didn't the compiler complain?
Never seen that, do you suggest to add "return (int)ret;"
as we know that in this stage only error codes can be in this variable?
Quoted 3 lines
thanks,
greg k-h
- -
Thanks,
Sasha
Greg KH
maintainerRe: [PATCH v4 02/10] mei: late_bind: add late binding component driver
In reply to Badal Nilawarinclude/drm/intel/late_bind_mei_interface.h line 47
Quoted 7 lines · Badal Nilawar
include/drm/intel/late_bind_mei_interface.h new file +7
-0+/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner;
I don't think you ever set this field, so why is it here?
Or did I miss it somewhere?
thanks,
greg k-h
Re: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 11 lines · Greg KH
include/drm/intel/late_bind_mei_interface.h line 47
Quoted 7 lines · Badal Nilawar
include/drm/intel/late_bind_mei_interface.h new file +7
-0+/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner;I don't think you ever set this field, so why is it here?
Or did I miss it somewhere?
It is set in drivers/misc/mei/late_bind/mei_late_bind.c
static const struct late_bind_component_ops mei_late_bind_ops = { .owner = THIS_MODULE,
.push_config = mei_late_bind_push_config,
};
Thanks,
Badal
Quoted 4 lines
thanks,
greg k-h
Greg KH
maintainerRe: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 12 lines · Badal
Quoted 10 lines · Greg KH
include/drm/intel/late_bind_mei_interface.h line 47
Quoted 7 lines · Badal Nilawar
include/drm/intel/late_bind_mei_interface.h new file +7
-0+/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner;I don't think you ever set this field, so why is it here?
Quoted 8 lines
Quoted 1 line
Or did I miss it somewhere?
It is set in
drivers/misc/mei/late_bind/mei_late_bind.cstatic const struct
late_bind_component_opsmei_late_bind_ops= { .owner =THIS_MODULE,
.push_config =mei_late_bind_push_config,
};
Ah. But then who uses it? And why? Normally forcing callers to set .owner is frowned apon, use a #define correctly to have it automatically set for you in the registration function please.
And are you _sure_ you need it?
thanks,
greg k-h
RE: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 35 lines
-----Original Message-----
From: Greg KH <[email protected]>
Sent: 01 July 2025 13:48
To: Nilawar, Badal <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; Gupta, Anshuman <[email protected]>; Vivi, Rodrigo <[email protected]>; Usyskin, Alexander <[email protected]>; Ceraolo Spurio, Daniele <[email protected]>
Subject: Re: [PATCH v4 02/10] mei:late_bind: add late binding component driverQuoted 12 lines · Badal
Quoted 10 lines · Greg KH
include/drm/intel/late_bind_mei_interface.h line 47
Quoted 7 lines · Badal Nilawar
include/drm/intel/late_bind_mei_interface.h new file +7
-0+/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner;I don't think you ever set this field, so why is it here?
Quoted 7 lines
Quoted 1 line
Or did I miss it somewhere?
It is set in
drivers/misc/mei/late_bind/mei_late_bind.cstatic const struct
late_bind_component_opsmei_late_bind_ops= { .owner =THIS_MODULE,
.push_config =mei_late_bind_push_config, };
Quoted 5 lines
Ah. But then who uses it? And why? Normally forcing callers to set .owner is frowned apon, use a #define correctly to have it automatically set for you in the registration function please.
And are you _sure_ you need it?
In xe kmd only uses .push_config so .owner can be dropped. Looks like it got propagated from previously implemented mei components but for none of the component .owner is used. So it's fine to drop it. @Usyskin, Alexander please share your thoughts on this.
Badal
Quoted 4 lines
thanks,
greg k-h
Usyskin, Alexander
maintainerRE: [PATCH v4 02/10] mei: late_bind: add late binding component driver
Quoted 29 lines
Quoted 18 lines
Subject: Re: [PATCH v4 02/10] mei:
late_bind: add late binding component driverQuoted 14 lines · Badal
Quoted 11 lines · Greg KH
include/drm/intel/late_bind_mei_interface.h line 47
Quoted 7 lines · Badal Nilawar
include/drm/intel/late_bind_mei_interface.h new file +7
-0+/** +* struct late_bind_component_ops - ops for Late Binding services. +* @owner: Module providing the ops +* @push_config: Sends a config to FW. +*/ +struct late_bind_component_ops { +struct module *owner;I don't think you ever set this field, so why is it here?
Or did I miss it somewhere?
Quoted 7 lines
Quoted 5 lines
It is set in
drivers/misc/mei/late_bind/mei_late_bind.cstatic const struct
late_bind_component_opsmei_late_bind_ops= { .owner =THIS_MODULE,
.push_config =mei_late_bind_push_config, };Ah. But then who uses it? And why? Normally forcing callers to set .owner
is
Quoted 3 lines
frowned apon, use a #define correctly to have it automatically set for you in the registration function please.
Quoted 7 lines
Quoted 1 line
And are you _sure_ you need it?
In xe kmd only uses .push_config so .owner can be dropped. Looks like it got propagated from previously implemented mei components but for none of the component .owner is used. So it's fine to drop it. @Usyskin, Alexander please share your thoughts on this.
As caller do not need this, can be dropped.
- -
Thanks,
Sasha
Quoted 6 lines
Badal
Quoted 4 lines
thanks,
greg k-h
PATCH v4 3/10 drm/xe/xe_late_bind_fw: Introducing xe_late_bind_fw
In reply to Badal NilawarIntroducing xe_late_bind_fw to enable firmware loading for the devices, such as the fan controller, during the driver probe. Typically, firmware for such devices are part of IFWI flash image but can be replaced at probe after OEM tuning.
This patch binds mei late binding component to enable firmware loading.
v2:
- Add devm_add_action_or_reset to remove the component (Daniele)
- Add INTEL_MEI_GSC check in xe_late_bind_init() (Daniele)
v3:
- Fail driver probe if late bind initialization fails, add has_late_bind flag (Daniele)
v4:
- %S/I915_COMPONENT_LATE_BIND/INTEL_COMPONENT_LATE_BIND/
--- drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_device.c | 5 ++ drivers/gpu/drm/xe/xe_device_types.h | 6 ++ drivers/gpu/drm/xe/xe_late_bind_fw.c | 90 ++++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw.h | 15 ++++ drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 37 +++++++++ drivers/gpu/drm/xe/xe_pci.c | 3 + 7 files changed, 157 insertions(+) create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw.c create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw.h create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw_types.h
drivers/gpu/drm/xe/Makefile +1 -0
@@ -76,6 +76,7 @@ xe-y += xe_bb.o \ xe_hw_fence.o \ xe_irq.o \ xe_lrc.o \ + xe_late_bind_fw.o \ xe_migrate.o \ xe_mmio.o \ xe_mocs.o \
drivers/gpu/drm/xe/xe_device.c +5 -0
@@ -44,6 +44,7 @@#include "xe_hw_engine_group.h" #include "xe_hwmon.h" #include "xe_irq.h" +#include "xe_late_bind_fw.h" #include "xe_memirq.h" #include "xe_mmio.h" #include "xe_module.h"
@@ -889,6 +890,10 @@ int xe_device_probe(struct xe_device *xe)if (err)return err; + err =xe_late_bind_init (&xe->late_bind); +if (err && err != -ENODEV ) +return err; + err =xe_oa_init (xe);if (err)return err;
drivers/gpu/drm/xe/xe_device_types.h +6 -0
@@ -16,6 +16,7 @@#include "xe_devcoredump_types.h" #include "xe_heci_gsc.h" #include "xe_lmtt_types.h" +#include "xe_late_bind_fw_types.h" #include "xe_memirq_types.h" #include "xe_oa_types.h" #include "xe_platform_types.h"
@@ -323,6 +324,8 @@ struct xe_device { u8 has_heci_cscfi:1;/** @info.has_heci_gscfi: device has heci gscfi */ u8 has_heci_gscfi:1; +/** @info.has_late_bind: Device has firmware late binding support */ + u8 has_late_bind:1;/** @info.has_llc: Device has a shared CPU+GPU last level cache */ u8 has_llc:1;/** @info.has_mbx_power_limits: Device has support to manage power limits using
@@ -555,6 +558,9 @@ struct xe_device {/** @nvm: discrete graphics non-volatile memory */ struct intel_dg_nvm_dev *nvm; +/** @late_bind: xe mei late bind interface */ +struct xe_late_bind late_bind; +/** @oa: oa observation subsystem */ struct xe_oa oa;
drivers/gpu/drm/xe/xe_late_bind_fw.c new file +90 -0
90 lines not on this page · raw message
drivers/gpu/drm/xe/xe_late_bind_fw.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2025 Intel Corporation +*/ + +#ifndef _XE_LATE_BIND_FW_H_ +#define _XE_LATE_BIND_FW_H_ + +#include <linux/types.h> + +struct xe_late_bind ; + +int xe_late_bind_init (struct xe_late_bind *late_bind); + +#endif
drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2025 Intel Corporation +*/ + +#ifndef _XE_LATE_BIND_TYPES_H_ +#define _XE_LATE_BIND_TYPES_H_ + +#include <linux/iosys-map.h> +#include <linux/mutex.h> +#include <linux/types.h> + +/** +* struct xe_late_bind_component - Late Binding services component +* @mei_dev: device that provide Late Binding service. +* @ops: Ops implemented by Late Binding driver, used by Xe driver. +* +* Communication between Xe and MEI drivers for Late Binding services +*/ +struct xe_late_bind_component { +/** @late_bind_component.mei_dev: mei device */ +struct device *mei_dev; +/** @late_bind_component.ops: late binding ops */ +const struct late_bind_component_ops *ops; +}; + +/** +* struct xe_late_bind +*/ +struct xe_late_bind { +/** @late_bind.component: struct for communication with mei component */ +struct xe_late_bind_component component; +/** @late_bind.mutex: protects the component binding and usage */ +struct mutex mutex; +}; + +#endif
drivers/gpu/drm/xe/xe_pci.c +3 -0
@@ -66,6 +66,7 @@ struct xe_device_desc { u8 has_gsc_nvm:1; u8 has_heci_gscfi:1; u8 has_heci_cscfi:1; + u8 has_late_bind:1; u8 has_llc:1; u8 has_mbx_power_limits:1; u8 has_pxp:1;
@@ -355,6 +356,7 @@ static const struct xe_device_desc bmg_desc = { .has_mbx_power_limits = true, .has_gsc_nvm = 1, .has_heci_cscfi = 1, + .has_late_bind = true, .needs_scratch = true, };
@@ -600,6 +602,7 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.has_gsc_nvm = desc->has_gsc_nvm; xe->info.has_heci_gscfi = desc->has_heci_gscfi; xe->info.has_heci_cscfi = desc->has_heci_cscfi; + xe->info.has_late_bind = desc->has_late_bind; xe->info.has_llc = desc->has_llc; xe->info.has_pxp = desc->has_pxp; xe->info.has_sriov = desc->has_sriov;
Signature · 1 line
2.34.1
Rodrigo Vivi
maintainerRe: [PATCH v4 03/10] drm/xe/xe_late_bind_fw: Introducing xe_late_bind_fw
Quoted 242 lines · Badal Nilawar
Introducing
xe_late_bind_fwto enable firmware loading for the devices, such as the fan controller, during the driver probe. Typically, firmware for such devices are part of IFWI flash image but can be replaced at probe after OEM tuning.
This patch binds mei late binding component to enable firmware loading.v2:
- Adddevm_add_action_or_resetto remove the component (Daniele)
- AddINTEL_MEI_GSCcheck inxe_late_bind_init()(Daniele)
v3:
- Fail driver probe if late bind initialization fails, addhas_late_bindflag (Daniele)
v4:
- %S/I915_COMPONENT_LATE_BIND/INTEL_COMPONENT_LATE_BIND/Reviewed-by Daniele Ceraolo Spurio <[email protected]>Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_device.c | 5 ++ drivers/gpu/drm/xe/xe_device_types.h | 6 ++ drivers/gpu/drm/xe/xe_late_bind_fw.c | 90 ++++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw.h | 15 ++++ drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 37 +++++++++ drivers/gpu/drm/xe/xe_pci.c | 3 + 7 files changed, 157 insertions(+) create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw.c create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw.h create mode 100644 drivers/gpu/drm/xe/xe_late_bind_fw_types.hdrivers/gpu/drm/xe/Makefile +1
-0@@ -76,6 +76,7 @@ xe-y += xe_bb.o \ xe_hw_fence.o \ xe_irq.o \ xe_lrc.o \ + xe_late_bind_fw.o \ xe_migrate.o \ xe_mmio.o \ xe_mocs.o \drivers/gpu/drm/xe/xe_device.c +5
-0@@ -44,6 +44,7 @@#include "xe_hw_engine_group.h" #include "xe_hwmon.h" #include "xe_irq.h" +#include "xe_late_bind_fw.h" #include "xe_memirq.h" #include "xe_mmio.h" #include "xe_module.h" @@ -889,6 +890,10 @@ int xe_device_probe(struct xe_device *xe)if (err)return err; + err =xe_late_bind_init (&xe->late_bind); +if (err && err != -ENODEV ) +return err; + err =xe_oa_init (xe);if (err)return err;drivers/gpu/drm/xe/xe_device_types.h +6
-0@@ -16,6 +16,7 @@#include "xe_devcoredump_types.h" #include "xe_heci_gsc.h" #include "xe_lmtt_types.h" +#include "xe_late_bind_fw_types.h" #include "xe_memirq_types.h" #include "xe_oa_types.h" #include "xe_platform_types.h" @@ -323,6 +324,8 @@ struct xe_device { u8 has_heci_cscfi:1;/** @info.has_heci_gscfi: device has heci gscfi */ u8 has_heci_gscfi:1; +/** @info.has_late_bind: Device has firmware late binding support */ + u8 has_late_bind:1;/** @info.has_llc: Device has a shared CPU+GPU last level cache */ u8 has_llc:1;/** @info.has_mbx_power_limits: Device has support to manage power limits using @@ -555,6 +558,9 @@ struct xe_device {/** @nvm: discrete graphics non-volatile memory */ struct intel_dg_nvm_dev *nvm; +/** @late_bind: xe mei late bind interface */ +struct xe_late_bind late_bind; +/** @oa: oa observation subsystem */ struct xe_oa oa;drivers/gpu/drm/xe/xe_late_bind_fw.c new file +90
-0@@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2025 Intel Corporation +*/ + +#include <linux/component.h> +#include <linux/delay.h> + +#include <drm/drm_managed.h> +#include <drm/intel/i915_component.h> +#include <drm/intel/late_bind_mei_interface.h> +#include <drm/drm_print.h> + +#include "xe_device.h" +#include "xe_late_bind_fw.h" + +static struct xe_device * +late_bind_to_xe (struct xe_late_bind *late_bind) +{ + return container_of(late_bind, struct xe_device, late_bind); +} + +static int xe_late_bind_component_bind (struct device *xe_kdev, +struct device *mei_kdev,void *data) +{ +struct xe_device *xe =kdev_to_xe_device (xe_kdev); +struct xe_late_bind *late_bind = &xe->late_bind; + +mutex_lock (&late_bind->mutex); + late_bind->component.ops = data; + late_bind->component.mei_dev = mei_kdev; +mutex_unlock (&late_bind->mutex); + +return 0 ; +} + +static void xe_late_bind_component_unbind (struct device *xe_kdev, +struct device *mei_kdev,void *data) +{ +struct xe_device *xe =kdev_to_xe_device (xe_kdev); +struct xe_late_bind *late_bind = &xe->late_bind; + +mutex_lock (&late_bind->mutex); + late_bind->component.ops =NULL ; +mutex_unlock (&late_bind->mutex); +} + +static const struct component_ops xe_late_bind_component_ops = { + .bind = xe_late_bind_component_bind, + .unbind = xe_late_bind_component_unbind, +}; + +static void xe_late_bind_remove (void *arg) +{ +struct xe_late_bind *late_bind = arg; +struct xe_device *xe =late_bind_to_xe (late_bind); + +component_del (xe->drm.dev, &xe_late_bind_component_ops); +mutex_destroy (&late_bind->mutex); +} + +/** +* xe_late_bind_init() - add xe mei late binding component +* +* Return: 0 if the initialization was successful, a negative errno otherwise. +*/ +int xe_late_bind_init (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +int err; + +if (!xe->info.has_late_bind) +return 0 ; + +mutex_init (&late_bind->mutex); + +if (!IS_ENABLED (CONFIG_INTEL_MEI_LATE_BIND ) || !IS_ENABLED (CONFIG_INTEL_MEI_GSC )) { +drm_info (&xe->drm,"Can't init xe mei late bind missing mei component\n" ); +return -ENODEV ; + } + + err =component_add_typed (xe->drm.dev, &xe_late_bind_component_ops, +INTEL_COMPONENT_LATE_BIND ); +if (err <0 ) { +drm_info (&xe->drm,"Failed to add mei late bind component (%pe)\n" ,ERR_PTR (err)); +return err; + } + +return devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind); +}drivers/gpu/drm/xe/xe_late_bind_fw.h new file +15
-0@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2025 Intel Corporation +*/ + +#ifndef _XE_LATE_BIND_FW_H_ +#define _XE_LATE_BIND_FW_H_ + +#include <linux/types.h> + +struct xe_late_bind ; + +int xe_late_bind_init (struct xe_late_bind *late_bind); + +#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +23
-0@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2025 Intel Corporation +*/ + +#ifndef _XE_LATE_BIND_TYPES_H_ +#define _XE_LATE_BIND_TYPES_H_ + +#include <linux/iosys-map.h> +#include <linux/mutex.h> +#include <linux/types.h> + +/** + * struct xe_late_bind_component - Late Binding services component + * @mei_dev: device that provide Late Binding service. + * @ops: Ops implemented by Late Binding driver, used by Xe driver. + * + * Communication between Xe and MEI drivers for Late Binding services + */ +struct xe_late_bind_component { + /** @late_bind_component.mei_dev: mei device */ + struct device *mei_dev; + /** @late_bind_component.ops: late binding ops */
drivers/gpu/drm/xe/xe_late_bind_fw_types.h line 33
Quoted 10 lines
drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +10
-0+const struct late_bind_component_ops *ops; +}; + +/** +* struct xe_late_bind +*/ +struct xe_late_bind { +/** @late_bind.component: struct for communication with mei component */ +struct xe_late_bind_component component; +/** @late_bind.mutex: protects the component binding and usage */
Please, before submitting another re-spin of this series, refactor this mutex. This is absolutely not acceptable.
https://blog.ffwll.ch/2022/07/locking-engineering.html
This is protecting the code and not the data. If binding or usage happens you need to have other ways of dealing with it.
The lock needs to be reduced to the data you are trying to protect. Perhaps around the state/status or to certain register, but using a big mutex like you use in the patch 5 of this series and stating that it is to protect the code is not the right way.
Sorry for not having looked at this earlier.
Quoted 35 lines
drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +4
-0+ struct mutex mutex; +}; + +#endif drivers/gpu/drm/xe/xe_pci.c +3
-0@@ -66,6 +66,7 @@ struct xe_device_desc { u8 has_gsc_nvm:1; u8 has_heci_gscfi:1; u8 has_heci_cscfi:1; + u8 has_late_bind:1; u8 has_llc:1; u8 has_mbx_power_limits:1; u8 has_pxp:1;@@ -355,6 +356,7 @@ static const struct xe_device_desc bmg_desc = { .has_mbx_power_limits = true, .has_gsc_nvm = 1, .has_heci_cscfi = 1, + .has_late_bind = true, .needs_scratch = true, };@@ -600,6 +602,7 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.has_gsc_nvm = desc->has_gsc_nvm; xe->info.has_heci_gscfi = desc->has_heci_gscfi; xe->info.has_heci_cscfi = desc->has_heci_cscfi; + xe->info.has_late_bind = desc->has_late_bind; xe->info.has_llc = desc->has_llc; xe->info.has_pxp = desc->has_pxp; xe->info.has_sriov = desc->has_sriov;Signature · 1 line
2.34.1
Re: [PATCH v4 03/10] drm/xe/xe_late_bind_fw: Introducing xe_late_bind_fw
Quoted 261 lines · Rodrigo Vivi
Quoted 242 lines · Badal Nilawar
Introducing
xe_late_bind_fwto enable firmware loading for the devices, such as the fan controller, during the driver probe. Typically, firmware for such devices are part of IFWI flash image but can be replaced at probe after OEM tuning.
This patch binds mei late binding component to enable firmware loading.v2:
- Adddevm_add_action_or_resetto remove the component (Daniele)
- AddINTEL_MEI_GSCcheck inxe_late_bind_init()(Daniele)
v3:
- Fail driver probe if late bind initialization fails, addhas_late_bindflag (Daniele)
v4:
- %S/I915_COMPONENT_LATE_BIND/INTEL_COMPONENT_LATE_BIND/Reviewed-by Daniele Ceraolo Spurio <[email protected]>Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_device.c | 5 ++ drivers/gpu/drm/xe/xe_device_types.h | 6 ++ drivers/gpu/drm/xe/xe_late_bind_fw.c | 90 ++++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw.h | 15 ++++ drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 37 +++++++++ drivers/gpu/drm/xe/xe_pci.c | 3 + 7 files changed, 157 insertions(+)create mode 100644
drivers/gpu/drm/xe/xe_late_bind_fw.ccreate mode 100644drivers/gpu/drm/xe/xe_late_bind_fw.hcreate mode 100644drivers/gpu/drm/xe/xe_late_bind_fw_types.hdrivers/gpu/drm/xe/Makefile +1
-0@@ -76,6 +76,7 @@ xe-y += xe_bb.o \ xe_hw_fence.o \ xe_irq.o \ xe_lrc.o \ + xe_late_bind_fw.o \ xe_migrate.o \ xe_mmio.o \ xe_mocs.o \drivers/gpu/drm/xe/xe_device.c +5
-0@@ -44,6 +44,7 @@#include "xe_hw_engine_group.h" #include "xe_hwmon.h" #include "xe_irq.h" +#include "xe_late_bind_fw.h" #include "xe_memirq.h" #include "xe_mmio.h" #include "xe_module.h" @@ -889,6 +890,10 @@ int xe_device_probe(struct xe_device *xe)if (err)return err; + err =xe_late_bind_init (&xe->late_bind); +if (err && err != -ENODEV ) +return err; + err =xe_oa_init (xe);if (err)return err;drivers/gpu/drm/xe/xe_device_types.h +6
-0@@ -16,6 +16,7 @@#include "xe_devcoredump_types.h" #include "xe_heci_gsc.h" #include "xe_lmtt_types.h" +#include "xe_late_bind_fw_types.h" #include "xe_memirq_types.h" #include "xe_oa_types.h" #include "xe_platform_types.h" @@ -323,6 +324,8 @@ struct xe_device { u8 has_heci_cscfi:1;/** @info.has_heci_gscfi: device has heci gscfi */ u8 has_heci_gscfi:1; +/** @info.has_late_bind: Device has firmware late binding support */ + u8 has_late_bind:1;/** @info.has_llc: Device has a shared CPU+GPU last level cache */ u8 has_llc:1;/** @info.has_mbx_power_limits: Device has support to manage power limits using @@ -555,6 +558,9 @@ struct xe_device {/** @nvm: discrete graphics non-volatile memory */ struct intel_dg_nvm_dev *nvm; +/** @late_bind: xe mei late bind interface */ +struct xe_late_bind late_bind; +/** @oa: oa observation subsystem */ struct xe_oa oa;drivers/gpu/drm/xe/xe_late_bind_fw.c new file +90
-0@@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2025 Intel Corporation +*/ + +#include <linux/component.h> +#include <linux/delay.h> + +#include <drm/drm_managed.h> +#include <drm/intel/i915_component.h> +#include <drm/intel/late_bind_mei_interface.h> +#include <drm/drm_print.h> + +#include "xe_device.h" +#include "xe_late_bind_fw.h" + +static struct xe_device * +late_bind_to_xe (struct xe_late_bind *late_bind) +{ + return container_of(late_bind, struct xe_device, late_bind); +} + +static int xe_late_bind_component_bind (struct device *xe_kdev, +struct device *mei_kdev,void *data) +{ +struct xe_device *xe =kdev_to_xe_device (xe_kdev); +struct xe_late_bind *late_bind = &xe->late_bind; + +mutex_lock (&late_bind->mutex); + late_bind->component.ops = data; + late_bind->component.mei_dev = mei_kdev; +mutex_unlock (&late_bind->mutex); + +return 0 ; +} + +static void xe_late_bind_component_unbind (struct device *xe_kdev, +struct device *mei_kdev,void *data) +{ +struct xe_device *xe =kdev_to_xe_device (xe_kdev); +struct xe_late_bind *late_bind = &xe->late_bind; + +mutex_lock (&late_bind->mutex); + late_bind->component.ops =NULL ; +mutex_unlock (&late_bind->mutex); +} + +static const struct component_ops xe_late_bind_component_ops = { + .bind = xe_late_bind_component_bind, + .unbind = xe_late_bind_component_unbind, +}; + +static void xe_late_bind_remove (void *arg) +{ +struct xe_late_bind *late_bind = arg; +struct xe_device *xe =late_bind_to_xe (late_bind); + +component_del (xe->drm.dev, &xe_late_bind_component_ops); +mutex_destroy (&late_bind->mutex); +} + +/** +* xe_late_bind_init() - add xe mei late binding component +* +* Return: 0 if the initialization was successful, a negative errno otherwise. +*/ +int xe_late_bind_init (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +int err; + +if (!xe->info.has_late_bind) +return 0 ; + +mutex_init (&late_bind->mutex); + +if (!IS_ENABLED (CONFIG_INTEL_MEI_LATE_BIND ) || !IS_ENABLED (CONFIG_INTEL_MEI_GSC )) { +drm_info (&xe->drm,"Can't init xe mei late bind missing mei component\n" ); +return -ENODEV ; + } + + err =component_add_typed (xe->drm.dev, &xe_late_bind_component_ops, +INTEL_COMPONENT_LATE_BIND ); +if (err <0 ) { +drm_info (&xe->drm,"Failed to add mei late bind component (%pe)\n" ,ERR_PTR (err)); +return err; + } + +return devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind); +}drivers/gpu/drm/xe/xe_late_bind_fw.h new file +15
-0@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2025 Intel Corporation +*/ + +#ifndef _XE_LATE_BIND_FW_H_ +#define _XE_LATE_BIND_FW_H_ + +#include <linux/types.h> + +struct xe_late_bind ; + +int xe_late_bind_init (struct xe_late_bind *late_bind); + +#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +23
-0@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2025 Intel Corporation +*/ + +#ifndef _XE_LATE_BIND_TYPES_H_ +#define _XE_LATE_BIND_TYPES_H_ + +#include <linux/iosys-map.h> +#include <linux/mutex.h> +#include <linux/types.h> + +/** + * struct xe_late_bind_component - Late Binding services component + * @mei_dev: device that provide Late Binding service. + * @ops: Ops implemented by Late Binding driver, used by Xe driver. + * + * Communication between Xe and MEI drivers for Late Binding services + */ +struct xe_late_bind_component { + /** @late_bind_component.mei_dev: mei device */ + struct device *mei_dev; + /** @late_bind_component.ops: late binding ops */drivers/gpu/drm/xe/xe_late_bind_fw_types.h line 33
Quoted 10 lines
drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +10
-0+const struct late_bind_component_ops *ops; +}; + +/** +* struct xe_late_bind +*/ +struct xe_late_bind { +/** @late_bind.component: struct for communication with mei component */ +struct xe_late_bind_component component; +/** @late_bind.mutex: protects the component binding and usage */ Please, before submitting another re-spin of this series, refactor this mutex. This is absolutely not acceptable.
https://blog.ffwll.ch/2022/07/locking-engineering.html
This is protecting the code and not the data. If binding or usage happens you need to have other ways of dealing with it.
Quoted 6 lines
The lock needs to be reduced to the data you are trying to protect. Perhaps around the state/status or to certain register, but using a big mutex like you use in the patch 5 of this series and stating that it is to protect the code is not the right way.
Sorry for not having looked at this earlier.
Sure Rodrigo, I will try to refactor mutex. The intention was to prevent component removal during the push_config process and when a module unbind operation is performed This is how it is implemented for xe_gsc_proxy.c and all the components in i915.
I was considering alternatives like wait_event_timeout or wait_for_completion. However, since we are already using flushing the work in xe_late_bind_component_unbind, the above scenario is unlikely to occur.
Regards,
Badal
Quoted 36 lines
Quoted 36 lines
drivers/gpu/drm/xe/xe_late_bind_fw_types.h new file +4
-0+ struct mutex mutex; +}; + +#endif drivers/gpu/drm/xe/xe_pci.c +3
-0@@ -66,6 +66,7 @@ struct xe_device_desc { u8 has_gsc_nvm:1; u8 has_heci_gscfi:1; u8 has_heci_cscfi:1; + u8 has_late_bind:1; u8 has_llc:1; u8 has_mbx_power_limits:1; u8 has_pxp:1;@@ -355,6 +356,7 @@ static const struct xe_device_desc bmg_desc = { .has_mbx_power_limits = true, .has_gsc_nvm = 1, .has_heci_cscfi = 1, + .has_late_bind = true, .needs_scratch = true, };@@ -600,6 +602,7 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.has_gsc_nvm = desc->has_gsc_nvm; xe->info.has_heci_gscfi = desc->has_heci_gscfi; xe->info.has_heci_cscfi = desc->has_heci_cscfi; + xe->info.has_late_bind = desc->has_late_bind; xe->info.has_llc = desc->has_llc; xe->info.has_pxp = desc->has_pxp; xe->info.has_sriov = desc->has_sriov;Signature · 1 line
2.34.1
PATCH v4 4/10 drm/xe/xe_late_bind_fw: Initialize late binding firmware
In reply to Badal NilawarSearch for late binding firmware binaries and populate the meta data of firmware structures.
v2 (Daniele):
- drm_err if firmware size is more than max pay load size
- s/request_firmware/firmware_request_nowarn/ as firmware will not be available for all possible cards
v3 (Daniele):
- init firmware from within xe_late_bind_init, propagate error
- switch late_bind_fw to array to handle multiple firmware types
v4 (Daniele):
- Alloc payload dynamically, fix nits
--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 103 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 32 +++++++ 2 files changed, 134 insertions(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_late_bind_fw.c +102 -1
@@ -5,6 +5,7 @@#include <linux/component.h> #include <linux/delay.h> +#include <linux/firmware.h> #include <drm/drm_managed.h> #include <drm/intel/i915_component.h>
@@ -13,6 +14,16 @@#include "xe_device.h" #include "xe_late_bind_fw.h" +#include "xe_pcode.h" +#include "xe_pcode_api.h" + +static const u32 fw_id_to_type[] = { + [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL , + }; + +static const char *const fw_id_to_name[] = { + [XE_LB_FW_FAN_CONTROL ] ="fan_control" , + };static struct xe_device *late_bind_to_xe (struct xe_late_bind *late_bind)
@@ -20,6 +31,92 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_tile *root_tile =xe_device_get_root_tile (xe); +u32 uval; + +if (!xe_pcode_read (root_tile, +PCODE_MBOX (FAN_SPEED_CONTROL ,FSC_READ_NUM_FANS ,0 ), &uval,NULL )) +return uval; +else +return 0 ; +} + +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct pci_dev *pdev =to_pci_dev (xe->drm.dev); +struct xe_late_bind_fw *lb_fw; +const struct firmware *fw; +u32 num_fans; +int ret; + +if (fw_id >=XE_LB_FW_MAX_ID ) +return -EINVAL ; + + lb_fw = &late_bind->late_bind_fw[fw_id]; + + lb_fw->valid = false; + lb_fw->id = fw_id; + lb_fw->type = fw_id_to_type[lb_fw->id]; + lb_fw->flags &= ~CSC_LATE_BINDING_FLAGS_IS_PERSISTENT ; + +if (lb_fw->type ==CSC_LATE_BINDING_TYPE_FAN_CONTROL ) { + num_fans =xe_late_bind_fw_num_fans (late_bind); +drm_dbg (&xe->drm,"Number of Fans: %d\n" , num_fans); +if (!num_fans) +return 0 ; + } + +snprintf (lb_fw->blob_path,sizeof (lb_fw->blob_path),"xe/%s_8086_%04x_%04x_%04x.bin" , + fw_id_to_name[lb_fw->id], pdev->device, + pdev->subsystem_vendor, pdev->subsystem_device); + +drm_dbg (&xe->drm,"Request late binding firmware %s\n" , lb_fw->blob_path); + ret =firmware_request_nowarn (&fw, lb_fw->blob_path, xe->drm.dev); +if (ret) { +drm_dbg (&xe->drm,"%s late binding fw not available for current device" , + fw_id_to_name[lb_fw->id]); +return 0 ; + } + +if (fw->size >MAX_PAYLOAD_SIZE ) { +drm_err (&xe->drm,"Firmware %s size %zu is larger than max pay load size %u\n" , + lb_fw->blob_path, fw->size,MAX_PAYLOAD_SIZE ); +release_firmware (fw); +return -ENODATA ; + } + + lb_fw->payload =drmm_kzalloc (&xe->drm, lb_fw->payload_size,GFP_KERNEL ); +if (!lb_fw->payload) { +release_firmware (fw); +return -ENOMEM ; + } + + lb_fw->payload_size = fw->size; + +memcpy (lb_fw->payload, fw->data, lb_fw->payload_size); +release_firmware (fw); + lb_fw->valid = true; + +return 0 ; +} + +static int xe_late_bind_fw_init (struct xe_late_bind *late_bind) +{ +int ret; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + ret =__xe_late_bind_fw_init (late_bind, fw_id); +if (ret) +return ret; + } +return 0 ; +} +static int xe_late_bind_component_bind (struct device *xe_kdev,struct device *mei_kdev,void *data) {
@@ -86,5 +183,9 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } -return devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind); + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind); +if (err) +return err; + +return xe_late_bind_fw_init (late_bind); }
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +32 -0
@@ -10,6 +10,36 @@#include <linux/mutex.h> #include <linux/types.h> +#define MAX_PAYLOAD_SIZE SZ_4K + +/** +* xe_late_bind_fw_id - enum to determine late binding fw index +*/ +enum xe_late_bind_fw_id { +XE_LB_FW_FAN_CONTROL =0 , +XE_LB_FW_MAX_ID +}; + +/** +* struct xe_late_bind_fw +*/ +struct xe_late_bind_fw { +/** @late_bind_fw.valid: to check if fw is valid */ +bool valid; +/** @late_bind_fw.id: firmware index */ +u32 id; +/** @late_bind_fw.blob_path: firmware binary path */ +char blob_path[PATH_MAX ]; +/** @late_bind_fw.type: firmware type */ +u32 type; +/** @late_bind_fw.flags: firmware flags */ +u32 flags; +/** @late_bind_fw.payload: to store the late binding blob */ +u8 *payload; +/** @late_bind_fw.payload_size: late binding blob payload_size */ +size_t payload_size; +}; +/** * struct xe_late_bind_component - Late Binding services component * @mei_dev: device that provide Late Binding service.
@@ -32,6 +62,8 @@ struct xe_late_bind {struct xe_late_bind_component component;/** @late_bind.mutex: protects the component binding and usage */ struct mutex mutex; +/** @late_bind.late_bind_fw: late binding firmware array */ + struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID]; };#endif
Signature · 1 line
2.34.1
Re: [PATCH v4 04/10] drm/xe/xe_late_bind_fw: Initialize late binding firmware
Quoted 101 lines · Badal Nilawar
Search for late binding firmware binaries and populate the meta data of firmware structures.
v2 (Daniele):
-drm_errif firmware size is more than max pay load size
- s/request_firmware/firmware_request_nowarn/ as firmware will not be available for all possible cards
v3 (Daniele):
- init firmware from withinxe_late_bind_init, propagate error
- switchlate_bind_fwto array to handle multiple firmware types
v4 (Daniele):
- Alloc payload dynamically, fix nitsSigned-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 103 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 32 +++++++ 2 files changed, 134 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +60
-0@@ -5,6 +5,7 @@#include <linux/component.h> #include <linux/delay.h> +#include <linux/firmware.h> #include <drm/drm_managed.h> #include <drm/intel/i915_component.h> @@ -13,6 +14,16 @@#include "xe_device.h" #include "xe_late_bind_fw.h" +#include "xe_pcode.h" +#include "xe_pcode_api.h" + +static const u32 fw_id_to_type[] = { + [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL , + }; + +static const char *const fw_id_to_name[] = { + [XE_LB_FW_FAN_CONTROL ] ="fan_control" , + };static struct xe_device *late_bind_to_xe (struct xe_late_bind *late_bind)@@ -20,6 +31,92 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_tile *root_tile =xe_device_get_root_tile (xe); +u32 uval; + +if (!xe_pcode_read (root_tile, +PCODE_MBOX (FAN_SPEED_CONTROL ,FSC_READ_NUM_FANS ,0 ), &uval,NULL )) +return uval; +else +return 0 ; +} + +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct pci_dev *pdev =to_pci_dev (xe->drm.dev); +struct xe_late_bind_fw *lb_fw; +const struct firmware *fw; +u32 num_fans; +int ret; + +if (fw_id >=XE_LB_FW_MAX_ID ) +return -EINVAL ; + + lb_fw = &late_bind->late_bind_fw[fw_id]; + + lb_fw->valid = false; + lb_fw->id = fw_id; + lb_fw->type = fw_id_to_type[lb_fw->id]; + lb_fw->flags &= ~CSC_LATE_BINDING_FLAGS_IS_PERSISTENT ; + +if (lb_fw->type ==CSC_LATE_BINDING_TYPE_FAN_CONTROL ) { + num_fans =xe_late_bind_fw_num_fans (late_bind); +drm_dbg (&xe->drm,"Number of Fans: %d\n" , num_fans); +if (!num_fans) +return 0 ; + } + +snprintf (lb_fw->blob_path,sizeof (lb_fw->blob_path),"xe/%s_8086_%04x_%04x_%04x.bin" , + fw_id_to_name[lb_fw->id], pdev->device, + pdev->subsystem_vendor, pdev->subsystem_device); + +drm_dbg (&xe->drm,"Request late binding firmware %s\n" , lb_fw->blob_path); + ret =firmware_request_nowarn (&fw, lb_fw->blob_path, xe->drm.dev); +if (ret) { +drm_dbg (&xe->drm,"%s late binding fw not available for current device" , + fw_id_to_name[lb_fw->id]); +return 0 ;
drivers/gpu/drm/xe/xe_late_bind_fw.c late_bind_to_xe(struct xe_late_bind *late_bind) · line 92
Quoted 10 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +10
-0+ } + +if (fw->size >MAX_PAYLOAD_SIZE ) { +drm_err (&xe->drm,"Firmware %s size %zu is larger than max pay load size %u\n" , + lb_fw->blob_path, fw->size,MAX_PAYLOAD_SIZE ); +release_firmware (fw); +return -ENODATA ; + } + + lb_fw->payload =drmm_kzalloc (&xe->drm, lb_fw->payload_size,GFP_KERNEL );
here you're using lb_fw->payload_size before assigning it.
drivers/gpu/drm/xe/xe_late_bind_fw.c late_bind_to_xe(struct xe_late_bind *late_bind) · line 102
Quoted 10 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +10
-0+if (!lb_fw->payload) { +release_firmware (fw); +return -ENOMEM ; + } + + lb_fw->payload_size = fw->size; + +memcpy (lb_fw->payload, fw->data, lb_fw->payload_size); +release_firmware (fw); + lb_fw->valid = true;
You can now use lb_fw->payload to check if the FW is valid, no need for a separate variable. not a blocker.
Quoted 55 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +22
-1+ +return 0 ; +} + +static int xe_late_bind_fw_init (struct xe_late_bind *late_bind) +{ +int ret; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + ret =__xe_late_bind_fw_init (late_bind, fw_id); +if (ret) +return ret; + } +return 0 ; +} +static int xe_late_bind_component_bind (struct device *xe_kdev,struct device *mei_kdev,void *data) {@@ -86,5 +183,9 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } -return devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind); + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind); +if (err) +return err; + +return xe_late_bind_fw_init (late_bind); }drivers/gpu/drm/xe/xe_late_bind_fw_types.h +16
-0@@ -10,6 +10,36 @@#include <linux/mutex.h> #include <linux/types.h> +#define MAX_PAYLOAD_SIZE SZ_4K + +/** +* xe_late_bind_fw_id - enum to determine late binding fw index +*/ +enum xe_late_bind_fw_id { +XE_LB_FW_FAN_CONTROL =0 , +XE_LB_FW_MAX_ID +}; + +/** +* struct xe_late_bind_fw +*/ +struct xe_late_bind_fw { +/** @late_bind_fw.valid: to check if fw is valid */ +bool valid;
drivers/gpu/drm/xe/xe_late_bind_fw_types.h line 38
Quoted 10 lines
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +10
-0+/** @late_bind_fw.id: firmware index */ +u32 id; +/** @late_bind_fw.blob_path: firmware binary path */ +char blob_path[PATH_MAX ]; +/** @late_bind_fw.type: firmware type */ +u32 type; +/** @late_bind_fw.flags: firmware flags */ +u32 flags; +/** @late_bind_fw.payload: to store the late binding blob */ +u8 *payload;
Why a u8 pointer and not a void one?
Daniele
Quoted 16 lines
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +6
-0+/** @late_bind_fw.payload_size: late binding blob payload_size */ +size_t payload_size; +}; +/** * struct xe_late_bind_component - Late Binding services component * @mei_dev: device that provide Late Binding service. @@ -32,6 +62,8 @@ struct xe_late_bind {struct xe_late_bind_component component;/** @late_bind.mutex: protects the component binding and usage */ struct mutex mutex; +/** @late_bind.late_bind_fw: late binding firmware array */ + struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID]; };#endif
Re: [PATCH v4 04/10] drm/xe/xe_late_bind_fw: Initialize late binding firmware
Quoted 110 lines · Daniele Ceraolo Spurio
Quoted 107 lines · Badal Nilawar
Search for late binding firmware binaries and populate the meta data of firmware structures.
v2 (Daniele):
-drm_errif firmware size is more than max pay load size
- s/request_firmware/firmware_request_nowarn/ as firmware will not be available for all possible cards
v3 (Daniele):
- init firmware from withinxe_late_bind_init, propagate error
- switchlate_bind_fwto array to handle multiple firmware types v4 (Daniele):
- Alloc payload dynamically, fix nitsSigned-off-by Badal Nilawar <[email protected]>---
drivers/gpu/drm/xe/xe_late_bind_fw.c | 103 ++++++++++++++++++++-drivers/gpu/drm/xe/xe_late_bind_fw_types.h| 32 +++++++2 files changed, 134 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +11
-0@@ -5,6 +5,7 @@ #include <linux/component.h> #include <linux/delay.h> +#include <linux/firmware.h> #include <drm/drm_managed.h> #include <drm/intel/i915_component.h>@@ -13,6 +14,16 @@ #include "xe_device.h" #include "xe_late_bind_fw.h" +#include "xe_pcode.h" +#include "xe_pcode_api.h" + +static const u32 fw_id_to_type[] = { + [XE_LB_FW_FAN_CONTROL] = CSC_LATE_BINDING_TYPE_FAN_CONTROL, + }; + +static const char *const fw_id_to_name[] = { + [XE_LB_FW_FAN_CONTROL] = "fan_control", + };static struct
xe_device*
late_bind_to_xe(struct xe_late_bind *late_bind)drivers/gpu/drm/xe/xe_late_bind_fw.c +43
-0@@ -20,6 +31,92 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind) +{ + struct xe_device *xe = late_bind_to_xe(late_bind); + struct xe_tile *root_tile = xe_device_get_root_tile(xe); + u32 uval; + + if (!xe_pcode_read(root_tile, + PCODE_MBOX(FAN_SPEED_CONTROL, FSC_READ_NUM_FANS, 0), &uval,NULL )) + return uval; + else + return 0; +} + +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) +{ + struct xe_device *xe = late_bind_to_xe(late_bind); + struct pci_dev *pdev = to_pci_dev(xe->drm.dev); + struct xe_late_bind_fw *lb_fw; + const struct firmware *fw; + u32 num_fans; + int ret; + + if (fw_id >= XE_LB_FW_MAX_ID) + return -EINVAL; + + lb_fw = &late_bind->late_bind_fw[fw_id]; + + lb_fw->valid = false; + lb_fw->id = fw_id; + lb_fw->type = fw_id_to_type[lb_fw->id]; + lb_fw->flags &= ~CSC_LATE_BINDING_FLAGS_IS_PERSISTENT; + + if (lb_fw->type == CSC_LATE_BINDING_TYPE_FAN_CONTROL) { + num_fans = xe_late_bind_fw_num_fans(late_bind); + drm_dbg(&xe->drm, "Number of Fans: %d\n", num_fans); + if (!num_fans) + return 0; + } + + snprintf(lb_fw->blob_path, sizeof(lb_fw->blob_path),"xe/%s_8086_%04x_%04x_%04x.bin" , + fw_id_to_name[lb_fw->id], pdev->device, + pdev->subsystem_vendor, pdev->subsystem_device); + + drm_dbg(&xe->drm, "Request late binding firmware %s\n",
lb_fw->blob_path);
+ ret =firmware_request_nowarn(&fw, lb_fw->blob_path, xe->drm.dev); + if (ret) {
+ drm_dbg(&xe->drm, "%s late binding fw not available for current device",
+ fw_id_to_name[lb_fw->id]);
+ return 0;
+ }
+
+ if (fw->size>MAX_PAYLOAD_SIZE) {
+ drm_err(&xe->drm, "Firmware %s size %zu is larger than max pay load size %u\n",
+lb_fw->blob_path,fw->size,MAX_PAYLOAD_SIZE);
Quoted 8 lines
Quoted 6 lines
+
release_firmware(fw);
+ return-ENODATA;
+ }
+
+lb_fw->payload=drmm_kzalloc(&xe->drm, lb_fw->payload_size, GFP_KERNEL);here you're using
lb_fw->payload_sizebefore assigning it.
My bad, I will fix it. But I'm curious why drmm_kzalloc, unlike kzalloc, doesn't perform a size=0 check. When size=0, kzalloc returns ZERO_SIZE_POINTER, which is absent in drmm_kzalloc. Even if drmm_kzalloc had returned ZERO_SIZE_POINTER, the check below wouldn't have caught it.
Quoted 13 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c late_bind_to_xe(struct xe_late_bind *late_bind) · line 102
Quoted 11 lines
+ if (!lb_fw->payload) {
+release_firmware(fw);
+ return-ENOMEM;
+ }drivers/gpu/drm/xe/xe_late_bind_fw.c +6
-0+ + lb_fw->payload_size = fw->size; + + memcpy(lb_fw->payload, fw->data, lb_fw->payload_size); + release_firmware(fw); + lb_fw->valid = true;You can now use
lb_fw->payloadto check if the FW is valid, no need for a separate variable. not a blocker.
Sure.
Quoted 59 lines
Quoted 59 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +17
-0+ + return 0; +} + +static int xe_late_bind_fw_init (struct xe_late_bind *late_bind) +{ + int ret; + int fw_id; + + for (fw_id = 0; fw_id < XE_LB_FW_MAX_ID; fw_id++) { + ret = __xe_late_bind_fw_init(late_bind, fw_id); + if (ret) + return ret; + } + return 0; +} +static int
xe_late_bind_component_bind(struct device *xe_kdev, struct device *mei_kdev, void *data){drivers/gpu/drm/xe/xe_late_bind_fw.c +5
-0@@ -86,5 +183,9 @@ int xe_late_bind_init(struct xe_late_bind *late_bind) return err; } - return devm_add_action_or_reset(xe->drm.dev, xe_late_bind_remove, late_bind); + err = devm_add_action_or_reset(xe->drm.dev, xe_late_bind_remove, late_bind); + if (err) + return err; + + return xe_late_bind_fw_init(late_bind);}
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +0
-0@@ -10,6 +10,36 @@ #include <linux/mutex.h> #include <linux/types.h>+#define
MAX_PAYLOAD_SIZESZ_4Kdrivers/gpu/drm/xe/xe_late_bind_fw_types.h +19
-0+ +/** +* xe_late_bind_fw_id - enum to determine late binding fw index +*/ +enum xe_late_bind_fw_id { + XE_LB_FW_FAN_CONTROL = 0, + XE_LB_FW_MAX_ID +}; + +/** +* struct xe_late_bind_fw +*/ +struct xe_late_bind_fw { + /** @late_bind_fw.valid: to check if fw is valid */ + bool valid; + /** @late_bind_fw.id: firmware index */ + u32 id; + /** @late_bind_fw.blob_path: firmware binary path */ + char blob_path[PATH_MAX];
Quoted 8 lines
Quoted 6 lines
+ /** @late_bind_fw.type: firmware type */
+ u32 type;
+ /** @late_bind_fw.flags: firmware flags */
+ u32 flags;
+ /** @late_bind_fw.payload: to store the late binding blob */ + u8 *payload;Why a u8 pointer and not a void one?
It should have been const u8 * as firmware structure has uses const u8 *.
struct firmware {
size_t size;
const u8 *data;
/* firmware loader private fields */
void *priv;
};
Badal
Quoted 18 lines
Daniele
Quoted 15 lines
+ /** @late_bind_fw.payload_size: late binding blob
payload_size*/ +size_tpayload_size;drivers/gpu/drm/xe/xe_late_bind_fw_types.h +2
-0+}; +/**
* structxe_late_bind_component- Late Binding services component
* @mei_dev: device that provide Late Binding service.drivers/gpu/drm/xe/xe_late_bind_fw_types.h +2
-0@@ -32,6 +62,8 @@ struct xe_late_bind { struct xe_late_bind_component component; /** @late_bind.mutex: protects the component binding and usage */ struct mutex mutex; + /** @late_bind.late_bind_fw: late binding firmware array */ + struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID]; }; #endif
PATCH v4 5/10 drm/xe/xe_late_bind_fw: Load late binding firmware
In reply to Badal NilawarLoad late binding firmware
v2:
- s/EAGAIN/EBUSY/
- Flush worker in suspend and driver unload (Daniele)
v3:
- Use retry interval of 6s, in steps of 200ms, to allow other OS components release MEI CL handle (Sasha)
v4:
- return -ENODEV if component not added (Daniele)
- parse and print status returned by csc
- Use xe_pm_get_if_in_active (Daniele)
--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 149 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 7 + 3 files changed, 156 insertions(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_late_bind_fw.c +148 -1
@@ -16,6 +16,20 @@#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pcode_api.h" +#include "xe_pm.h" + +/* +* The component should load quite quickly in most cases, but it could take +* a bit. Using a very big timeout just to cover the worst case scenario +*/ +#define LB_INIT_TIMEOUT_MS 20000 + +/* +* Retry interval set to 6 seconds, in steps of 200 ms, to allow time for +* other OS components to release the MEI CL handle +*/ +#define LB_FW_LOAD_RETRY_MAXCOUNT 30 +#define LB_FW_LOAD_RETRY_PAUSE_MS 200static const u32 fw_id_to_type[] = { [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL ,
@@ -31,6 +45,30 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static const char *xe_late_bind_parse_status (uint32_t status) +{ +switch (status) { +case CSC_LATE_BINDING_STATUS_SUCCESS : +return "success" ; +case CSC_LATE_BINDING_STATUS_4ID_MISMATCH : +return "4Id Mismatch" ; +case CSC_LATE_BINDING_STATUS_ARB_FAILURE : +return "ARB Failure" ; +case CSC_LATE_BINDING_STATUS_GENERAL_ERROR : +return "General Error" ; +case CSC_LATE_BINDING_STATUS_INVALID_PARAMS : +return "Invalid Params" ; +case CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE : +return "Invalid Signature" ; +case CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD : +return "Invalid Payload" ; +case CSC_LATE_BINDING_STATUS_TIMEOUT : +return "Timeout" ; +default : +return "Unknown error" ; + } +} +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);
@@ -44,6 +82,93 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } +static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_late_bind_fw *lbfw; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid && late_bind->wq) { +drm_dbg (&xe->drm,"Flush work: load %s firmware\n" , + fw_id_to_name[lbfw->id]); +flush_work (&lbfw->work); + } + } +} + +static void xe_late_bind_work (struct work_struct *work) +{ + struct xe_late_bind_fw *lbfw = container_of(work, struct xe_late_bind_fw, work); + struct xe_late_bind *late_bind = container_of(lbfw, struct xe_late_bind, + late_bind_fw[lbfw->id]); +struct xe_device *xe =late_bind_to_xe (late_bind); +int retry =LB_FW_LOAD_RETRY_MAXCOUNT ; +int ret; +int slept; + +/* we can queue this before the component is bound */ +for (slept =0 ; slept <LB_INIT_TIMEOUT_MS ; slept +=100 ) { +if (late_bind->component.ops) +break ; +msleep (100 ); + } + +if (!xe_pm_runtime_get_if_active (xe)) +return ; + +mutex_lock (&late_bind->mutex); + +if (!late_bind->component.ops) { +drm_err (&xe->drm,"Late bind component not bound\n" ); + goto out; + } + +drm_dbg (&xe->drm,"Load %s firmware\n" , fw_id_to_name[lbfw->id]); + +do { + ret = late_bind->component.ops->push_config (late_bind->component.mei_dev, + lbfw->type, lbfw->flags, + lbfw->payload, lbfw->payload_size); +if (!ret) +break ; +msleep (LB_FW_LOAD_RETRY_PAUSE_MS ); + }while (--retry && ret == -EBUSY ); + +if (!ret) { +drm_dbg (&xe->drm,"Load %s firmware successful\n" , + fw_id_to_name[lbfw->id]); + goto out; + } + +if (ret >0 ) +drm_err (&xe->drm,"Load %s firmware failed with err %d, %s\n" , + fw_id_to_name[lbfw->id], ret,xe_late_bind_parse_status (ret)); +else +drm_err (&xe->drm,"Load %s firmware failed with err %d" , + fw_id_to_name[lbfw->id], ret); +out: +mutex_unlock (&late_bind->mutex); +xe_pm_runtime_put (xe); +} + +int xe_late_bind_fw_load (struct xe_late_bind *late_bind) +{ +struct xe_late_bind_fw *lbfw; +int fw_id; + +if (!late_bind->component_added) +return -ENODEV ; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid) +queue_work (late_bind->wq, &lbfw->work); + } +return 0 ; +} +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) {struct xe_device *xe =late_bind_to_xe (late_bind);
@@ -99,6 +224,7 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw); +INIT_WORK (&lb_fw->work, xe_late_bind_work); lb_fw->valid = true;return 0 ;
@@ -109,11 +235,16 @@ static int xe_late_bind_fw_init(struct xe_late_bind *late_bind)int ret;int fw_id; + late_bind->wq =alloc_ordered_workqueue ("late-bind-ordered-wq" ,0 ); +if (!late_bind->wq) +return -ENOMEM ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { ret =__xe_late_bind_fw_init (late_bind, fw_id);if (ret)return ret; } +return 0 ; }
@@ -137,6 +268,8 @@ static void xe_late_bind_component_unbind(struct device *xe_kdev,struct xe_device *xe =kdev_to_xe_device (xe_kdev);struct xe_late_bind *late_bind = &xe->late_bind; +xe_late_bind_wait_for_worker_completion (late_bind); +mutex_lock (&late_bind->mutex); late_bind->component.ops =NULL ;mutex_unlock (&late_bind->mutex);
@@ -152,7 +285,15 @@ static void xe_late_bind_remove(void *arg)struct xe_late_bind *late_bind = arg;struct xe_device *xe =late_bind_to_xe (late_bind); +xe_late_bind_wait_for_worker_completion (late_bind); + + late_bind->component_added = false; +component_del (xe->drm.dev, &xe_late_bind_component_ops); +if (late_bind->wq) { +destroy_workqueue (late_bind->wq); + late_bind->wq =NULL ; + }mutex_destroy (&late_bind->mutex); }
@@ -183,9 +324,15 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } + late_bind->component_added = true; + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind);if (err)return err; -return xe_late_bind_fw_init (late_bind); + err =xe_late_bind_fw_init (late_bind); +if (err) +return err; + +return xe_late_bind_fw_load (late_bind); }
drivers/gpu/drm/xe/xe_late_bind_fw.h +1 -0
@@ -11,5 +11,6 @@struct xe_late_bind ;int xe_late_bind_init (struct xe_late_bind *late_bind); +int xe_late_bind_fw_load (struct xe_late_bind *late_bind);#endif
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +7 -0
@@ -9,6 +9,7 @@#include <linux/iosys-map.h> #include <linux/mutex.h> #include <linux/types.h> +#include <linux/workqueue.h> #define MAX_PAYLOAD_SIZE SZ_4K
@@ -38,6 +39,8 @@ struct xe_late_bind_fw {u8 *payload;/** @late_bind_fw.payload_size: late binding blob payload_size */ size_t payload_size; +/** @late_bind_fw.work: worker to upload latebind blob */ +struct work_struct work; };/**
@@ -64,6 +67,10 @@ struct xe_late_bind {struct mutex mutex;/** @late_bind.late_bind_fw: late binding firmware array */ struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID ]; +/** @late_bind.wq: workqueue to submit request to download late bind blob */ +struct workqueue_struct *wq; +/** @late_bind.component_added: whether the component has been added */ + bool component_added; };#endif
Signature · 1 line
2.34.1
Rodrigo Vivi
maintainerRe: [PATCH v4 05/10] drm/xe/xe_late_bind_fw: Load late binding firmware
Quoted 12 lines · Badal Nilawar
Load late binding firmware
v2:
- s/EAGAIN/EBUSY/
- Flush worker in suspend and driver unload (Daniele)
v3:
- Use retry interval of 6s, in steps of 200ms, to allow other OS components release MEI CL handle (Sasha)
v4:
- return-ENODEVif component not added (Daniele)
- parse and print status returned by csc
- Usexe_pm_get_if_in_active(Daniele)
The worker is considered outer bound and it is safe to use xe_pm_runtime_get which takes the reference and resume synchronously.
Otherwise, if using get_if_active you need to reschedule the work or you lose your job.
Quoted 271 lines
Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 149 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 7 + 3 files changed, 156 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +148
-1@@ -16,6 +16,20 @@#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pcode_api.h" +#include "xe_pm.h" + +/* +* The component should load quite quickly in most cases, but it could take +* a bit. Using a very big timeout just to cover the worst case scenario +*/ +#define LB_INIT_TIMEOUT_MS 20000 + +/* +* Retry interval set to 6 seconds, in steps of 200 ms, to allow time for +* other OS components to release the MEI CL handle +*/ +#define LB_FW_LOAD_RETRY_MAXCOUNT 30 +#define LB_FW_LOAD_RETRY_PAUSE_MS 200static const u32 fw_id_to_type[] = { [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL ,@@ -31,6 +45,30 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static const char *xe_late_bind_parse_status (uint32_t status) +{ +switch (status) { +case CSC_LATE_BINDING_STATUS_SUCCESS : +return "success" ; +case CSC_LATE_BINDING_STATUS_4ID_MISMATCH : +return "4Id Mismatch" ; +case CSC_LATE_BINDING_STATUS_ARB_FAILURE : +return "ARB Failure" ; +case CSC_LATE_BINDING_STATUS_GENERAL_ERROR : +return "General Error" ; +case CSC_LATE_BINDING_STATUS_INVALID_PARAMS : +return "Invalid Params" ; +case CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE : +return "Invalid Signature" ; +case CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD : +return "Invalid Payload" ; +case CSC_LATE_BINDING_STATUS_TIMEOUT : +return "Timeout" ; +default : +return "Unknown error" ; + } +} +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -44,6 +82,93 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } +static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_late_bind_fw *lbfw; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid && late_bind->wq) { +drm_dbg (&xe->drm,"Flush work: load %s firmware\n" , + fw_id_to_name[lbfw->id]); +flush_work (&lbfw->work); + } + } +} + +static void xe_late_bind_work (struct work_struct *work) +{ + struct xe_late_bind_fw *lbfw = container_of(work, struct xe_late_bind_fw, work); + struct xe_late_bind *late_bind = container_of(lbfw, struct xe_late_bind, + late_bind_fw[lbfw->id]); +struct xe_device *xe =late_bind_to_xe (late_bind); +int retry =LB_FW_LOAD_RETRY_MAXCOUNT ; +int ret; +int slept; + +/* we can queue this before the component is bound */ +for (slept =0 ; slept <LB_INIT_TIMEOUT_MS ; slept +=100 ) { +if (late_bind->component.ops) +break ; +msleep (100 ); + } + +if (!xe_pm_runtime_get_if_active (xe)) +return ; + +mutex_lock (&late_bind->mutex); + +if (!late_bind->component.ops) { +drm_err (&xe->drm,"Late bind component not bound\n" ); + goto out; + } + +drm_dbg (&xe->drm,"Load %s firmware\n" , fw_id_to_name[lbfw->id]); + +do { + ret = late_bind->component.ops->push_config (late_bind->component.mei_dev, + lbfw->type, lbfw->flags, + lbfw->payload, lbfw->payload_size); +if (!ret) +break ; +msleep (LB_FW_LOAD_RETRY_PAUSE_MS ); + }while (--retry && ret == -EBUSY ); + +if (!ret) { +drm_dbg (&xe->drm,"Load %s firmware successful\n" , + fw_id_to_name[lbfw->id]); + goto out; + } + +if (ret >0 ) +drm_err (&xe->drm,"Load %s firmware failed with err %d, %s\n" , + fw_id_to_name[lbfw->id], ret,xe_late_bind_parse_status (ret)); +else +drm_err (&xe->drm,"Load %s firmware failed with err %d" , + fw_id_to_name[lbfw->id], ret); +out: +mutex_unlock (&late_bind->mutex); +xe_pm_runtime_put (xe); +} + +int xe_late_bind_fw_load (struct xe_late_bind *late_bind) +{ +struct xe_late_bind_fw *lbfw; +int fw_id; + +if (!late_bind->component_added) +return -ENODEV ; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid) +queue_work (late_bind->wq, &lbfw->work); + } +return 0 ; +} +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -99,6 +224,7 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw); +INIT_WORK (&lb_fw->work, xe_late_bind_work); lb_fw->valid = true;return 0 ;@@ -109,11 +235,16 @@ static int xe_late_bind_fw_init(struct xe_late_bind *late_bind)int ret;int fw_id; + late_bind->wq =alloc_ordered_workqueue ("late-bind-ordered-wq" ,0 ); +if (!late_bind->wq) +return -ENOMEM ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { ret =__xe_late_bind_fw_init (late_bind, fw_id);if (ret)return ret; } +return 0 ; }@@ -137,6 +268,8 @@ static void xe_late_bind_component_unbind(struct device *xe_kdev,struct xe_device *xe =kdev_to_xe_device (xe_kdev);struct xe_late_bind *late_bind = &xe->late_bind; +xe_late_bind_wait_for_worker_completion (late_bind); +mutex_lock (&late_bind->mutex); late_bind->component.ops =NULL ;mutex_unlock (&late_bind->mutex);@@ -152,7 +285,15 @@ static void xe_late_bind_remove(void *arg)struct xe_late_bind *late_bind = arg;struct xe_device *xe =late_bind_to_xe (late_bind); +xe_late_bind_wait_for_worker_completion (late_bind); + + late_bind->component_added = false; +component_del (xe->drm.dev, &xe_late_bind_component_ops); +if (late_bind->wq) { +destroy_workqueue (late_bind->wq); + late_bind->wq =NULL ; + }mutex_destroy (&late_bind->mutex); }@@ -183,9 +324,15 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } + late_bind->component_added = true; + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind);if (err)return err; -return xe_late_bind_fw_init (late_bind); + err =xe_late_bind_fw_init (late_bind); +if (err) +return err; + +return xe_late_bind_fw_load (late_bind); }drivers/gpu/drm/xe/xe_late_bind_fw.h +1
-0@@ -11,5 +11,6 @@struct xe_late_bind ;int xe_late_bind_init (struct xe_late_bind *late_bind); +int xe_late_bind_fw_load (struct xe_late_bind *late_bind);#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h +7
-0@@ -9,6 +9,7 @@#include <linux/iosys-map.h> #include <linux/mutex.h> #include <linux/types.h> +#include <linux/workqueue.h> #define MAX_PAYLOAD_SIZE SZ_4K@@ -38,6 +39,8 @@ struct xe_late_bind_fw {u8 *payload;/** @late_bind_fw.payload_size: late binding blob payload_size */ size_t payload_size; +/** @late_bind_fw.work: worker to upload latebind blob */ +struct work_struct work; };/** @@ -64,6 +67,10 @@ struct xe_late_bind {struct mutex mutex;/** @late_bind.late_bind_fw: late binding firmware array */ struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID ]; +/** @late_bind.wq: workqueue to submit request to download late bind blob */ +struct workqueue_struct *wq; +/** @late_bind.component_added: whether the component has been added */ + bool component_added; };#endif Signature · 1 line
2.34.1
Re: [PATCH v4 05/10] drm/xe/xe_late_bind_fw: Load late binding firmware
Quoted 13 lines · Rodrigo Vivi
Quoted 12 lines · Badal Nilawar
Load late binding firmware
v2:
- s/EAGAIN/EBUSY/
- Flush worker in suspend and driver unload (Daniele)
v3:
- Use retry interval of 6s, in steps of 200ms, to allow other OS components release MEI CL handle (Sasha)
v4:
- return-ENODEVif component not added (Daniele)
- parse and print status returned by csc
- Usexe_pm_get_if_in_active(Daniele)
Quoted 6 lines
The worker is considered outer bound and it is safe to use
xe_pm_runtime_getwhich takes the reference and resume synchronously.Otherwise, if using
get_if_activeyou need to reschedule the work or you lose your job.
The issue is that the next patch adds code to re-queue the work from the rpm resume path, so if we do a sync resume here the worker will re-queue itself immediately when not needed. Also, when the re-queued work runs it might end up doing another sync resume and re-queuing itself once more. However, in the next patch we do also have a flush of the work in the rpm_suspend path, so maybe the worker running when we are rpm suspended is not actually a possible case? Also, thinking about this more, that re-queuing on rpm resume only happens if d3cold is allowed, so when d3cold is not allowed we do want to proceed here we can actually reach here when rpm suspended.
Quoted 121 lines
Quoted 121 lines
Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 149 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 7 + 3 files changed, 156 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +91
-0@@ -16,6 +16,20 @@#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pcode_api.h" +#include "xe_pm.h" + +/* +* The component should load quite quickly in most cases, but it could take +* a bit. Using a very big timeout just to cover the worst case scenario +*/ +#define LB_INIT_TIMEOUT_MS 20000 + +/* +* Retry interval set to 6 seconds, in steps of 200 ms, to allow time for +* other OS components to release the MEI CL handle +*/ +#define LB_FW_LOAD_RETRY_MAXCOUNT 30 +#define LB_FW_LOAD_RETRY_PAUSE_MS 200static const u32 fw_id_to_type[] = { [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL ,@@ -31,6 +45,30 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static const char *xe_late_bind_parse_status (uint32_t status) +{ +switch (status) { +case CSC_LATE_BINDING_STATUS_SUCCESS : +return "success" ; +case CSC_LATE_BINDING_STATUS_4ID_MISMATCH : +return "4Id Mismatch" ; +case CSC_LATE_BINDING_STATUS_ARB_FAILURE : +return "ARB Failure" ; +case CSC_LATE_BINDING_STATUS_GENERAL_ERROR : +return "General Error" ; +case CSC_LATE_BINDING_STATUS_INVALID_PARAMS : +return "Invalid Params" ; +case CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE : +return "Invalid Signature" ; +case CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD : +return "Invalid Payload" ; +case CSC_LATE_BINDING_STATUS_TIMEOUT : +return "Timeout" ; +default : +return "Unknown error" ; + } +} +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -44,6 +82,93 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } +static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_late_bind_fw *lbfw; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid && late_bind->wq) { +drm_dbg (&xe->drm,"Flush work: load %s firmware\n" , + fw_id_to_name[lbfw->id]); +flush_work (&lbfw->work); + } + } +} + +static void xe_late_bind_work (struct work_struct *work) +{ + struct xe_late_bind_fw *lbfw = container_of(work, struct xe_late_bind_fw, work); + struct xe_late_bind *late_bind = container_of(lbfw, struct xe_late_bind, + late_bind_fw[lbfw->id]); +struct xe_device *xe =late_bind_to_xe (late_bind); +int retry =LB_FW_LOAD_RETRY_MAXCOUNT ; +int ret; +int slept; + +/* we can queue this before the component is bound */ +for (slept =0 ; slept <LB_INIT_TIMEOUT_MS ; slept +=100 ) { +if (late_bind->component.ops) +break ; +msleep (100 ); + } + +if (!xe_pm_runtime_get_if_active (xe)) +return ; + +mutex_lock (&late_bind->mutex); + +if (!late_bind->component.ops) { +drm_err (&xe->drm,"Late bind component not bound\n" ); + goto out; + } + +drm_dbg (&xe->drm,"Load %s firmware\n" , fw_id_to_name[lbfw->id]); + +do { + ret = late_bind->component.ops->push_config (late_bind->component.mei_dev, + lbfw->type, lbfw->flags, + lbfw->payload, lbfw->payload_size); +if (!ret) +break ; +msleep (LB_FW_LOAD_RETRY_PAUSE_MS ); + }while (--retry && ret == -EBUSY );
Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind) · line 145
Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +8
-0+ +if (!ret) { +drm_dbg (&xe->drm,"Load %s firmware successful\n" , + fw_id_to_name[lbfw->id]); + goto out; + } + +if (ret >0 )
nit: here you can just do "else if" and drop the goto.
Daniele
Quoted 142 lines
Quoted 142 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +49
-1+drm_err (&xe->drm,"Load %s firmware failed with err %d, %s\n" , + fw_id_to_name[lbfw->id], ret,xe_late_bind_parse_status (ret)); + else + drm_err(&xe->drm, "Load %s firmware failed with err %d", + fw_id_to_name[lbfw->id], ret); +out: +mutex_unlock (&late_bind->mutex); +xe_pm_runtime_put (xe); +} + +int xe_late_bind_fw_load (struct xe_late_bind *late_bind) +{ +struct xe_late_bind_fw *lbfw; +int fw_id; + +if (!late_bind->component_added) +return -ENODEV ; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid) +queue_work (late_bind->wq, &lbfw->work); + } +return 0 ; +} +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -99,6 +224,7 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw); +INIT_WORK (&lb_fw->work, xe_late_bind_work); lb_fw->valid = true;return 0 ;@@ -109,11 +235,16 @@ static int xe_late_bind_fw_init(struct xe_late_bind *late_bind)int ret;int fw_id; + late_bind->wq =alloc_ordered_workqueue ("late-bind-ordered-wq" ,0 ); +if (!late_bind->wq) +return -ENOMEM ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { ret =__xe_late_bind_fw_init (late_bind, fw_id);if (ret)return ret; } +return 0 ; }@@ -137,6 +268,8 @@ static void xe_late_bind_component_unbind(struct device *xe_kdev,struct xe_device *xe =kdev_to_xe_device (xe_kdev);struct xe_late_bind *late_bind = &xe->late_bind; +xe_late_bind_wait_for_worker_completion (late_bind); +mutex_lock (&late_bind->mutex); late_bind->component.ops =NULL ;mutex_unlock (&late_bind->mutex);@@ -152,7 +285,15 @@ static void xe_late_bind_remove(void *arg)struct xe_late_bind *late_bind = arg;struct xe_device *xe =late_bind_to_xe (late_bind); +xe_late_bind_wait_for_worker_completion (late_bind); + + late_bind->component_added = false; +component_del (xe->drm.dev, &xe_late_bind_component_ops); +if (late_bind->wq) { +destroy_workqueue (late_bind->wq); + late_bind->wq =NULL ; + }mutex_destroy (&late_bind->mutex); }@@ -183,9 +324,15 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } + late_bind->component_added = true; + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind);if (err)return err; -return xe_late_bind_fw_init (late_bind); + err =xe_late_bind_fw_init (late_bind); +if (err) +return err; + +return xe_late_bind_fw_load (late_bind); }drivers/gpu/drm/xe/xe_late_bind_fw.h +1
-0@@ -11,5 +11,6 @@struct xe_late_bind ;int xe_late_bind_init (struct xe_late_bind *late_bind); +int xe_late_bind_fw_load (struct xe_late_bind *late_bind);#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h +7
-0@@ -9,6 +9,7 @@#include <linux/iosys-map.h> #include <linux/mutex.h> #include <linux/types.h> +#include <linux/workqueue.h> #define MAX_PAYLOAD_SIZE SZ_4K@@ -38,6 +39,8 @@ struct xe_late_bind_fw {u8 *payload;/** @late_bind_fw.payload_size: late binding blob payload_size */ size_t payload_size; +/** @late_bind_fw.work: worker to upload latebind blob */ +struct work_struct work; };/** @@ -64,6 +67,10 @@ struct xe_late_bind {struct mutex mutex;/** @late_bind.late_bind_fw: late binding firmware array */ struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID ]; +/** @late_bind.wq: workqueue to submit request to download late bind blob */ +struct workqueue_struct *wq; +/** @late_bind.component_added: whether the component has been added */ + bool component_added; };#endif Signature · 1 line
2.34.1
Rodrigo Vivi
maintainerRe: [PATCH v4 05/10] drm/xe/xe_late_bind_fw: Load late binding firmware
Quoted 20 lines · Daniele Ceraolo Spurio
Quoted 17 lines · Rodrigo Vivi
Quoted 12 lines · Badal Nilawar
Load late binding firmware
v2:
- s/EAGAIN/EBUSY/
- Flush worker in suspend and driver unload (Daniele)
v3:
- Use retry interval of 6s, in steps of 200ms, to allow other OS components release MEI CL handle (Sasha)
v4:
- return-ENODEVif component not added (Daniele)
- parse and print status returned by csc
- Usexe_pm_get_if_in_active(Daniele)The worker is considered outer bound and it is safe to use
xe_pm_runtime_getwhich takes the reference and resume synchronously.
Quoted 6 lines
Quoted 2 lines
Otherwise, if using
get_if_activeyou need to reschedule the work or you lose your job.The issue is that the next patch adds code to re-queue the work from the rpm resume path, so if we do a sync resume here the worker will re-queue itself immediately when not needed.
ops, I had forgotten about that case, I'm sorry.
Quoted 2 lines
Also, when the re-queued work runs it might end
up doing another sync resume and re-queuing itself once more.
I believe it might be worse than that and even hang. This is the right case for the if_active indeed. But we need to ensure that we will always have an outer bound for that.
Quoted 4 lines
However, in
the next patch we do also have a flush of the work in therpm_suspendpath, so maybe the worker running when we are rpm suspended is not actually a possible case?
that's the kaboom case!
Quoted 3 lines
Also, thinking about this more, that re-queuing on rpm resume only happens if d3cold is allowed, so when d3cold is not allowed we do want to proceed here we can actually reach here when rpm suspended.
no, when d3cold is not allowed we don't want to re-flash the fw. We just skip and move forward.
My bad, sorry for the noise and please keep the if_active variant in here.
Quoted 260 lines
Quoted 119 lines
Quoted 119 lines
Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 149 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 7 + 3 files changed, 156 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +91
-0@@ -16,6 +16,20 @@#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pcode_api.h" +#include "xe_pm.h" + +/* +* The component should load quite quickly in most cases, but it could take +* a bit. Using a very big timeout just to cover the worst case scenario +*/ +#define LB_INIT_TIMEOUT_MS 20000 + +/* +* Retry interval set to 6 seconds, in steps of 200 ms, to allow time for +* other OS components to release the MEI CL handle +*/ +#define LB_FW_LOAD_RETRY_MAXCOUNT 30 +#define LB_FW_LOAD_RETRY_PAUSE_MS 200static const u32 fw_id_to_type[] = { [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL ,@@ -31,6 +45,30 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static const char *xe_late_bind_parse_status (uint32_t status) +{ +switch (status) { +case CSC_LATE_BINDING_STATUS_SUCCESS : +return "success" ; +case CSC_LATE_BINDING_STATUS_4ID_MISMATCH : +return "4Id Mismatch" ; +case CSC_LATE_BINDING_STATUS_ARB_FAILURE : +return "ARB Failure" ; +case CSC_LATE_BINDING_STATUS_GENERAL_ERROR : +return "General Error" ; +case CSC_LATE_BINDING_STATUS_INVALID_PARAMS : +return "Invalid Params" ; +case CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE : +return "Invalid Signature" ; +case CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD : +return "Invalid Payload" ; +case CSC_LATE_BINDING_STATUS_TIMEOUT : +return "Timeout" ; +default : +return "Unknown error" ; + } +} +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -44,6 +82,93 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } +static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_late_bind_fw *lbfw; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid && late_bind->wq) { +drm_dbg (&xe->drm,"Flush work: load %s firmware\n" , + fw_id_to_name[lbfw->id]); +flush_work (&lbfw->work); + } + } +} + +static void xe_late_bind_work (struct work_struct *work) +{ + struct xe_late_bind_fw *lbfw = container_of(work, struct xe_late_bind_fw, work); + struct xe_late_bind *late_bind = container_of(lbfw, struct xe_late_bind, + late_bind_fw[lbfw->id]); +struct xe_device *xe =late_bind_to_xe (late_bind); +int retry =LB_FW_LOAD_RETRY_MAXCOUNT ; +int ret; +int slept; + +/* we can queue this before the component is bound */ +for (slept =0 ; slept <LB_INIT_TIMEOUT_MS ; slept +=100 ) { +if (late_bind->component.ops) +break ; +msleep (100 ); + } + +if (!xe_pm_runtime_get_if_active (xe)) +return ; + +mutex_lock (&late_bind->mutex); + +if (!late_bind->component.ops) { +drm_err (&xe->drm,"Late bind component not bound\n" ); + goto out; + } + +drm_dbg (&xe->drm,"Load %s firmware\n" , fw_id_to_name[lbfw->id]); + +do { + ret = late_bind->component.ops->push_config (late_bind->component.mei_dev, + lbfw->type, lbfw->flags, + lbfw->payload, lbfw->payload_size); +if (!ret) +break ; +msleep (LB_FW_LOAD_RETRY_PAUSE_MS ); + }while (--retry && ret == -EBUSY );Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind) · line 145
Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +8
-0+ +if (!ret) { +drm_dbg (&xe->drm,"Load %s firmware successful\n" , + fw_id_to_name[lbfw->id]); + goto out; + } + +if (ret >0 )nit: here you can just do "else if" and drop the goto.
Daniele
Quoted 127 lines
Quoted 127 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +49
-1+drm_err (&xe->drm,"Load %s firmware failed with err %d, %s\n" , + fw_id_to_name[lbfw->id], ret,xe_late_bind_parse_status (ret)); + else + drm_err(&xe->drm, "Load %s firmware failed with err %d", + fw_id_to_name[lbfw->id], ret); +out: +mutex_unlock (&late_bind->mutex); +xe_pm_runtime_put (xe); +} + +int xe_late_bind_fw_load (struct xe_late_bind *late_bind) +{ +struct xe_late_bind_fw *lbfw; +int fw_id; + +if (!late_bind->component_added) +return -ENODEV ; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid) +queue_work (late_bind->wq, &lbfw->work); + } +return 0 ; +} +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -99,6 +224,7 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw); +INIT_WORK (&lb_fw->work, xe_late_bind_work); lb_fw->valid = true;return 0 ;@@ -109,11 +235,16 @@ static int xe_late_bind_fw_init(struct xe_late_bind *late_bind)int ret;int fw_id; + late_bind->wq =alloc_ordered_workqueue ("late-bind-ordered-wq" ,0 ); +if (!late_bind->wq) +return -ENOMEM ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { ret =__xe_late_bind_fw_init (late_bind, fw_id);if (ret)return ret; } +return 0 ; }@@ -137,6 +268,8 @@ static void xe_late_bind_component_unbind(struct device *xe_kdev,struct xe_device *xe =kdev_to_xe_device (xe_kdev);struct xe_late_bind *late_bind = &xe->late_bind; +xe_late_bind_wait_for_worker_completion (late_bind); +mutex_lock (&late_bind->mutex); late_bind->component.ops =NULL ;mutex_unlock (&late_bind->mutex);@@ -152,7 +285,15 @@ static void xe_late_bind_remove(void *arg)struct xe_late_bind *late_bind = arg;struct xe_device *xe =late_bind_to_xe (late_bind); +xe_late_bind_wait_for_worker_completion (late_bind); + + late_bind->component_added = false; +component_del (xe->drm.dev, &xe_late_bind_component_ops); +if (late_bind->wq) { +destroy_workqueue (late_bind->wq); + late_bind->wq =NULL ; + }mutex_destroy (&late_bind->mutex); }@@ -183,9 +324,15 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } + late_bind->component_added = true; + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind);if (err)return err; -return xe_late_bind_fw_init (late_bind); + err =xe_late_bind_fw_init (late_bind); +if (err) +return err; + +return xe_late_bind_fw_load (late_bind); }drivers/gpu/drm/xe/xe_late_bind_fw.h +1
-0@@ -11,5 +11,6 @@struct xe_late_bind ;int xe_late_bind_init (struct xe_late_bind *late_bind); +int xe_late_bind_fw_load (struct xe_late_bind *late_bind);#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h +7
-0@@ -9,6 +9,7 @@#include <linux/iosys-map.h> #include <linux/mutex.h> #include <linux/types.h> +#include <linux/workqueue.h> #define MAX_PAYLOAD_SIZE SZ_4K@@ -38,6 +39,8 @@ struct xe_late_bind_fw {u8 *payload;/** @late_bind_fw.payload_size: late binding blob payload_size */ size_t payload_size; +/** @late_bind_fw.work: worker to upload latebind blob */ +struct work_struct work; };/** @@ -64,6 +67,10 @@ struct xe_late_bind {struct mutex mutex;/** @late_bind.late_bind_fw: late binding firmware array */ struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID ]; +/** @late_bind.wq: workqueue to submit request to download late bind blob */ +struct workqueue_struct *wq; +/** @late_bind.component_added: whether the component has been added */ + bool component_added; };#endif Signature · 1 line
2.34.1
Re: [PATCH v4 05/10] drm/xe/xe_late_bind_fw: Load late binding firmware
Quoted 37 lines · Rodrigo Vivi
Quoted 19 lines · Daniele Ceraolo Spurio
Quoted 17 lines · Rodrigo Vivi
Quoted 12 lines · Badal Nilawar
Load late binding firmware
v2:
- s/EAGAIN/EBUSY/
- Flush worker in suspend and driver unload (Daniele)
v3:
- Use retry interval of 6s, in steps of 200ms, to allow other OS components release MEI CL handle (Sasha)
v4:
- return-ENODEVif component not added (Daniele)
- parse and print status returned by csc
- Usexe_pm_get_if_in_active(Daniele)The worker is considered outer bound and it is safe to use
xe_pm_runtime_getwhich takes the reference and resume synchronously.Quoted 5 lines
Quoted 2 lines
Otherwise, if using
get_if_activeyou need to reschedule the work or you lose your job.The issue is that the next patch adds code to re-queue the work from the rpm resume path, so if we do a sync resume here the worker will re-queue itself immediately when not needed.
ops, I had forgotten about that case, I'm sorry.
Quoted 2 lines
Also, when the re-queued work runs it might end
up doing another sync resume and re-queuing itself once more.I believe it might be worse than that and even hang. This is the right case for the
if_activeindeed. But we need to ensure that we will always have an outer bound for that.Quoted 4 lines
However, in
the next patch we do also have a flush of the work in therpm_suspendpath, so maybe the worker running when we are rpm suspended is not actually a possible case?
Quoted 7 lines
that's the kaboom case!
Quoted 3 lines
Also, thinking about this more, that re-queuing on rpm resume only happens if d3cold is allowed, so when d3cold is not allowed we do want to proceed here we can actually reach here when rpm suspended.
no, when d3cold is not allowed we don't want to re-flash the fw. We just skip and move forward.
My concern was about the first time we attempt the load in the d3cold disabled scenario. If we've somehow managed to rpm suspend between queuing the work for the first time and the work actually running, skipping the flashing would mean the binary is not actually ever loaded. Not sure if that's a case we can hit though.
Daniele
Quoted 259 lines
My bad, sorry for the noise and please keep the
if_activevariant in here.Quoted 256 lines
Quoted 117 lines
Quoted 117 lines
Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 149 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 7 + 3 files changed, 156 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +91
-0@@ -16,6 +16,20 @@#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pcode_api.h" +#include "xe_pm.h" + +/* +* The component should load quite quickly in most cases, but it could take +* a bit. Using a very big timeout just to cover the worst case scenario +*/ +#define LB_INIT_TIMEOUT_MS 20000 + +/* +* Retry interval set to 6 seconds, in steps of 200 ms, to allow time for +* other OS components to release the MEI CL handle +*/ +#define LB_FW_LOAD_RETRY_MAXCOUNT 30 +#define LB_FW_LOAD_RETRY_PAUSE_MS 200static const u32 fw_id_to_type[] = { [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL ,@@ -31,6 +45,30 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static const char *xe_late_bind_parse_status (uint32_t status) +{ +switch (status) { +case CSC_LATE_BINDING_STATUS_SUCCESS : +return "success" ; +case CSC_LATE_BINDING_STATUS_4ID_MISMATCH : +return "4Id Mismatch" ; +case CSC_LATE_BINDING_STATUS_ARB_FAILURE : +return "ARB Failure" ; +case CSC_LATE_BINDING_STATUS_GENERAL_ERROR : +return "General Error" ; +case CSC_LATE_BINDING_STATUS_INVALID_PARAMS : +return "Invalid Params" ; +case CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE : +return "Invalid Signature" ; +case CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD : +return "Invalid Payload" ; +case CSC_LATE_BINDING_STATUS_TIMEOUT : +return "Timeout" ; +default : +return "Unknown error" ; + } +} +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -44,6 +82,93 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } +static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_late_bind_fw *lbfw; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid && late_bind->wq) { +drm_dbg (&xe->drm,"Flush work: load %s firmware\n" , + fw_id_to_name[lbfw->id]); +flush_work (&lbfw->work); + } + } +} + +static void xe_late_bind_work (struct work_struct *work) +{ + struct xe_late_bind_fw *lbfw = container_of(work, struct xe_late_bind_fw, work); + struct xe_late_bind *late_bind = container_of(lbfw, struct xe_late_bind, + late_bind_fw[lbfw->id]); +struct xe_device *xe =late_bind_to_xe (late_bind); +int retry =LB_FW_LOAD_RETRY_MAXCOUNT ; +int ret; +int slept; + +/* we can queue this before the component is bound */ +for (slept =0 ; slept <LB_INIT_TIMEOUT_MS ; slept +=100 ) { +if (late_bind->component.ops) +break ; +msleep (100 ); + } + +if (!xe_pm_runtime_get_if_active (xe)) +return ; + +mutex_lock (&late_bind->mutex); + +if (!late_bind->component.ops) { +drm_err (&xe->drm,"Late bind component not bound\n" ); + goto out; + } + +drm_dbg (&xe->drm,"Load %s firmware\n" , fw_id_to_name[lbfw->id]); + +do { + ret = late_bind->component.ops->push_config (late_bind->component.mei_dev, + lbfw->type, lbfw->flags, + lbfw->payload, lbfw->payload_size); +if (!ret) +break ; +msleep (LB_FW_LOAD_RETRY_PAUSE_MS ); + }while (--retry && ret == -EBUSY );Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind) · line 145
Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +8
-0+ +if (!ret) { +drm_dbg (&xe->drm,"Load %s firmware successful\n" , + fw_id_to_name[lbfw->id]); + goto out; + } + +if (ret >0 )nit: here you can just do "else if" and drop the goto.
Daniele
Quoted 127 lines
Quoted 127 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +49
-1+drm_err (&xe->drm,"Load %s firmware failed with err %d, %s\n" , + fw_id_to_name[lbfw->id], ret,xe_late_bind_parse_status (ret)); + else + drm_err(&xe->drm, "Load %s firmware failed with err %d", + fw_id_to_name[lbfw->id], ret); +out: +mutex_unlock (&late_bind->mutex); +xe_pm_runtime_put (xe); +} + +int xe_late_bind_fw_load (struct xe_late_bind *late_bind) +{ +struct xe_late_bind_fw *lbfw; +int fw_id; + +if (!late_bind->component_added) +return -ENODEV ; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid) +queue_work (late_bind->wq, &lbfw->work); + } +return 0 ; +} +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -99,6 +224,7 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw); +INIT_WORK (&lb_fw->work, xe_late_bind_work); lb_fw->valid = true;return 0 ;@@ -109,11 +235,16 @@ static int xe_late_bind_fw_init(struct xe_late_bind *late_bind)int ret;int fw_id; + late_bind->wq =alloc_ordered_workqueue ("late-bind-ordered-wq" ,0 ); +if (!late_bind->wq) +return -ENOMEM ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { ret =__xe_late_bind_fw_init (late_bind, fw_id);if (ret)return ret; } +return 0 ; }@@ -137,6 +268,8 @@ static void xe_late_bind_component_unbind(struct device *xe_kdev,struct xe_device *xe =kdev_to_xe_device (xe_kdev);struct xe_late_bind *late_bind = &xe->late_bind; +xe_late_bind_wait_for_worker_completion (late_bind); +mutex_lock (&late_bind->mutex); late_bind->component.ops =NULL ;mutex_unlock (&late_bind->mutex);@@ -152,7 +285,15 @@ static void xe_late_bind_remove(void *arg)struct xe_late_bind *late_bind = arg;struct xe_device *xe =late_bind_to_xe (late_bind); +xe_late_bind_wait_for_worker_completion (late_bind); + + late_bind->component_added = false; +component_del (xe->drm.dev, &xe_late_bind_component_ops); +if (late_bind->wq) { +destroy_workqueue (late_bind->wq); + late_bind->wq =NULL ; + }mutex_destroy (&late_bind->mutex); }@@ -183,9 +324,15 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } + late_bind->component_added = true; + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind);if (err)return err; -return xe_late_bind_fw_init (late_bind); + err =xe_late_bind_fw_init (late_bind); +if (err) +return err; + +return xe_late_bind_fw_load (late_bind); }drivers/gpu/drm/xe/xe_late_bind_fw.h +1
-0@@ -11,5 +11,6 @@struct xe_late_bind ;int xe_late_bind_init (struct xe_late_bind *late_bind); +int xe_late_bind_fw_load (struct xe_late_bind *late_bind);#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h +7
-0@@ -9,6 +9,7 @@#include <linux/iosys-map.h> #include <linux/mutex.h> #include <linux/types.h> +#include <linux/workqueue.h> #define MAX_PAYLOAD_SIZE SZ_4K@@ -38,6 +39,8 @@ struct xe_late_bind_fw {u8 *payload;/** @late_bind_fw.payload_size: late binding blob payload_size */ size_t payload_size; +/** @late_bind_fw.work: worker to upload latebind blob */ +struct work_struct work; };/** @@ -64,6 +67,10 @@ struct xe_late_bind {struct mutex mutex;/** @late_bind.late_bind_fw: late binding firmware array */ struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID ]; +/** @late_bind.wq: workqueue to submit request to download late bind blob */ +struct workqueue_struct *wq; +/** @late_bind.component_added: whether the component has been added */ + bool component_added; };#endif Signature · 1 line
2.34.1
Rodrigo Vivi
maintainerRe: [PATCH v4 05/10] drm/xe/xe_late_bind_fw: Load late binding firmware
Quoted 45 lines · Daniele Ceraolo Spurio
Quoted 42 lines · Rodrigo Vivi
Quoted 19 lines · Daniele Ceraolo Spurio
Quoted 17 lines · Rodrigo Vivi
Quoted 12 lines · Badal Nilawar
Load late binding firmware
v2:
- s/EAGAIN/EBUSY/
- Flush worker in suspend and driver unload (Daniele)
v3:
- Use retry interval of 6s, in steps of 200ms, to allow other OS components release MEI CL handle (Sasha)
v4:
- return-ENODEVif component not added (Daniele)
- parse and print status returned by csc
- Usexe_pm_get_if_in_active(Daniele)The worker is considered outer bound and it is safe to use
xe_pm_runtime_getwhich takes the reference and resume synchronously.Quoted 5 lines
Quoted 2 lines
Otherwise, if using
get_if_activeyou need to reschedule the work or you lose your job.The issue is that the next patch adds code to re-queue the work from the rpm resume path, so if we do a sync resume here the worker will re-queue itself immediately when not needed.
ops, I had forgotten about that case, I'm sorry.
Quoted 2 lines
Also, when the re-queued work runs it might end
up doing another sync resume and re-queuing itself once more.I believe it might be worse than that and even hang. This is the right case for the
if_activeindeed. But we need to ensure that we will always have an outer bound for that.Quoted 4 lines
However, in
the next patch we do also have a flush of the work in therpm_suspendpath, so maybe the worker running when we are rpm suspended is not actually a possible case?that's the kaboom case!
Quoted 3 lines
Also, thinking about this more, that re-queuing on rpm resume only happens if d3cold is allowed, so when d3cold is not allowed we do want to proceed here we can actually reach here when rpm suspended.
Quoted 8 lines
Quoted 2 lines
no, when d3cold is not allowed we don't want to re-flash the fw. We just skip and move forward.
My concern was about the first time we attempt the load in the d3cold disabled scenario. If we've somehow managed to rpm suspend between queuing the work for the first time and the work actually running, skipping the flashing would mean the binary is not actually ever loaded. Not sure if that's a case we can hit though.
Well, the first time will be triggered during the probe, while it is active. But we need to trigger without delay... But we need to think how to ensure this will start running before the probe is finished and the rpm is allowed.
Or we create 2 different workers, one for probe and one for suspend. :/
Quoted 263 lines
Daniele
Quoted 259 lines
My bad, sorry for the noise and please keep the
if_activevariant in here.Quoted 256 lines
Quoted 117 lines
Quoted 117 lines
Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 149 ++++++++++++++++++++- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 7 + 3 files changed, 156 insertions(+), 1 deletion(-)drivers/gpu/drm/xe/xe_late_bind_fw.c +91
-0@@ -16,6 +16,20 @@#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pcode_api.h" +#include "xe_pm.h" + +/* +* The component should load quite quickly in most cases, but it could take +* a bit. Using a very big timeout just to cover the worst case scenario +*/ +#define LB_INIT_TIMEOUT_MS 20000 + +/* +* Retry interval set to 6 seconds, in steps of 200 ms, to allow time for +* other OS components to release the MEI CL handle +*/ +#define LB_FW_LOAD_RETRY_MAXCOUNT 30 +#define LB_FW_LOAD_RETRY_PAUSE_MS 200static const u32 fw_id_to_type[] = { [XE_LB_FW_FAN_CONTROL ] =CSC_LATE_BINDING_TYPE_FAN_CONTROL ,@@ -31,6 +45,30 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static const char *xe_late_bind_parse_status (uint32_t status) +{ +switch (status) { +case CSC_LATE_BINDING_STATUS_SUCCESS : +return "success" ; +case CSC_LATE_BINDING_STATUS_4ID_MISMATCH : +return "4Id Mismatch" ; +case CSC_LATE_BINDING_STATUS_ARB_FAILURE : +return "ARB Failure" ; +case CSC_LATE_BINDING_STATUS_GENERAL_ERROR : +return "General Error" ; +case CSC_LATE_BINDING_STATUS_INVALID_PARAMS : +return "Invalid Params" ; +case CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE : +return "Invalid Signature" ; +case CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD : +return "Invalid Payload" ; +case CSC_LATE_BINDING_STATUS_TIMEOUT : +return "Timeout" ; +default : +return "Unknown error" ; + } +} +static int xe_late_bind_fw_num_fans (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -44,6 +82,93 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } +static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +{ +struct xe_device *xe =late_bind_to_xe (late_bind); +struct xe_late_bind_fw *lbfw; +int fw_id; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid && late_bind->wq) { +drm_dbg (&xe->drm,"Flush work: load %s firmware\n" , + fw_id_to_name[lbfw->id]); +flush_work (&lbfw->work); + } + } +} + +static void xe_late_bind_work (struct work_struct *work) +{ + struct xe_late_bind_fw *lbfw = container_of(work, struct xe_late_bind_fw, work); + struct xe_late_bind *late_bind = container_of(lbfw, struct xe_late_bind, + late_bind_fw[lbfw->id]); +struct xe_device *xe =late_bind_to_xe (late_bind); +int retry =LB_FW_LOAD_RETRY_MAXCOUNT ; +int ret; +int slept; + +/* we can queue this before the component is bound */ +for (slept =0 ; slept <LB_INIT_TIMEOUT_MS ; slept +=100 ) { +if (late_bind->component.ops) +break ; +msleep (100 ); + } + +if (!xe_pm_runtime_get_if_active (xe)) +return ; + +mutex_lock (&late_bind->mutex); + +if (!late_bind->component.ops) { +drm_err (&xe->drm,"Late bind component not bound\n" ); + goto out; + } + +drm_dbg (&xe->drm,"Load %s firmware\n" , fw_id_to_name[lbfw->id]); + +do { + ret = late_bind->component.ops->push_config (late_bind->component.mei_dev, + lbfw->type, lbfw->flags, + lbfw->payload, lbfw->payload_size); +if (!ret) +break ; +msleep (LB_FW_LOAD_RETRY_PAUSE_MS ); + }while (--retry && ret == -EBUSY );Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind) · line 145
Quoted 8 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +8
-0+ +if (!ret) { +drm_dbg (&xe->drm,"Load %s firmware successful\n" , + fw_id_to_name[lbfw->id]); + goto out; + } + +if (ret >0 )nit: here you can just do "else if" and drop the goto.
Daniele
Quoted 127 lines
Quoted 127 lines
drivers/gpu/drm/xe/xe_late_bind_fw.c +49
-1+drm_err (&xe->drm,"Load %s firmware failed with err %d, %s\n" , + fw_id_to_name[lbfw->id], ret,xe_late_bind_parse_status (ret)); + else + drm_err(&xe->drm, "Load %s firmware failed with err %d", + fw_id_to_name[lbfw->id], ret); +out: +mutex_unlock (&late_bind->mutex); +xe_pm_runtime_put (xe); +} + +int xe_late_bind_fw_load (struct xe_late_bind *late_bind) +{ +struct xe_late_bind_fw *lbfw; +int fw_id; + +if (!late_bind->component_added) +return -ENODEV ; + +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { + lbfw = &late_bind->late_bind_fw[fw_id]; +if (lbfw->valid) +queue_work (late_bind->wq, &lbfw->work); + } +return 0 ; +} +static int __xe_late_bind_fw_init (struct xe_late_bind *late_bind,u32 fw_id) {struct xe_device *xe =late_bind_to_xe (late_bind);@@ -99,6 +224,7 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw); +INIT_WORK (&lb_fw->work, xe_late_bind_work); lb_fw->valid = true;return 0 ;@@ -109,11 +235,16 @@ static int xe_late_bind_fw_init(struct xe_late_bind *late_bind)int ret;int fw_id; + late_bind->wq =alloc_ordered_workqueue ("late-bind-ordered-wq" ,0 ); +if (!late_bind->wq) +return -ENOMEM ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { ret =__xe_late_bind_fw_init (late_bind, fw_id);if (ret)return ret; } +return 0 ; }@@ -137,6 +268,8 @@ static void xe_late_bind_component_unbind(struct device *xe_kdev,struct xe_device *xe =kdev_to_xe_device (xe_kdev);struct xe_late_bind *late_bind = &xe->late_bind; +xe_late_bind_wait_for_worker_completion (late_bind); +mutex_lock (&late_bind->mutex); late_bind->component.ops =NULL ;mutex_unlock (&late_bind->mutex);@@ -152,7 +285,15 @@ static void xe_late_bind_remove(void *arg)struct xe_late_bind *late_bind = arg;struct xe_device *xe =late_bind_to_xe (late_bind); +xe_late_bind_wait_for_worker_completion (late_bind); + + late_bind->component_added = false; +component_del (xe->drm.dev, &xe_late_bind_component_ops); +if (late_bind->wq) { +destroy_workqueue (late_bind->wq); + late_bind->wq =NULL ; + }mutex_destroy (&late_bind->mutex); }@@ -183,9 +324,15 @@ int xe_late_bind_init(struct xe_late_bind *late_bind)return err; } + late_bind->component_added = true; + err =devm_add_action_or_reset (xe->drm.dev, xe_late_bind_remove, late_bind);if (err)return err; -return xe_late_bind_fw_init (late_bind); + err =xe_late_bind_fw_init (late_bind); +if (err) +return err; + +return xe_late_bind_fw_load (late_bind); }drivers/gpu/drm/xe/xe_late_bind_fw.h +1
-0@@ -11,5 +11,6 @@struct xe_late_bind ;int xe_late_bind_init (struct xe_late_bind *late_bind); +int xe_late_bind_fw_load (struct xe_late_bind *late_bind);#endif drivers/gpu/drm/xe/xe_late_bind_fw_types.h +7
-0@@ -9,6 +9,7 @@#include <linux/iosys-map.h> #include <linux/mutex.h> #include <linux/types.h> +#include <linux/workqueue.h> #define MAX_PAYLOAD_SIZE SZ_4K@@ -38,6 +39,8 @@ struct xe_late_bind_fw {u8 *payload;/** @late_bind_fw.payload_size: late binding blob payload_size */ size_t payload_size; +/** @late_bind_fw.work: worker to upload latebind blob */ +struct work_struct work; };/** @@ -64,6 +67,10 @@ struct xe_late_bind {struct mutex mutex;/** @late_bind.late_bind_fw: late binding firmware array */ struct xe_late_bind_fw late_bind_fw[XE_LB_FW_MAX_ID ]; +/** @late_bind.wq: workqueue to submit request to download late bind blob */ +struct workqueue_struct *wq; +/** @late_bind.component_added: whether the component has been added */ + bool component_added; };#endif Signature · 1 line
2.34.1
PATCH v4 6/10 drm/xe/xe_late_bind_fw: Reload late binding fw in rpm resume
In reply to Badal NilawarReload late binding fw during runtime resume.
v2: Flush worker during runtime suspend
--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 2 +- drivers/gpu/drm/xe/xe_late_bind_fw.h | 1 + drivers/gpu/drm/xe/xe_pm.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_late_bind_fw.c +1 -1
@@ -82,7 +82,7 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)return 0 ; } -static void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) +void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind) {struct xe_device *xe =late_bind_to_xe (late_bind);struct xe_late_bind_fw *lbfw;
drivers/gpu/drm/xe/xe_late_bind_fw.h +1 -0
@@ -12,5 +12,6 @@ struct xe_late_bind;int xe_late_bind_init (struct xe_late_bind *late_bind);int xe_late_bind_fw_load (struct xe_late_bind *late_bind); +void xe_late_bind_wait_for_worker_completion (struct xe_late_bind *late_bind);#endif
drivers/gpu/drm/xe/xe_pm.c +6 -0
@@ -20,6 +20,7 @@#include "xe_gt.h" #include "xe_guc.h" #include "xe_irq.h" +#include "xe_late_bind_fw.h" #include "xe_pcode.h" #include "xe_pxp.h" #include "xe_trace.h"
@@ -460,6 +461,8 @@ int xe_pm_runtime_suspend(struct xe_device *xe)if (err) goto out; +xe_late_bind_wait_for_worker_completion (&xe->late_bind); +/* * Applying lock for entire list op as xe_ttm_bo_destroy and xe_bo_move_notify * also checks and deletes bo entry from user fault list.
@@ -550,6 +553,9 @@ int xe_pm_runtime_resume(struct xe_device *xe)xe_pxp_pm_resume (xe->pxp); +if (xe->d3cold.allowed) +xe_late_bind_fw_load (&xe->late_bind); + out:xe_rpm_lockmap_release (xe);xe_pm_write_callback_task (xe,NULL );
Signature · 1 line
2.34.1
PATCH v4 7/10 drm/xe/xe_late_bind_fw: Reload late binding fw during system resume
In reply to Badal NilawarReload late binding fw during resume from system suspend
v2:
- Unconditionally reload late binding fw (Rodrigo)
- Flush worker during system suspend
--- drivers/gpu/drm/xe/xe_pm.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/xe/xe_pm.c +4 -0
@@ -127,6 +127,8 @@ int xe_pm_suspend(struct xe_device *xe)if (err) goto err; +xe_late_bind_wait_for_worker_completion (&xe->late_bind); +for_each_gt (gt, xe, id)xe_gt_suspend_prepare (gt);
@@ -205,6 +207,8 @@ int xe_pm_resume(struct xe_device *xe)xe_pxp_pm_resume (xe->pxp); +xe_late_bind_fw_load (&xe->late_bind); +drm_dbg (&xe->drm,"Device resumed\n" );return 0 ; err:
Signature · 1 line
2.34.1
Re: [PATCH v4 07/10] drm/xe/xe_late_bind_fw: Reload late binding fw during system resume
Hi Daniele,
Quoted 17 lines · Badal Nilawar
Reload late binding fw during resume from system suspend
v2:
- Unconditionally reload late binding fw (Rodrigo)
- Flush worker during system suspendCc Rodrigo Vivi <[email protected]>Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/xe/xe_pm.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/xe/xe_pm.c +0
-0
drivers/gpu/drm/xe/xe_pm.c int xe_pm_suspend(struct xe_device *xe) · line 131
Quoted 5 lines
drivers/gpu/drm/xe/xe_pm.c +2
-0@@ -127,6 +127,8 @@ int xe_pm_suspend(struct xe_device *xe)if (err) goto err; +xe_late_bind_wait_for_worker_completion (&xe->late_bind); +
During system suspend, MEI will unbind the component. This flush is unnecessary because it takes place within xe_late_bind_component_unbind(). I will remove this call.
Badal
Quoted 12 lines
drivers/gpu/drm/xe/xe_pm.c +2
-0for_each_gt (gt, xe, id)xe_gt_suspend_prepare (gt);@@ -205,6 +207,8 @@ int xe_pm_resume(struct xe_device *xe)xe_pxp_pm_resume (xe->pxp); +xe_late_bind_fw_load (&xe->late_bind); +drm_dbg (&xe->drm,"Device resumed\n" );return 0 ; err:
PATCH v4 8/10 drm/xe/xe_late_bind_fw: Introduce debug fs node to disable late binding
In reply to Badal NilawarIntroduce a debug filesystem node to disable late binding fw reload during the system or runtime resume. This is intended for situations where the late binding fw needs to be loaded from user mode, perticularly for validation purpose.
Note that xe kmd doesn't participate in late binding flow from user space. Binary loaded from the userspace will be lost upon entering to D3 cold hence user space app need to handle this situation.
v2:
- s/(uval == 1) ? true : false/!!uval/ (Daniele)
v3:
- Refine the commit message (Daniele)
--- drivers/gpu/drm/xe/xe_debugfs.c | 41 ++++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw.c | 3 ++ drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 2 ++ 3 files changed, 46 insertions(+)
drivers/gpu/drm/xe/xe_debugfs.c +41 -0
@@ -226,6 +226,44 @@ static const struct file_operations atomic_svm_timeslice_ms_fops = { .write = atomic_svm_timeslice_ms_set, }; +static ssize_t disable_late_binding_show (struct file *f,char __user *ubuf, +size_t size,loff_t *pos) +{ +struct xe_device *xe =file_inode (f)->i_private; +struct xe_late_bind *late_bind = &xe->late_bind; +char buf[32 ]; +int len; + + len =scnprintf (buf,sizeof (buf),"%d\n" , late_bind->disable); + +return simple_read_from_buffer (ubuf, size, pos, buf, len); +} + +static ssize_t disable_late_binding_set (struct file *f,const char __user *ubuf, +size_t size,loff_t *pos) +{ +struct xe_device *xe =file_inode (f)->i_private; +struct xe_late_bind *late_bind = &xe->late_bind; +u32 uval; +ssize_t ret; + + ret =kstrtouint_from_user (ubuf, size,sizeof (uval), &uval); +if (ret) +return ret; + +if (uval >1 ) +return -EINVAL ; + + late_bind->disable = !!uval; +return size; +} + +static const struct file_operations disable_late_binding_fops = { + .owner =THIS_MODULE , + .read = disable_late_binding_show, + .write = disable_late_binding_set, +}; +void xe_debugfs_register (struct xe_device *xe) {struct ttm_device *bdev = &xe->ttm;
@@ -249,6 +287,9 @@ void xe_debugfs_register(struct xe_device *xe)debugfs_create_file ("atomic_svm_timeslice_ms" ,0600 , root, xe, &atomic_svm_timeslice_ms_fops); +debugfs_create_file ("disable_late_binding" ,0600 , root, xe, + &disable_late_binding_fops); +for (mem_type =XE_PL_VRAM0 ; mem_type <=XE_PL_VRAM1 ; ++mem_type) { man =ttm_manager_type (bdev, mem_type);
drivers/gpu/drm/xe/xe_late_bind_fw.c +3 -0
@@ -161,6 +161,9 @@ int xe_late_bind_fw_load(struct xe_late_bind *late_bind)if (!late_bind->component_added)return -ENODEV ; +if (late_bind->disable) +return 0 ; +for (fw_id =0 ; fw_id <XE_LB_FW_MAX_ID ; fw_id++) { lbfw = &late_bind->late_bind_fw[fw_id];if (lbfw->valid)
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +2 -0
@@ -71,6 +71,8 @@ struct xe_late_bind {struct workqueue_struct *wq;/** @late_bind.component_added: whether the component has been added */ bool component_added; +/** @late_bind.disable to block late binding reload during pm resume flow*/ + bool disable; };#endif
Signature · 1 line
2.34.1
PATCH v4 9/10 drm/xe/xe_late_bind_fw: Extract and print version info
In reply to Badal NilawarExtract and print version info of the late binding binary.
v2: Some refinements (Daniele)
--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 124 +++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 3 + drivers/gpu/drm/xe/xe_uc_fw_abi.h | 66 +++++++++++ 3 files changed, 193 insertions(+)
drivers/gpu/drm/xe/xe_late_bind_fw.c +124 -0
@@ -45,6 +45,121 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static struct xe_device * +late_bind_fw_to_xe (struct xe_late_bind_fw *lb_fw) +{ + return container_of(lb_fw, struct xe_device, late_bind.late_bind_fw[lb_fw->id]); +} + +/* Refer to the "Late Bind based Firmware Layout" documentation entry for details */ +static int parse_cpd_header (struct xe_late_bind_fw *lb_fw, +const void *data,size_t size,const char *manifest_entry) +{ +struct xe_device *xe =late_bind_fw_to_xe (lb_fw); +const struct gsc_cpd_header_v2 *header = data; +const struct gsc_manifest_header *manifest; +const struct gsc_cpd_entry *entry; +size_t min_size =sizeof (*header); +u32 offset; +int i; + +/* manifest_entry is mandatory */ +xe_assert (xe, manifest_entry); + +if (size < min_size || header->header_marker !=GSC_CPD_HEADER_MARKER ) +return -ENOENT ; + +if (header->header_length <sizeof (struct gsc_cpd_header_v2 )) { +drm_err (&xe->drm,"%s late binding fw: Invalid CPD header length %u!\n" , + fw_id_to_name[lb_fw->id], header->header_length); +return -EINVAL ; + } + + min_size = header->header_length +sizeof (struct gsc_cpd_entry ) * header->num_of_entries; +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + +/* Look for the manifest first */ + entry = (void *)header + header->header_length; +for (i =0 ; i < header->num_of_entries; i++, entry++) +if (strcmp (entry->name, manifest_entry) ==0 ) + offset = entry->offset &GSC_CPD_ENTRY_OFFSET_MASK ; + +if (!offset) { +drm_err (&xe->drm,"%s late binding fw: Failed to find manifest_entry\n" , + fw_id_to_name[lb_fw->id]); +return -ENODATA ; + } + + min_size = offset +sizeof (struct gsc_manifest_header ); +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + + manifest = data + offset; + + lb_fw->version = manifest->fw_version; + +return 0 ; +} + +/* Refer to the "Late Bind based Firmware Layout" documentation entry for details */ +static int parse_lb_layout (struct xe_late_bind_fw *lb_fw, +const void *data,size_t size,const char *fpt_entry) +{ +struct xe_device *xe =late_bind_fw_to_xe (lb_fw); +const struct csc_fpt_header *header = data; +const struct csc_fpt_entry *entry; +size_t min_size =sizeof (*header); +u32 offset; +int i; + +/* fpt_entry is mandatory */ +xe_assert (xe, fpt_entry); + +if (size < min_size || header->header_marker !=CSC_FPT_HEADER_MARKER ) +return -ENOENT ; + +if (header->header_length <sizeof (struct csc_fpt_header )) { +drm_err (&xe->drm,"%s late binding fw: Invalid FPT header length %u!\n" , + fw_id_to_name[lb_fw->id], header->header_length); +return -EINVAL ; + } + + min_size = header->header_length +sizeof (struct csc_fpt_entry ) * header->num_of_entries; +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + +/* Look for the cpd header first */ + entry = (void *)header + header->header_length; +for (i =0 ; i < header->num_of_entries; i++, entry++) +if (strcmp (entry->name, fpt_entry) ==0 ) + offset = entry->offset; + +if (!offset) { +drm_err (&xe->drm,"%s late binding fw: Failed to find fpt_entry\n" , + fw_id_to_name[lb_fw->id]); +return -ENODATA ; + } + + min_size = offset +sizeof (struct gsc_cpd_header_v2 ); +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + +return parse_cpd_header (lb_fw, data + offset, size - offset,"LTES.man" ); +} +static const char *xe_late_bind_parse_status (uint32_t status) {switch (status) {
@@ -217,6 +332,10 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)return -ENODATA ; } + ret =parse_lb_layout (lb_fw, fw->data, fw->size,"LTES" ); +if (ret) +return ret; + lb_fw->payload =drmm_kzalloc (&xe->drm, lb_fw->payload_size,GFP_KERNEL );if (!lb_fw->payload) {release_firmware (fw);
@@ -225,6 +344,11 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id) lb_fw->payload_size = fw->size; +drm_info (&xe->drm,"Using %s firmware from %s version %u.%u.%u.%u\n" , + fw_id_to_name[lb_fw->id], lb_fw->blob_path, + lb_fw->version.major, lb_fw->version.minor, + lb_fw->version.hotfix, lb_fw->version.build); +memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw);INIT_WORK (&lb_fw->work, xe_late_bind_work);
drivers/gpu/drm/xe/xe_late_bind_fw_types.h +3 -0
@@ -10,6 +10,7 @@#include <linux/mutex.h> #include <linux/types.h> #include <linux/workqueue.h> +#include "xe_uc_fw_abi.h" #define MAX_PAYLOAD_SIZE SZ_4K
@@ -41,6 +42,8 @@ struct xe_late_bind_fw {size_t payload_size;/** @late_bind_fw.work: worker to upload latebind blob */ struct work_struct work; +/** @late_bind_fw.version: late binding blob manifest version */ +struct gsc_version version; };/**
drivers/gpu/drm/xe/xe_uc_fw_abi.h +66 -0
70 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v4 09/10] drm/xe/xe_late_bind_fw: Extract and print version info
Quoted 5 lines · Badal Nilawar
Extract and print version info of the late binding binary.
v2: Some refinements (Daniele)
Signed-off-by Badal Nilawar <[email protected]>
Daniele
Quoted 251 lines
--- drivers/gpu/drm/xe/xe_late_bind_fw.c | 124 +++++++++++++++++++++ drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 3 + drivers/gpu/drm/xe/xe_uc_fw_abi.h | 66 +++++++++++ 3 files changed, 193 insertions(+)drivers/gpu/drm/xe/xe_late_bind_fw.c +124
-0@@ -45,6 +45,121 @@ late_bind_to_xe(struct xe_late_bind *late_bind) return container_of(late_bind, struct xe_device, late_bind); } +static struct xe_device * +late_bind_fw_to_xe (struct xe_late_bind_fw *lb_fw) +{ + return container_of(lb_fw, struct xe_device, late_bind.late_bind_fw[lb_fw->id]); +} + +/* Refer to the "Late Bind based Firmware Layout" documentation entry for details */ +static int parse_cpd_header (struct xe_late_bind_fw *lb_fw, +const void *data,size_t size,const char *manifest_entry) +{ +struct xe_device *xe =late_bind_fw_to_xe (lb_fw); +const struct gsc_cpd_header_v2 *header = data; +const struct gsc_manifest_header *manifest; +const struct gsc_cpd_entry *entry; +size_t min_size =sizeof (*header); +u32 offset; +int i; + +/* manifest_entry is mandatory */ +xe_assert (xe, manifest_entry); + +if (size < min_size || header->header_marker !=GSC_CPD_HEADER_MARKER ) +return -ENOENT ; + +if (header->header_length <sizeof (struct gsc_cpd_header_v2 )) { +drm_err (&xe->drm,"%s late binding fw: Invalid CPD header length %u!\n" , + fw_id_to_name[lb_fw->id], header->header_length); +return -EINVAL ; + } + + min_size = header->header_length +sizeof (struct gsc_cpd_entry ) * header->num_of_entries; +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + +/* Look for the manifest first */ + entry = (void *)header + header->header_length; +for (i =0 ; i < header->num_of_entries; i++, entry++) +if (strcmp (entry->name, manifest_entry) ==0 ) + offset = entry->offset &GSC_CPD_ENTRY_OFFSET_MASK ; + +if (!offset) { +drm_err (&xe->drm,"%s late binding fw: Failed to find manifest_entry\n" , + fw_id_to_name[lb_fw->id]); +return -ENODATA ; + } + + min_size = offset +sizeof (struct gsc_manifest_header ); +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + + manifest = data + offset; + + lb_fw->version = manifest->fw_version; + +return 0 ; +} + +/* Refer to the "Late Bind based Firmware Layout" documentation entry for details */ +static int parse_lb_layout (struct xe_late_bind_fw *lb_fw, +const void *data,size_t size,const char *fpt_entry) +{ +struct xe_device *xe =late_bind_fw_to_xe (lb_fw); +const struct csc_fpt_header *header = data; +const struct csc_fpt_entry *entry; +size_t min_size =sizeof (*header); +u32 offset; +int i; + +/* fpt_entry is mandatory */ +xe_assert (xe, fpt_entry); + +if (size < min_size || header->header_marker !=CSC_FPT_HEADER_MARKER ) +return -ENOENT ; + +if (header->header_length <sizeof (struct csc_fpt_header )) { +drm_err (&xe->drm,"%s late binding fw: Invalid FPT header length %u!\n" , + fw_id_to_name[lb_fw->id], header->header_length); +return -EINVAL ; + } + + min_size = header->header_length +sizeof (struct csc_fpt_entry ) * header->num_of_entries; +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + +/* Look for the cpd header first */ + entry = (void *)header + header->header_length; +for (i =0 ; i < header->num_of_entries; i++, entry++) +if (strcmp (entry->name, fpt_entry) ==0 ) + offset = entry->offset; + +if (!offset) { +drm_err (&xe->drm,"%s late binding fw: Failed to find fpt_entry\n" , + fw_id_to_name[lb_fw->id]); +return -ENODATA ; + } + + min_size = offset +sizeof (struct gsc_cpd_header_v2 ); +if (size < min_size) { +drm_err (&xe->drm,"%s late binding fw: too small! %zu < %zu\n" , + fw_id_to_name[lb_fw->id], size, min_size); +return -ENODATA ; + } + +return parse_cpd_header (lb_fw, data + offset, size - offset,"LTES.man" ); +} +static const char *xe_late_bind_parse_status (uint32_t status) {switch (status) {@@ -217,6 +332,10 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)return -ENODATA ; } + ret =parse_lb_layout (lb_fw, fw->data, fw->size,"LTES" ); +if (ret) +return ret; + lb_fw->payload =drmm_kzalloc (&xe->drm, lb_fw->payload_size,GFP_KERNEL );if (!lb_fw->payload) {release_firmware (fw);@@ -225,6 +344,11 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id) lb_fw->payload_size = fw->size; +drm_info (&xe->drm,"Using %s firmware from %s version %u.%u.%u.%u\n" , + fw_id_to_name[lb_fw->id], lb_fw->blob_path, + lb_fw->version.major, lb_fw->version.minor, + lb_fw->version.hotfix, lb_fw->version.build); +memcpy (lb_fw->payload, fw->data, lb_fw->payload_size);release_firmware (fw);INIT_WORK (&lb_fw->work, xe_late_bind_work);drivers/gpu/drm/xe/xe_late_bind_fw_types.h +3
-0@@ -10,6 +10,7 @@#include <linux/mutex.h> #include <linux/types.h> #include <linux/workqueue.h> +#include "xe_uc_fw_abi.h" #define MAX_PAYLOAD_SIZE SZ_4K@@ -41,6 +42,8 @@ struct xe_late_bind_fw {size_t payload_size;/** @late_bind_fw.work: worker to upload latebind blob */ struct work_struct work; +/** @late_bind_fw.version: late binding blob manifest version */ +struct gsc_version version; };/** drivers/gpu/drm/xe/xe_uc_fw_abi.h +66
-0@@ -318,4 +318,70 @@ struct gsc_manifest_header { u32 exponent_size; /* in dwords */ } __packed; +/** +* DOC: Late binding Firmware Layout +* +* The Late binding binary starts with FPT header, which contains locations +* of various partitions of the binary. Here we're interested in finding out +* manifest version. To the manifest version, we need to locate CPD header +* one of the entry in CPD header points to manifest header. Manifest header +* contains the version. +* +* +================================================+ +* | FPT Header | +* +================================================+ +* | FPT entries[] | +* | entry1 | +* | ... | +* | entryX | +* | "LTES" | +* | ... | +* | offset >-----------------------------|------o +* +================================================+ | +* | +* +================================================+ | +* | CPD Header |<-----o +* +================================================+ +* | CPD entries[] | +* | entry1 | +* | ... | +* | entryX | +* | "LTES.man" | +* | ... | +* | offset >----------------------------|------o +* +================================================+ | +* | +* +================================================+ | +* | Manifest Header |<-----o +* | ... | +* | FW version | +* | ... | +* +================================================+ +*/ + +/* FPT Headers */ +struct csc_fpt_header { +u32 header_marker; +#define CSC_FPT_HEADER_MARKER 0x54504624 +u32 num_of_entries; +u8 header_version; +u8 entry_version; +u8 header_length;/* in bytes */ +u8 flags; +u16 ticks_to_add; +u16 tokens_to_add; +u32 uma_size; +u32 crc32; +struct gsc_version fitc_version; +} __packed; + +struct csc_fpt_entry { +u8 name[4 ];/* partition name */ +u32 reserved1; +u32 offset;/* offset from beginning of CSE region */ +u32 length;/* partition length in bytes */ +u32 reserved2[3 ]; +u32 partition_flags; +} __packed; +#endif
PATCH v4 10/10 drm/xe/xe_late_bind_fw: Select INTEL_MEI_LATE_BIND for CI
In reply to Badal NilawarDo not review
--- drivers/gpu/drm/xe/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/xe/Kconfig +1 -0
@@ -44,6 +44,7 @@ config DRM_XE select WANT_DEV_COREDUMP select AUXILIARY_BUS select HMM_MIRROR + select INTEL_MEI_LATE_BIND help Driver for Intel Xe2 series GPUs and later. Experimental support for Xe series is also available.
Signature · 1 line
2.34.1
Patchwork
CI✗ CI.checkpatch: warning for Introducing firmware late binding
In reply to Badal Nilawar== Series Details ==
== Series Details ==
Series: Introducing firmware late binding
URL : https://patchwork.freedesktop.org/series/150772/
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 f8ff75ae1d2127635239b134695774ed4045d05b
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit e265f1e55bd9e2421504b701faebbf52ec1eec33
Author: Badal Nilawar <[email protected]> Date: Wed Jun 25 22:30:15 2025 +0530
drm/xe/xe_late_bind_fw: Select INTEL_MEI_LATE_BIND for CI
Do not review
+ /mt/dim checkpatch b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db drm-intel 26b5be95ee89 mei: bus: add mei_cldev_mtu interfaced5bf236e3cb0 mei: late_bind: add late binding component driver
-:37: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #37:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 387 lines checked080e566e78a3 drm/xe/xe_late_bind_fw: Introducing xe_late_bind_fw
-:91: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #91:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 211 lines checkedf774064f2796 drm/xe/xe_late_bind_fw: Initialize late binding firmware 52f9edc1f39d drm/xe/xe_late_bind_fw: Load late binding firmware cf9d1e09ecd7 drm/xe/xe_late_bind_fw: Reload late binding fw in rpm resume b87a38b0bf7c drm/xe/xe_late_bind_fw: Reload late binding fw during system resume 1cc121285cf0 drm/xe/xe_late_bind_fw: Introduce debug fs node to disable late binding 3ad58dfdca1b drm/xe/xe_late_bind_fw: Extract and print version info e265f1e55bd9 drm/xe/xe_late_bind_fw: Select INTEL_MEI_LATE_BIND for CI
Patchwork
CI✓ CI.KUnit: success for Introducing firmware late binding
In reply to Badal Nilawar== Series Details ==
== Series Details ==
Series: Introducing firmware late binding
URL : https://patchwork.freedesktop.org/series/150772/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [17:59:33] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [17:59:37] 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=48 [18:00:09] Starting KUnit Kernel (1/1)... [18:00:09] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [18:00:09] ================== guc_buf (11 subtests) =================== [18:00:09] [PASSED] test_smallest [18:00:09] [PASSED] test_largest [18:00:09] [PASSED] test_granular [18:00:09] [PASSED] test_unique [18:00:09] [PASSED] test_overlap [18:00:09] [PASSED] test_reusable [18:00:09] [PASSED] test_too_big [18:00:09] [PASSED] test_flush [18:00:09] [PASSED] test_lookup [18:00:09] [PASSED] test_data [18:00:09] [PASSED] test_class [18:00:09] ===================== [PASSED] guc_buf ===================== [18:00:09] =================== guc_dbm (7 subtests) =================== [18:00:09] [PASSED] test_empty [18:00:09] [PASSED] test_default [18:00:09] ======================== test_size ======================== [18:00:09] [PASSED] 4 [18:00:09] [PASSED] 8 [18:00:09] [PASSED] 32 [18:00:09] [PASSED] 256 [18:00:09] ==================== [PASSED] test_size ==================== [18:00:09] ======================= test_reuse ======================== [18:00:09] [PASSED] 4 [18:00:09] [PASSED] 8 [18:00:09] [PASSED] 32 [18:00:09] [PASSED] 256 [18:00:09] =================== [PASSED] test_reuse ==================== [18:00:09] =================== test_range_overlap ==================== [18:00:09] [PASSED] 4 [18:00:09] [PASSED] 8 [18:00:09] [PASSED] 32 [18:00:09] [PASSED] 256 [18:00:09] =============== [PASSED] test_range_overlap ================ [18:00:09] =================== test_range_compact ==================== [18:00:09] [PASSED] 4 [18:00:09] [PASSED] 8 [18:00:09] [PASSED] 32 [18:00:09] [PASSED] 256 [18:00:09] =============== [PASSED] test_range_compact ================ [18:00:09] ==================== test_range_spare ===================== [18:00:09] [PASSED] 4 [18:00:09] [PASSED] 8 [18:00:09] [PASSED] 32 [18:00:09] [PASSED] 256 [18:00:09] ================ [PASSED] test_range_spare ================= [18:00:09] ===================== [PASSED] guc_dbm ===================== [18:00:09] =================== guc_idm (6 subtests) =================== [18:00:09] [PASSED] bad_init [18:00:09] [PASSED] no_init [18:00:09] [PASSED] init_fini [18:00:09] [PASSED] check_used [18:00:09] [PASSED] check_quota [18:00:09] [PASSED] check_all [18:00:09] ===================== [PASSED] guc_idm ===================== [18:00:09] ================== no_relay (3 subtests) =================== [18:00:09] [PASSED] xe_drops_guc2pf_if_not_ready [18:00:09] [PASSED] xe_drops_guc2vf_if_not_ready [18:00:09] [PASSED] xe_rejects_send_if_not_ready [18:00:09] ==================== [PASSED] no_relay ===================== [18:00:09] ================== pf_relay (14 subtests) ================== [18:00:09] [PASSED] pf_rejects_guc2pf_too_short [18:00:09] [PASSED] pf_rejects_guc2pf_too_long [18:00:09] [PASSED] pf_rejects_guc2pf_no_payload [18:00:09] [PASSED] pf_fails_no_payload [18:00:09] [PASSED] pf_fails_bad_origin [18:00:09] [PASSED] pf_fails_bad_type [18:00:09] [PASSED] pf_txn_reports_error [18:00:09] [PASSED] pf_txn_sends_pf2guc [18:00:09] [PASSED] pf_sends_pf2guc [18:00:09] [SKIPPED] pf_loopback_nop [18:00:09] [SKIPPED] pf_loopback_echo [18:00:09] [SKIPPED] pf_loopback_fail [18:00:09] [SKIPPED] pf_loopback_busy [18:00:09] [SKIPPED] pf_loopback_retry [18:00:09] ==================== [PASSED] pf_relay ===================== [18:00:09] ================== vf_relay (3 subtests) =================== [18:00:09] [PASSED] vf_rejects_guc2vf_too_short [18:00:09] [PASSED] vf_rejects_guc2vf_too_long [18:00:09] [PASSED] vf_rejects_guc2vf_no_payload [18:00:09] ==================== [PASSED] vf_relay ===================== [18:00:09] ================= pf_service (11 subtests) ================= [18:00:09] [PASSED] pf_negotiate_any [18:00:09] [PASSED] pf_negotiate_base_match [18:00:09] [PASSED] pf_negotiate_base_newer [18:00:09] [PASSED] pf_negotiate_base_next [18:00:09] [SKIPPED] pf_negotiate_base_older [18:00:09] [PASSED] pf_negotiate_base_prev [18:00:09] [PASSED] pf_negotiate_latest_match [18:00:09] [PASSED] pf_negotiate_latest_newer [18:00:09] [PASSED] pf_negotiate_latest_next [18:00:09] [SKIPPED] pf_negotiate_latest_older [18:00:09] [SKIPPED] pf_negotiate_latest_prev [18:00:09] =================== [PASSED] pf_service ==================== [18:00:09] ===================== lmtt (1 subtest) ===================== [18:00:09] ======================== test_ops ========================= [18:00:09] [PASSED] 2-level [18:00:09] [PASSED] multi-level [18:00:09] ==================== [PASSED] test_ops ===================== [18:00:09] ====================== [PASSED] lmtt ======================= [18:00:09] =================== xe_mocs (2 subtests) =================== [18:00:09] ================ xe_live_mocs_kernel_kunit ================ [18:00:09] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [18:00:09] ================ xe_live_mocs_reset_kunit ================= [18:00:09] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [18:00:09] ==================== [SKIPPED] xe_mocs ===================== [18:00:09] ================= xe_migrate (2 subtests) ================== [18:00:09] ================= xe_migrate_sanity_kunit ================= [18:00:09] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [18:00:09] ================== xe_validate_ccs_kunit ================== [18:00:09] ============= [SKIPPED] xe_validate_ccs_kunit ============== [18:00:09] =================== [SKIPPED] xe_migrate =================== [18:00:09] ================== xe_dma_buf (1 subtest) ================== [18:00:09] ==================== xe_dma_buf_kunit ===================== [18:00:09] ================ [SKIPPED] xe_dma_buf_kunit ================ [18:00:09] =================== [SKIPPED] xe_dma_buf =================== [18:00:09] ================= xe_bo_shrink (1 subtest) ================= [18:00:09] =================== xe_bo_shrink_kunit ==================== [18:00:09] =============== [SKIPPED] xe_bo_shrink_kunit =============== [18:00:09] ================== [SKIPPED] xe_bo_shrink ================== [18:00:09] ==================== xe_bo (2 subtests) ==================== [18:00:09] ================== xe_ccs_migrate_kunit =================== [18:00:09] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [18:00:09] ==================== xe_bo_evict_kunit ==================== [18:00:09] =============== [SKIPPED] xe_bo_evict_kunit ================ [18:00:09] ===================== [SKIPPED] xe_bo ====================== [18:00:09] ==================== args (11 subtests) ==================== [18:00:09] [PASSED] count_args_test [18:00:09] [PASSED] call_args_example [18:00:09] [PASSED] call_args_test [18:00:09] [PASSED] drop_first_arg_example [18:00:09] [PASSED] drop_first_arg_test [18:00:09] [PASSED] first_arg_example [18:00:09] [PASSED] first_arg_test [18:00:09] [PASSED] last_arg_example [18:00:09] [PASSED] last_arg_test [18:00:09] [PASSED] pick_arg_example [18:00:09] [PASSED] sep_comma_example [18:00:09] ====================== [PASSED] args ======================= [18:00:09] =================== xe_pci (2 subtests) ==================== [18:00:09] ==================== check_graphics_ip ==================== [18:00:09] [PASSED] 12.70 Xe_LPG [18:00:09] [PASSED] 12.71 Xe_LPG [18:00:09] [PASSED] 12.74 Xe_LPG+ [18:00:09] [PASSED] 20.01 Xe2_HPG [18:00:09] [PASSED] 20.02 Xe2_HPG [18:00:09] [PASSED] 20.04 Xe2_LPG [18:00:09] [PASSED] 30.00 Xe3_LPG [18:00:09] [PASSED] 30.01 Xe3_LPG [18:00:09] [PASSED] 30.03 Xe3_LPG [18:00:09] ================ [PASSED] check_graphics_ip ================ [18:00:09] ===================== check_media_ip ====================== [18:00:09] [PASSED] 13.00 Xe_LPM+ [18:00:09] [PASSED] 13.01 Xe2_HPM [18:00:09] [PASSED] 20.00 Xe2_LPM [18:00:09] [PASSED] 30.00 Xe3_LPM [18:00:09] [PASSED] 30.02 Xe3_LPM stty: 'standard input': Inappropriate ioctl for device [18:00:09] ================= [PASSED] check_media_ip ================== [18:00:09] ===================== [PASSED] xe_pci ====================== [18:00:09] =================== xe_rtp (2 subtests) ==================== [18:00:09] =============== xe_rtp_process_to_sr_tests ================ [18:00:09] [PASSED] coalesce-same-reg [18:00:09] [PASSED] no-match-no-add [18:00:09] [PASSED] match-or [18:00:09] [PASSED] match-or-xfail [18:00:09] [PASSED] no-match-no-add-multiple-rules [18:00:09] [PASSED] two-regs-two-entries [18:00:09] [PASSED] clr-one-set-other [18:00:09] [PASSED] set-field [18:00:09] [PASSED] conflict-duplicate [18:00:09] [PASSED] conflict-not-disjoint [18:00:09] [PASSED] conflict-reg-type [18:00:09] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [18:00:09] ================== xe_rtp_process_tests =================== [18:00:09] [PASSED] active1 [18:00:09] [PASSED] active2 [18:00:09] [PASSED] active-inactive [18:00:09] [PASSED] inactive-active [18:00:09] [PASSED] inactive-1st_or_active-inactive [18:00:09] [PASSED] inactive-2nd_or_active-inactive [18:00:09] [PASSED] inactive-last_or_active-inactive [18:00:09] [PASSED] inactive-no_or_active-inactive [18:00:09] ============== [PASSED] xe_rtp_process_tests =============== [18:00:09] ===================== [PASSED] xe_rtp ====================== [18:00:09] ==================== xe_wa (1 subtest) ===================== [18:00:09] ======================== xe_wa_gt ========================= [18:00:09] [PASSED] TIGERLAKE (B0) [18:00:09] [PASSED] DG1 (A0) [18:00:09] [PASSED] DG1 (B0) [18:00:09] [PASSED] ALDERLAKE_S (A0) [18:00:09] [PASSED] ALDERLAKE_S (B0) [18:00:09] [PASSED] ALDERLAKE_S (C0) [18:00:09] [PASSED] ALDERLAKE_S (D0) [18:00:09] [PASSED] ALDERLAKE_P (A0) [18:00:09] [PASSED] ALDERLAKE_P (B0) [18:00:09] [PASSED] ALDERLAKE_P (C0) [18:00:09] [PASSED] ALDERLAKE_S_RPLS (D0) [18:00:09] [PASSED] ALDERLAKE_P_RPLU (E0) [18:00:09] [PASSED] DG2_G10 (C0) [18:00:09] [PASSED] DG2_G11 (B1) [18:00:09] [PASSED] DG2_G12 (A1) [18:00:09] [PASSED] METEORLAKE (g:A0, m:A0) [18:00:09] [PASSED] METEORLAKE (g:A0, m:A0) [18:00:09] [PASSED] METEORLAKE (g:A0, m:A0) [18:00:09] [PASSED] LUNARLAKE (g:A0, m:A0) [18:00:09] [PASSED] LUNARLAKE (g:B0, m:A0) [18:00:09] [PASSED] BATTLEMAGE (g:A0, m:A1) [18:00:09] ==================== [PASSED] xe_wa_gt ===================== [18:00:09] ====================== [PASSED] xe_wa ====================== [18:00:09] ============================================================ [18:00:09] Testing complete. Ran 145 tests: passed: 129, skipped: 16 [18:00:09] Elapsed time: 36.397s total, 4.184s configuring, 31.897s building, 0.299s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [18:00:09] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [18:00:11] 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=48 [18:00:33] Starting KUnit Kernel (1/1)... [18:00:33] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [18:00:33] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [18:00:33] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [18:00:33] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [18:00:33] =========== drm_validate_clone_mode (2 subtests) =========== [18:00:33] ============== drm_test_check_in_clone_mode =============== [18:00:33] [PASSED] in_clone_mode [18:00:33] [PASSED] not_in_clone_mode [18:00:33] ========== [PASSED] drm_test_check_in_clone_mode =========== [18:00:33] =============== drm_test_check_valid_clones =============== [18:00:33] [PASSED] not_in_clone_mode [18:00:33] [PASSED] valid_clone [18:00:33] [PASSED] invalid_clone [18:00:33] =========== [PASSED] drm_test_check_valid_clones =========== [18:00:33] ============= [PASSED] drm_validate_clone_mode ============= [18:00:33] ============= drm_validate_modeset (1 subtest) ============= [18:00:33] [PASSED] drm_test_check_connector_changed_modeset [18:00:33] ============== [PASSED] drm_validate_modeset =============== [18:00:33] ====== drm_test_bridge_get_current_state (2 subtests) ====== [18:00:33] [PASSED] drm_test_drm_bridge_get_current_state_atomic [18:00:33] [PASSED] drm_test_drm_bridge_get_current_state_legacy [18:00:33] ======== [PASSED] drm_test_bridge_get_current_state ======== [18:00:33] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [18:00:33] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [18:00:33] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [18:00:33] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy [18:00:33] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [18:00:33] ============== drm_bridge_alloc (2 subtests) =============== [18:00:33] [PASSED] drm_test_drm_bridge_alloc_basic [18:00:33] [PASSED] drm_test_drm_bridge_alloc_get_put [18:00:33] ================ [PASSED] drm_bridge_alloc ================= [18:00:33] ================== drm_buddy (7 subtests) ================== [18:00:33] [PASSED] drm_test_buddy_alloc_limit [18:00:33] [PASSED] drm_test_buddy_alloc_optimistic [18:00:33] [PASSED] drm_test_buddy_alloc_pessimistic [18:00:33] [PASSED] drm_test_buddy_alloc_pathological [18:00:33] [PASSED] drm_test_buddy_alloc_contiguous [18:00:33] [PASSED] drm_test_buddy_alloc_clear [18:00:33] [PASSED] drm_test_buddy_alloc_range_bias [18:00:33] ==================== [PASSED] drm_buddy ==================== [18:00:33] ============= drm_cmdline_parser (40 subtests) ============= [18:00:33] [PASSED] drm_test_cmdline_force_d_only [18:00:33] [PASSED] drm_test_cmdline_force_D_only_dvi [18:00:33] [PASSED] drm_test_cmdline_force_D_only_hdmi [18:00:33] [PASSED] drm_test_cmdline_force_D_only_not_digital [18:00:33] [PASSED] drm_test_cmdline_force_e_only [18:00:33] [PASSED] drm_test_cmdline_res [18:00:33] [PASSED] drm_test_cmdline_res_vesa [18:00:33] [PASSED] drm_test_cmdline_res_vesa_rblank [18:00:33] [PASSED] drm_test_cmdline_res_rblank [18:00:33] [PASSED] drm_test_cmdline_res_bpp [18:00:33] [PASSED] drm_test_cmdline_res_refresh [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [18:00:33] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [18:00:33] [PASSED] drm_test_cmdline_res_margins_force_on [18:00:33] [PASSED] drm_test_cmdline_res_vesa_margins [18:00:33] [PASSED] drm_test_cmdline_name [18:00:33] [PASSED] drm_test_cmdline_name_bpp [18:00:33] [PASSED] drm_test_cmdline_name_option [18:00:33] [PASSED] drm_test_cmdline_name_bpp_option [18:00:33] [PASSED] drm_test_cmdline_rotate_0 [18:00:33] [PASSED] drm_test_cmdline_rotate_90 [18:00:33] [PASSED] drm_test_cmdline_rotate_180 [18:00:33] [PASSED] drm_test_cmdline_rotate_270 [18:00:33] [PASSED] drm_test_cmdline_hmirror [18:00:33] [PASSED] drm_test_cmdline_vmirror [18:00:33] [PASSED] drm_test_cmdline_margin_options [18:00:33] [PASSED] drm_test_cmdline_multiple_options [18:00:33] [PASSED] drm_test_cmdline_bpp_extra_and_option [18:00:33] [PASSED] drm_test_cmdline_extra_and_option [18:00:33] [PASSED] drm_test_cmdline_freestanding_options [18:00:33] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [18:00:33] [PASSED] drm_test_cmdline_panel_orientation [18:00:33] ================ drm_test_cmdline_invalid ================= [18:00:33] [PASSED] margin_only [18:00:33] [PASSED] interlace_only [18:00:33] [PASSED] res_missing_x [18:00:33] [PASSED] res_missing_y [18:00:33] [PASSED] res_bad_y [18:00:33] [PASSED] res_missing_y_bpp [18:00:33] [PASSED] res_bad_bpp [18:00:33] [PASSED] res_bad_refresh [18:00:33] [PASSED] res_bpp_refresh_force_on_off [18:00:33] [PASSED] res_invalid_mode [18:00:33] [PASSED] res_bpp_wrong_place_mode [18:00:33] [PASSED] name_bpp_refresh [18:00:33] [PASSED] name_refresh [18:00:33] [PASSED] name_refresh_wrong_mode [18:00:33] [PASSED] name_refresh_invalid_mode [18:00:33] [PASSED] rotate_multiple [18:00:33] [PASSED] rotate_invalid_val [18:00:33] [PASSED] rotate_truncated [18:00:33] [PASSED] invalid_option [18:00:33] [PASSED] invalid_tv_option [18:00:33] [PASSED] truncated_tv_option [18:00:33] ============ [PASSED] drm_test_cmdline_invalid ============= [18:00:33] =============== drm_test_cmdline_tv_options =============== [18:00:33] [PASSED] NTSC [18:00:33] [PASSED] NTSC_443 [18:00:33] [PASSED] NTSC_J [18:00:33] [PASSED] PAL [18:00:33] [PASSED] PAL_M [18:00:33] [PASSED] PAL_N [18:00:33] [PASSED] SECAM [18:00:33] [PASSED] MONO_525 [18:00:33] [PASSED] MONO_625 [18:00:33] =========== [PASSED] drm_test_cmdline_tv_options =========== [18:00:33] =============== [PASSED] drm_cmdline_parser ================ [18:00:33] ========== drmm_connector_hdmi_init (20 subtests) ========== [18:00:33] [PASSED] drm_test_connector_hdmi_init_valid [18:00:33] [PASSED] drm_test_connector_hdmi_init_bpc_8 [18:00:33] [PASSED] drm_test_connector_hdmi_init_bpc_10 [18:00:33] [PASSED] drm_test_connector_hdmi_init_bpc_12 [18:00:33] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [18:00:33] [PASSED] drm_test_connector_hdmi_init_bpc_null [18:00:33] [PASSED] drm_test_connector_hdmi_init_formats_empty [18:00:33] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [18:00:33] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [18:00:33] [PASSED] supported_formats=0x9 yuv420_allowed=1 [18:00:33] [PASSED] supported_formats=0x9 yuv420_allowed=0 [18:00:33] [PASSED] supported_formats=0x3 yuv420_allowed=1 [18:00:33] [PASSED] supported_formats=0x3 yuv420_allowed=0 [18:00:33] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [18:00:33] [PASSED] drm_test_connector_hdmi_init_null_ddc [18:00:33] [PASSED] drm_test_connector_hdmi_init_null_product [18:00:33] [PASSED] drm_test_connector_hdmi_init_null_vendor [18:00:33] [PASSED] drm_test_connector_hdmi_init_product_length_exact [18:00:33] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [18:00:33] [PASSED] drm_test_connector_hdmi_init_product_valid [18:00:33] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [18:00:33] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [18:00:33] [PASSED] drm_test_connector_hdmi_init_vendor_valid [18:00:33] ========= drm_test_connector_hdmi_init_type_valid ========= [18:00:33] [PASSED] HDMI-A [18:00:33] [PASSED] HDMI-B [18:00:33] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [18:00:33] ======== drm_test_connector_hdmi_init_type_invalid ======== [18:00:33] [PASSED] Unknown [18:00:33] [PASSED] VGA [18:00:33] [PASSED] DVI-I [18:00:33] [PASSED] DVI-D [18:00:33] [PASSED] DVI-A [18:00:33] [PASSED] Composite [18:00:33] [PASSED] SVIDEO [18:00:33] [PASSED] LVDS [18:00:33] [PASSED] Component [18:00:33] [PASSED] DIN [18:00:33] [PASSED] DP [18:00:33] [PASSED] TV [18:00:33] [PASSED] eDP [18:00:33] [PASSED] Virtual [18:00:33] [PASSED] DSI [18:00:33] [PASSED] DPI [18:00:33] [PASSED] Writeback [18:00:33] [PASSED] SPI [18:00:33] [PASSED] USB [18:00:33] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [18:00:33] ============ [PASSED] drmm_connector_hdmi_init ============= [18:00:33] ============= drmm_connector_init (3 subtests) ============= [18:00:33] [PASSED] drm_test_drmm_connector_init [18:00:33] [PASSED] drm_test_drmm_connector_init_null_ddc [18:00:33] ========= drm_test_drmm_connector_init_type_valid ========= [18:00:33] [PASSED] Unknown [18:00:33] [PASSED] VGA [18:00:33] [PASSED] DVI-I [18:00:33] [PASSED] DVI-D [18:00:33] [PASSED] DVI-A [18:00:33] [PASSED] Composite [18:00:33] [PASSED] SVIDEO [18:00:33] [PASSED] LVDS [18:00:33] [PASSED] Component [18:00:33] [PASSED] DIN [18:00:33] [PASSED] DP [18:00:33] [PASSED] HDMI-A [18:00:33] [PASSED] HDMI-B [18:00:33] [PASSED] TV [18:00:33] [PASSED] eDP [18:00:33] [PASSED] Virtual [18:00:33] [PASSED] DSI [18:00:33] [PASSED] DPI [18:00:33] [PASSED] Writeback [18:00:33] [PASSED] SPI [18:00:33] [PASSED] USB [18:00:33] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [18:00:33] =============== [PASSED] drmm_connector_init =============== [18:00:33] ========= drm_connector_dynamic_init (6 subtests) ========== [18:00:33] [PASSED] drm_test_drm_connector_dynamic_init [18:00:33] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [18:00:33] [PASSED] drm_test_drm_connector_dynamic_init_not_added [18:00:33] [PASSED] drm_test_drm_connector_dynamic_init_properties [18:00:33] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [18:00:33] [PASSED] Unknown [18:00:33] [PASSED] VGA [18:00:33] [PASSED] DVI-I [18:00:33] [PASSED] DVI-D [18:00:33] [PASSED] DVI-A [18:00:33] [PASSED] Composite [18:00:33] [PASSED] SVIDEO [18:00:33] [PASSED] LVDS [18:00:33] [PASSED] Component [18:00:33] [PASSED] DIN [18:00:33] [PASSED] DP [18:00:33] [PASSED] HDMI-A [18:00:33] [PASSED] HDMI-B [18:00:33] [PASSED] TV [18:00:33] [PASSED] eDP [18:00:33] [PASSED] Virtual [18:00:33] [PASSED] DSI [18:00:33] [PASSED] DPI [18:00:33] [PASSED] Writeback [18:00:33] [PASSED] SPI [18:00:33] [PASSED] USB [18:00:33] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [18:00:33] ======== drm_test_drm_connector_dynamic_init_name ========= [18:00:33] [PASSED] Unknown [18:00:33] [PASSED] VGA [18:00:33] [PASSED] DVI-I [18:00:33] [PASSED] DVI-D [18:00:33] [PASSED] DVI-A [18:00:33] [PASSED] Composite [18:00:33] [PASSED] SVIDEO [18:00:33] [PASSED] LVDS [18:00:33] [PASSED] Component [18:00:33] [PASSED] DIN [18:00:33] [PASSED] DP [18:00:33] [PASSED] HDMI-A [18:00:33] [PASSED] HDMI-B [18:00:33] [PASSED] TV [18:00:33] [PASSED] eDP [18:00:33] [PASSED] Virtual [18:00:33] [PASSED] DSI [18:00:33] [PASSED] DPI [18:00:33] [PASSED] Writeback [18:00:33] [PASSED] SPI [18:00:33] [PASSED] USB [18:00:33] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [18:00:33] =========== [PASSED] drm_connector_dynamic_init ============ [18:00:33] ==== drm_connector_dynamic_register_early (4 subtests) ===== [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [18:00:33] ====== [PASSED] drm_connector_dynamic_register_early ======= [18:00:33] ======= drm_connector_dynamic_register (7 subtests) ======== [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_on_list [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_no_init [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [18:00:33] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [18:00:33] ========= [PASSED] drm_connector_dynamic_register ========== [18:00:33] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [18:00:33] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [18:00:33] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [18:00:33] === [PASSED] drm_connector_attach_broadcast_rgb_property === [18:00:33] ========== drm_get_tv_mode_from_name (2 subtests) ========== [18:00:33] ========== drm_test_get_tv_mode_from_name_valid =========== [18:00:33] [PASSED] NTSC [18:00:33] [PASSED] NTSC-443 [18:00:33] [PASSED] NTSC-J [18:00:33] [PASSED] PAL [18:00:33] [PASSED] PAL-M [18:00:33] [PASSED] PAL-N [18:00:33] [PASSED] SECAM [18:00:33] [PASSED] Mono [18:00:33] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [18:00:33] [PASSED] drm_test_get_tv_mode_from_name_truncated [18:00:33] ============ [PASSED] drm_get_tv_mode_from_name ============ [18:00:33] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [18:00:33] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [18:00:33] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [18:00:33] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [18:00:33] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [18:00:33] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [18:00:33] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [18:00:33] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [18:00:33] [PASSED] VIC 96 [18:00:33] [PASSED] VIC 97 [18:00:33] [PASSED] VIC 101 [18:00:33] [PASSED] VIC 102 [18:00:33] [PASSED] VIC 106 [18:00:33] [PASSED] VIC 107 [18:00:33] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [18:00:33] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [18:00:33] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [18:00:33] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [18:00:33] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [18:00:33] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [18:00:33] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [18:00:33] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [18:00:33] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [18:00:33] [PASSED] Automatic [18:00:33] [PASSED] Full [18:00:33] [PASSED] Limited 16:235 [18:00:33] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [18:00:33] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [18:00:33] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [18:00:33] == drm_hdmi_connector_get_output_format_name (2 subtests) == [18:00:33] === drm_test_drm_hdmi_connector_get_output_format_name ==== [18:00:33] [PASSED] RGB [18:00:33] [PASSED] YUV 4:2:0 [18:00:33] [PASSED] YUV 4:2:2 [18:00:33] [PASSED] YUV 4:4:4 [18:00:33] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [18:00:33] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [18:00:33] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [18:00:33] ============= drm_damage_helper (21 subtests) ============== [18:00:33] [PASSED] drm_test_damage_iter_no_damage [18:00:33] [PASSED] drm_test_damage_iter_no_damage_fractional_src [18:00:33] [PASSED] drm_test_damage_iter_no_damage_src_moved [18:00:33] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [18:00:33] [PASSED] drm_test_damage_iter_no_damage_not_visible [18:00:33] [PASSED] drm_test_damage_iter_no_damage_no_crtc [18:00:33] [PASSED] drm_test_damage_iter_no_damage_no_fb [18:00:33] [PASSED] drm_test_damage_iter_simple_damage [18:00:33] [PASSED] drm_test_damage_iter_single_damage [18:00:33] [PASSED] drm_test_damage_iter_single_damage_intersect_src [18:00:33] [PASSED] drm_test_damage_iter_single_damage_outside_src [18:00:33] [PASSED] drm_test_damage_iter_single_damage_fractional_src [18:00:33] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [18:00:33] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [18:00:33] [PASSED] drm_test_damage_iter_single_damage_src_moved [18:00:33] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [18:00:33] [PASSED] drm_test_damage_iter_damage [18:00:33] [PASSED] drm_test_damage_iter_damage_one_intersect [18:00:33] [PASSED] drm_test_damage_iter_damage_one_outside [18:00:33] [PASSED] drm_test_damage_iter_damage_src_moved [18:00:33] [PASSED] drm_test_damage_iter_damage_not_visible [18:00:33] ================ [PASSED] drm_damage_helper ================ [18:00:33] ============== drm_dp_mst_helper (3 subtests) ============== [18:00:33] ============== drm_test_dp_mst_calc_pbn_mode ============== [18:00:33] [PASSED] Clock 154000 BPP 30 DSC disabled [18:00:33] [PASSED] Clock 234000 BPP 30 DSC disabled [18:00:33] [PASSED] Clock 297000 BPP 24 DSC disabled [18:00:33] [PASSED] Clock 332880 BPP 24 DSC enabled [18:00:33] [PASSED] Clock 324540 BPP 24 DSC enabled [18:00:33] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [18:00:33] ============== drm_test_dp_mst_calc_pbn_div =============== [18:00:33] [PASSED] Link rate 2000000 lane count 4 [18:00:33] [PASSED] Link rate 2000000 lane count 2 [18:00:33] [PASSED] Link rate 2000000 lane count 1 [18:00:33] [PASSED] Link rate 1350000 lane count 4 [18:00:33] [PASSED] Link rate 1350000 lane count 2 [18:00:33] [PASSED] Link rate 1350000 lane count 1 [18:00:33] [PASSED] Link rate 1000000 lane count 4 [18:00:33] [PASSED] Link rate 1000000 lane count 2 [18:00:33] [PASSED] Link rate 1000000 lane count 1 [18:00:33] [PASSED] Link rate 810000 lane count 4 [18:00:33] [PASSED] Link rate 810000 lane count 2 [18:00:33] [PASSED] Link rate 810000 lane count 1 [18:00:33] [PASSED] Link rate 540000 lane count 4 [18:00:33] [PASSED] Link rate 540000 lane count 2 [18:00:33] [PASSED] Link rate 540000 lane count 1 [18:00:33] [PASSED] Link rate 270000 lane count 4 [18:00:33] [PASSED] Link rate 270000 lane count 2 [18:00:33] [PASSED] Link rate 270000 lane count 1 [18:00:33] [PASSED] Link rate 162000 lane count 4 [18:00:33] [PASSED] Link rate 162000 lane count 2 [18:00:33] [PASSED] Link rate 162000 lane count 1 [18:00:33] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [18:00:33] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [18:00:33] [PASSED] DP_ENUM_PATH_RESOURCES with port number [18:00:33] [PASSED] DP_POWER_UP_PHY with port number [18:00:33] [PASSED] DP_POWER_DOWN_PHY with port number [18:00:33] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [18:00:33] [PASSED] DP_ALLOCATE_PAYLOAD with port number [18:00:33] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [18:00:33] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [18:00:33] [PASSED] DP_QUERY_PAYLOAD with port number [18:00:33] [PASSED] DP_QUERY_PAYLOAD with VCPI [18:00:33] [PASSED] DP_REMOTE_DPCD_READ with port number [18:00:33] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [18:00:33] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [18:00:33] [PASSED] DP_REMOTE_DPCD_WRITE with port number [18:00:33] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [18:00:33] [PASSED] DP_REMOTE_DPCD_WRITE with data array [18:00:33] [PASSED] DP_REMOTE_I2C_READ with port number [18:00:33] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [18:00:33] [PASSED] DP_REMOTE_I2C_READ with transactions array [18:00:33] [PASSED] DP_REMOTE_I2C_WRITE with port number [18:00:33] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [18:00:33] [PASSED] DP_REMOTE_I2C_WRITE with data array [18:00:33] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [18:00:33] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [18:00:33] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [18:00:33] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [18:00:33] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [18:00:33] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [18:00:33] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [18:00:33] ================ [PASSED] drm_dp_mst_helper ================ [18:00:33] ================== drm_exec (7 subtests) =================== [18:00:33] [PASSED] sanitycheck [18:00:33] [PASSED] test_lock [18:00:33] [PASSED] test_lock_unlock [18:00:33] [PASSED] test_duplicates [18:00:33] [PASSED] test_prepare [18:00:33] [PASSED] test_prepare_array [18:00:33] [PASSED] test_multiple_loops [18:00:33] ==================== [PASSED] drm_exec ===================== [18:00:33] =========== drm_format_helper_test (17 subtests) =========== [18:00:33] ============== drm_test_fb_xrgb8888_to_gray8 ============== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [18:00:33] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [18:00:33] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [18:00:33] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [18:00:33] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [18:00:33] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [18:00:33] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [18:00:33] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [18:00:33] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [18:00:33] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [18:00:33] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [18:00:33] ============== drm_test_fb_xrgb8888_to_mono =============== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [18:00:33] ==================== drm_test_fb_swab ===================== [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ================ [PASSED] drm_test_fb_swab ================= [18:00:33] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [18:00:33] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [18:00:33] [PASSED] single_pixel_source_buffer [18:00:33] [PASSED] single_pixel_clip_rectangle [18:00:33] [PASSED] well_known_colors [18:00:33] [PASSED] destination_pitch [18:00:33] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [18:00:33] ================= drm_test_fb_clip_offset ================= [18:00:33] [PASSED] pass through [18:00:33] [PASSED] horizontal offset [18:00:33] [PASSED] vertical offset [18:00:33] [PASSED] horizontal and vertical offset [18:00:33] [PASSED] horizontal offset (custom pitch) [18:00:33] [PASSED] vertical offset (custom pitch) [18:00:33] [PASSED] horizontal and vertical offset (custom pitch) [18:00:33] ============= [PASSED] drm_test_fb_clip_offset ============= [18:00:33] =================== drm_test_fb_memcpy ==================== [18:00:33] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [18:00:33] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [18:00:33] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [18:00:33] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [18:00:33] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [18:00:33] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [18:00:33] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [18:00:33] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [18:00:33] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [18:00:33] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [18:00:33] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [18:00:33] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [18:00:33] =============== [PASSED] drm_test_fb_memcpy ================ [18:00:33] ============= [PASSED] drm_format_helper_test ============== [18:00:33] ================= drm_format (18 subtests) ================= [18:00:33] [PASSED] drm_test_format_block_width_invalid [18:00:33] [PASSED] drm_test_format_block_width_one_plane [18:00:33] [PASSED] drm_test_format_block_width_two_plane [18:00:33] [PASSED] drm_test_format_block_width_three_plane [18:00:33] [PASSED] drm_test_format_block_width_tiled [18:00:33] [PASSED] drm_test_format_block_height_invalid [18:00:33] [PASSED] drm_test_format_block_height_one_plane [18:00:33] [PASSED] drm_test_format_block_height_two_plane [18:00:33] [PASSED] drm_test_format_block_height_three_plane [18:00:33] [PASSED] drm_test_format_block_height_tiled [18:00:33] [PASSED] drm_test_format_min_pitch_invalid [18:00:33] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [18:00:33] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [18:00:33] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [18:00:33] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [18:00:33] [PASSED] drm_test_format_min_pitch_two_plane [18:00:33] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [18:00:33] [PASSED] drm_test_format_min_pitch_tiled [18:00:33] =================== [PASSED] drm_format ==================== [18:00:33] ============== drm_framebuffer (10 subtests) =============== [18:00:33] ========== drm_test_framebuffer_check_src_coords ========== [18:00:33] [PASSED] Success: source fits into fb [18:00:33] [PASSED] Fail: overflowing fb with x-axis coordinate [18:00:33] [PASSED] Fail: overflowing fb with y-axis coordinate [18:00:33] [PASSED] Fail: overflowing fb with source width [18:00:33] [PASSED] Fail: overflowing fb with source height [18:00:33] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [18:00:33] [PASSED] drm_test_framebuffer_cleanup [18:00:33] =============== drm_test_framebuffer_create =============== [18:00:33] [PASSED] ABGR8888 normal sizes [18:00:33] [PASSED] ABGR8888 max sizes [18:00:33] [PASSED] ABGR8888 pitch greater than min required [18:00:33] [PASSED] ABGR8888 pitch less than min required [18:00:33] [PASSED] ABGR8888 Invalid width [18:00:33] [PASSED] ABGR8888 Invalid buffer handle [18:00:33] [PASSED] No pixel format [18:00:33] [PASSED] ABGR8888 Width 0 [18:00:33] [PASSED] ABGR8888 Height 0 [18:00:33] [PASSED] ABGR8888 Out of bound height * pitch combination [18:00:33] [PASSED] ABGR8888 Large buffer offset [18:00:33] [PASSED] ABGR8888 Buffer offset for inexistent plane [18:00:33] [PASSED] ABGR8888 Invalid flag [18:00:33] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [18:00:33] [PASSED] ABGR8888 Valid buffer modifier [18:00:33] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [18:00:33] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] NV12 Normal sizes [18:00:33] [PASSED] NV12 Max sizes [18:00:33] [PASSED] NV12 Invalid pitch [18:00:33] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [18:00:33] [PASSED] NV12 different modifier per-plane [18:00:33] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [18:00:33] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] NV12 Modifier for inexistent plane [18:00:33] [PASSED] NV12 Handle for inexistent plane [18:00:33] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [18:00:33] [PASSED] YVU420 Normal sizes [18:00:33] [PASSED] YVU420 Max sizes [18:00:33] [PASSED] YVU420 Invalid pitch [18:00:33] [PASSED] YVU420 Different pitches [18:00:33] [PASSED] YVU420 Different buffer offsets/pitches [18:00:33] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [18:00:33] [PASSED] YVU420 Valid modifier [18:00:33] [PASSED] YVU420 Different modifiers per plane [18:00:33] [PASSED] YVU420 Modifier for inexistent plane [18:00:33] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [18:00:33] [PASSED] X0L2 Normal sizes [18:00:33] [PASSED] X0L2 Max sizes [18:00:33] [PASSED] X0L2 Invalid pitch [18:00:33] [PASSED] X0L2 Pitch greater than minimum required [18:00:33] [PASSED] X0L2 Handle for inexistent plane [18:00:33] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [18:00:33] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [18:00:33] [PASSED] X0L2 Valid modifier [18:00:33] [PASSED] X0L2 Modifier for inexistent plane [18:00:33] =========== [PASSED] drm_test_framebuffer_create =========== [18:00:33] [PASSED] drm_test_framebuffer_free [18:00:33] [PASSED] drm_test_framebuffer_init [18:00:33] [PASSED] drm_test_framebuffer_init_bad_format [18:00:33] [PASSED] drm_test_framebuffer_init_dev_mismatch [18:00:33] [PASSED] drm_test_framebuffer_lookup [18:00:33] [PASSED] drm_test_framebuffer_lookup_inexistent [18:00:33] [PASSED] drm_test_framebuffer_modifiers_not_supported [18:00:33] ================= [PASSED] drm_framebuffer ================= [18:00:33] ================ drm_gem_shmem (8 subtests) ================ [18:00:33] [PASSED] drm_gem_shmem_test_obj_create [18:00:33] [PASSED] drm_gem_shmem_test_obj_create_private [18:00:33] [PASSED] drm_gem_shmem_test_pin_pages [18:00:33] [PASSED] drm_gem_shmem_test_vmap [18:00:33] [PASSED] drm_gem_shmem_test_get_pages_sgt [18:00:33] [PASSED] drm_gem_shmem_test_get_sg_table [18:00:33] [PASSED] drm_gem_shmem_test_madvise [18:00:33] [PASSED] drm_gem_shmem_test_purge [18:00:33] ================== [PASSED] drm_gem_shmem ================== [18:00:33] === drm_atomic_helper_connector_hdmi_check (27 subtests) === [18:00:33] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [18:00:33] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [18:00:33] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [18:00:33] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [18:00:33] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [18:00:33] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [18:00:33] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [18:00:33] [PASSED] Automatic [18:00:33] [PASSED] Full [18:00:33] [PASSED] Limited 16:235 [18:00:33] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [18:00:33] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [18:00:33] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [18:00:33] [PASSED] drm_test_check_disable_connector [18:00:33] [PASSED] drm_test_check_hdmi_funcs_reject_rate [18:00:33] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [18:00:33] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [18:00:33] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [18:00:33] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [18:00:33] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [18:00:33] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [18:00:33] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [18:00:33] [PASSED] drm_test_check_output_bpc_dvi [18:00:33] [PASSED] drm_test_check_output_bpc_format_vic_1 [18:00:33] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [18:00:33] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [18:00:33] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [18:00:33] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [18:00:33] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [18:00:33] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [18:00:33] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [18:00:33] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [18:00:33] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [18:00:33] [PASSED] drm_test_check_broadcast_rgb_value [18:00:33] [PASSED] drm_test_check_bpc_8_value [18:00:33] [PASSED] drm_test_check_bpc_10_value [18:00:33] [PASSED] drm_test_check_bpc_12_value [18:00:33] [PASSED] drm_test_check_format_value [18:00:33] [PASSED] drm_test_check_tmds_char_value [18:00:33] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [18:00:33] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) = [18:00:33] [PASSED] drm_test_check_mode_valid [18:00:33] [PASSED] drm_test_check_mode_valid_reject [18:00:33] [PASSED] drm_test_check_mode_valid_reject_rate [18:00:33] [PASSED] drm_test_check_mode_valid_reject_max_clock [18:00:33] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [18:00:33] ================= drm_managed (2 subtests) ================= [18:00:33] [PASSED] drm_test_managed_release_action [18:00:33] [PASSED] drm_test_managed_run_action [18:00:33] =================== [PASSED] drm_managed =================== [18:00:33] =================== drm_mm (6 subtests) ==================== [18:00:33] [PASSED] drm_test_mm_init [18:00:33] [PASSED] drm_test_mm_debug [18:00:33] [PASSED] drm_test_mm_align32 [18:00:33] [PASSED] drm_test_mm_align64 [18:00:33] [PASSED] drm_test_mm_lowest [18:00:33] [PASSED] drm_test_mm_highest [18:00:33] ===================== [PASSED] drm_mm ====================== [18:00:33] ============= drm_modes_analog_tv (5 subtests) ============= [18:00:33] [PASSED] drm_test_modes_analog_tv_mono_576i [18:00:33] [PASSED] drm_test_modes_analog_tv_ntsc_480i [18:00:33] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [18:00:33] [PASSED] drm_test_modes_analog_tv_pal_576i [18:00:33] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [18:00:33] =============== [PASSED] drm_modes_analog_tv =============== [18:00:33] ============== drm_plane_helper (2 subtests) =============== [18:00:33] =============== drm_test_check_plane_state ================ [18:00:33] [PASSED] clipping_simple [18:00:33] [PASSED] clipping_rotate_reflect [18:00:33] [PASSED] positioning_simple [18:00:33] [PASSED] upscaling [18:00:33] [PASSED] downscaling [18:00:33] [PASSED] rounding1 [18:00:33] [PASSED] rounding2 [18:00:33] [PASSED] rounding3 [18:00:33] [PASSED] rounding4 [18:00:33] =========== [PASSED] drm_test_check_plane_state ============ [18:00:33] =========== drm_test_check_invalid_plane_state ============ [18:00:33] [PASSED] positioning_invalid [18:00:33] [PASSED] upscaling_invalid [18:00:33] [PASSED] downscaling_invalid [18:00:33] ======= [PASSED] drm_test_check_invalid_plane_state ======== [18:00:33] ================ [PASSED] drm_plane_helper ================= [18:00:33] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [18:00:33] ====== drm_test_connector_helper_tv_get_modes_check ======= [18:00:33] [PASSED] None [18:00:33] [PASSED] PAL [18:00:33] [PASSED] NTSC [18:00:33] [PASSED] Both, NTSC Default [18:00:33] [PASSED] Both, PAL Default [18:00:33] [PASSED] Both, NTSC Default, with PAL on command-line [18:00:33] [PASSED] Both, PAL Default, with NTSC on command-line [18:00:33] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [18:00:33] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [18:00:33] ================== drm_rect (9 subtests) =================== [18:00:33] [PASSED] drm_test_rect_clip_scaled_div_by_zero [18:00:33] [PASSED] drm_test_rect_clip_scaled_not_clipped [18:00:33] [PASSED] drm_test_rect_clip_scaled_clipped [18:00:33] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [18:00:33] ================= drm_test_rect_intersect ================= [18:00:33] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [18:00:33] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [18:00:33] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [18:00:33] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [18:00:33] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [18:00:33] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [18:00:33] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [18:00:33] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [18:00:33] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [18:00:33] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [18:00:33] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [18:00:33] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [18:00:33] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [18:00:33] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [18:00:33] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [18:00:33] ============= [PASSED] drm_test_rect_intersect ============= [18:00:33] ================ drm_test_rect_calc_hscale ================ [18:00:33] [PASSED] normal use [18:00:33] [PASSED] out of max range [18:00:33] [PASSED] out of min range [18:00:33] [PASSED] zero dst [18:00:33] [PASSED] negative src [18:00:33] [PASSED] negative dst [18:00:33] ============ [PASSED] drm_test_rect_calc_hscale ============ [18:00:33] ================ drm_test_rect_calc_vscale ================ [18:00:33] [PASSED] normal use [18:00:33] [PASSED] out of max range [18:00:33] [PASSED] out of min range [18:00:33] [PASSED] zero dst [18:00:33] [PASSED] negative src [18:00:33] [PASSED] negative dst [18:00:33] ============ [PASSED] drm_test_rect_calc_vscale ============ [18:00:33] ================== drm_test_rect_rotate =================== [18:00:33] [PASSED] reflect-x [18:00:33] [PASSED] reflect-y [18:00:33] [PASSED] rotate-0 [18:00:33] [PASSED] rotate-90 [18:00:33] [PASSED] rotate-180 [18:00:33] [PASSED] rotate-270 stty: 'standard input': Inappropriate ioctl for device [18:00:33] ============== [PASSED] drm_test_rect_rotate =============== [18:00:33] ================ drm_test_rect_rotate_inv ================= [18:00:33] [PASSED] reflect-x [18:00:33] [PASSED] reflect-y [18:00:33] [PASSED] rotate-0 [18:00:33] [PASSED] rotate-90 [18:00:33] [PASSED] rotate-180 [18:00:33] [PASSED] rotate-270 [18:00:33] ============ [PASSED] drm_test_rect_rotate_inv ============= [18:00:33] ==================== [PASSED] drm_rect ===================== [18:00:33] ============ drm_sysfb_modeset_test (1 subtest) ============ [18:00:33] ============ drm_test_sysfb_build_fourcc_list ============= [18:00:33] [PASSED] no native formats [18:00:33] [PASSED] XRGB8888 as native format [18:00:33] [PASSED] remove duplicates [18:00:33] [PASSED] convert alpha formats [18:00:33] [PASSED] random formats [18:00:33] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [18:00:33] ============= [PASSED] drm_sysfb_modeset_test ============== [18:00:33] ============================================================ [18:00:33] Testing complete. Ran 616 tests: passed: 616 [18:00:33] Elapsed time: 23.585s total, 1.696s configuring, 21.721s building, 0.146s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [18:00:33] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [18:00:35] 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=48 [18:00:43] Starting KUnit Kernel (1/1)... [18:00:43] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [18:00:43] ================= ttm_device (5 subtests) ================== [18:00:43] [PASSED] ttm_device_init_basic [18:00:43] [PASSED] ttm_device_init_multiple [18:00:43] [PASSED] ttm_device_fini_basic [18:00:43] [PASSED] ttm_device_init_no_vma_man [18:00:43] ================== ttm_device_init_pools ================== [18:00:43] [PASSED] No DMA allocations, no DMA32 required [18:00:43] [PASSED] DMA allocations, DMA32 required [18:00:43] [PASSED] No DMA allocations, DMA32 required [18:00:43] [PASSED] DMA allocations, no DMA32 required [18:00:43] ============== [PASSED] ttm_device_init_pools ============== [18:00:43] =================== [PASSED] ttm_device ==================== [18:00:43] ================== ttm_pool (8 subtests) =================== [18:00:43] ================== ttm_pool_alloc_basic =================== [18:00:43] [PASSED] One page [18:00:43] [PASSED] More than one page [18:00:43] [PASSED] Above the allocation limit [18:00:43] [PASSED] One page, with coherent DMA mappings enabled [18:00:43] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [18:00:43] ============== [PASSED] ttm_pool_alloc_basic =============== [18:00:43] ============== ttm_pool_alloc_basic_dma_addr ============== [18:00:43] [PASSED] One page [18:00:43] [PASSED] More than one page [18:00:43] [PASSED] Above the allocation limit [18:00:43] [PASSED] One page, with coherent DMA mappings enabled [18:00:43] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [18:00:43] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [18:00:43] [PASSED] ttm_pool_alloc_order_caching_match [18:00:43] [PASSED] ttm_pool_alloc_caching_mismatch [18:00:43] [PASSED] ttm_pool_alloc_order_mismatch [18:00:43] [PASSED] ttm_pool_free_dma_alloc [18:00:43] [PASSED] ttm_pool_free_no_dma_alloc [18:00:43] [PASSED] ttm_pool_fini_basic [18:00:43] ==================== [PASSED] ttm_pool ===================== [18:00:43] ================ ttm_resource (8 subtests) ================= [18:00:43] ================= ttm_resource_init_basic ================= [18:00:43] [PASSED] Init resource in TTM_PL_SYSTEM [18:00:43] [PASSED] Init resource in TTM_PL_VRAM [18:00:43] [PASSED] Init resource in a private placement [18:00:43] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [18:00:43] ============= [PASSED] ttm_resource_init_basic ============= [18:00:43] [PASSED] ttm_resource_init_pinned [18:00:43] [PASSED] ttm_resource_fini_basic [18:00:43] [PASSED] ttm_resource_manager_init_basic [18:00:43] [PASSED] ttm_resource_manager_usage_basic [18:00:43] [PASSED] ttm_resource_manager_set_used_basic [18:00:43] [PASSED] ttm_sys_man_alloc_basic [18:00:43] [PASSED] ttm_sys_man_free_basic [18:00:43] ================== [PASSED] ttm_resource =================== [18:00:43] =================== ttm_tt (15 subtests) =================== [18:00:43] ==================== ttm_tt_init_basic ==================== [18:00:43] [PASSED] Page-aligned size [18:00:43] [PASSED] Extra pages requested [18:00:43] ================ [PASSED] ttm_tt_init_basic ================ [18:00:43] [PASSED] ttm_tt_init_misaligned [18:00:43] [PASSED] ttm_tt_fini_basic [18:00:43] [PASSED] ttm_tt_fini_sg [18:00:43] [PASSED] ttm_tt_fini_shmem [18:00:43] [PASSED] ttm_tt_create_basic [18:00:43] [PASSED] ttm_tt_create_invalid_bo_type [18:00:43] [PASSED] ttm_tt_create_ttm_exists [18:00:43] [PASSED] ttm_tt_create_failed [18:00:43] [PASSED] ttm_tt_destroy_basic [18:00:43] [PASSED] ttm_tt_populate_null_ttm [18:00:43] [PASSED] ttm_tt_populate_populated_ttm [18:00:43] [PASSED] ttm_tt_unpopulate_basic [18:00:43] [PASSED] ttm_tt_unpopulate_empty_ttm [18:00:43] [PASSED] ttm_tt_swapin_basic [18:00:43] ===================== [PASSED] ttm_tt ====================== [18:00:43] =================== ttm_bo (14 subtests) =================== [18:00:43] =========== ttm_bo_reserve_optimistic_no_ticket =========== [18:00:43] [PASSED] Cannot be interrupted and sleeps [18:00:43] [PASSED] Cannot be interrupted, locks straight away [18:00:43] [PASSED] Can be interrupted, sleeps [18:00:43] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [18:00:43] [PASSED] ttm_bo_reserve_locked_no_sleep [18:00:43] [PASSED] ttm_bo_reserve_no_wait_ticket [18:00:43] [PASSED] ttm_bo_reserve_double_resv [18:00:43] [PASSED] ttm_bo_reserve_interrupted [18:00:43] [PASSED] ttm_bo_reserve_deadlock [18:00:43] [PASSED] ttm_bo_unreserve_basic [18:00:43] [PASSED] ttm_bo_unreserve_pinned [18:00:43] [PASSED] ttm_bo_unreserve_bulk [18:00:43] [PASSED] ttm_bo_put_basic [18:00:43] [PASSED] ttm_bo_put_shared_resv [18:00:43] [PASSED] ttm_bo_pin_basic [18:00:43] [PASSED] ttm_bo_pin_unpin_resource [18:00:43] [PASSED] ttm_bo_multiple_pin_one_unpin [18:00:43] ===================== [PASSED] ttm_bo ====================== [18:00:43] ============== ttm_bo_validate (22 subtests) =============== [18:00:43] ============== ttm_bo_init_reserved_sys_man =============== [18:00:43] [PASSED] Buffer object for userspace [18:00:43] [PASSED] Kernel buffer object [18:00:43] [PASSED] Shared buffer object [18:00:43] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [18:00:43] ============== ttm_bo_init_reserved_mock_man ============== [18:00:43] [PASSED] Buffer object for userspace [18:00:43] [PASSED] Kernel buffer object [18:00:43] [PASSED] Shared buffer object [18:00:43] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [18:00:43] [PASSED] ttm_bo_init_reserved_resv [18:00:43] ================== ttm_bo_validate_basic ================== [18:00:43] [PASSED] Buffer object for userspace [18:00:43] [PASSED] Kernel buffer object [18:00:43] [PASSED] Shared buffer object [18:00:43] ============== [PASSED] ttm_bo_validate_basic ============== [18:00:43] [PASSED] ttm_bo_validate_invalid_placement [18:00:43] ============= ttm_bo_validate_same_placement ============== [18:00:43] [PASSED] System manager [18:00:43] [PASSED] VRAM manager [18:00:43] ========= [PASSED] ttm_bo_validate_same_placement ========== [18:00:43] [PASSED] ttm_bo_validate_failed_alloc [18:00:43] [PASSED] ttm_bo_validate_pinned [18:00:43] [PASSED] ttm_bo_validate_busy_placement [18:00:43] ================ ttm_bo_validate_multihop ================= [18:00:43] [PASSED] Buffer object for userspace [18:00:43] [PASSED] Kernel buffer object [18:00:43] [PASSED] Shared buffer object [18:00:43] ============ [PASSED] ttm_bo_validate_multihop ============= [18:00:43] ========== ttm_bo_validate_no_placement_signaled ========== [18:00:43] [PASSED] Buffer object in system domain, no page vector [18:00:43] [PASSED] Buffer object in system domain with an existing page vector [18:00:43] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [18:00:43] ======== ttm_bo_validate_no_placement_not_signaled ======== [18:00:43] [PASSED] Buffer object for userspace [18:00:43] [PASSED] Kernel buffer object [18:00:43] [PASSED] Shared buffer object [18:00:43] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [18:00:43] [PASSED] ttm_bo_validate_move_fence_signaled [18:00:43] ========= ttm_bo_validate_move_fence_not_signaled ========= [18:00:43] [PASSED] Waits for GPU [18:00:43] [PASSED] Tries to lock straight away [18:00:43] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [18:00:43] [PASSED] ttm_bo_validate_swapout [18:00:43] [PASSED] ttm_bo_validate_happy_evict [18:00:43] [PASSED] ttm_bo_validate_all_pinned_evict [18:00:43] [PASSED] ttm_bo_validate_allowed_only_evict [18:00:43] [PASSED] ttm_bo_validate_deleted_evict [18:00:43] [PASSED] ttm_bo_validate_busy_domain_evict [18:00:43] [PASSED] ttm_bo_validate_evict_gutting [18:00:43] [PASSED] ttm_bo_validate_recrusive_evict stty: 'standard input': Inappropriate ioctl for device [18:00:43] ================= [PASSED] ttm_bo_validate ================= [18:00:43] ============================================================ [18:00:43] Testing complete. Ran 102 tests: passed: 102 [18:00:43] Elapsed time: 10.063s total, 1.677s configuring, 7.718s building, 0.554s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✗ CI.checksparse: warning for Introducing firmware late binding
In reply to Badal Nilawar== Series Details ==
== Series Details ==
Series: Introducing firmware late binding
URL : https://patchwork.freedesktop.org/series/150772/
State : warning
== Summary ==
+ trap cleanup EXIT
+ KERNEL=/kernel
+ MT=/root/linux/maintainer-tools
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools /root/linux/maintainer-tools Cloning into '/root/linux/maintainer-tools'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ make -C /root/linux/maintainer-tools
make: Entering directory '/root/linux/maintainer-tools'
cc -O2 -g -Wextra -o remap-log remap-log.c
make: Leaving directory '/root/linux/maintainer-tools'
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ /root/linux/maintainer-tools/dim sparse --fast b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db Sparse version: 0.6.4 (Ubuntu: 0.6.4-4ubuntu3)
Fast mode used, each commit won't be checked separately.
-+drivers/gpu/drm/i915/display/intel_display_types.h:1995:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2008:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_hdcp.c: note: in included file:
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✗ Xe.CI.BAT: failure for Introducing firmware late binding
In reply to Badal Nilawar== Series Details ==
== Series Details ==
Series: Introducing firmware late binding
URL : https://patchwork.freedesktop.org/series/150772/
State : failure
== Summary ==
CI Bug Log - changes from xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db_BAT -> xe-pw-150772v1_BAT
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with xe-pw-150772v1_BAT absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in xe-pw-150772v1_BAT, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (9 -> 8)
------------------------------
Missing (1): bat-adlp-vm
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in xe-pw-150772v1_BAT:
### IGT changes ###
#### Possible regressions ####
* igt@core_hotunplug@unbind-rebind:
- bat-bmg-2: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/bat-bmg-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/bat-bmg-2/igt@[email protected]
* igt@xe_module_load@load:
- bat-bmg-1: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/bat-bmg-1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/bat-bmg-1/igt@[email protected]
Build changes
-------------
* Linux: xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db -> xe-pw-150772v1
IGT_8426: f87ffec6e23df5f3f044d90924f948e0bbd68c6c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db: b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db
xe-pw-150772v1: 150772v1
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/index.html
Patchwork
CI✗ Xe.CI.Full: failure for Introducing firmware late binding
In reply to Badal Nilawar== Series Details ==
== Series Details ==
Series: Introducing firmware late binding
URL : https://patchwork.freedesktop.org/series/150772/
State : failure
== Summary ==
CI Bug Log - changes from xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db_FULL -> xe-pw-150772v1_FULL
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with xe-pw-150772v1_FULL absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in xe-pw-150772v1_FULL, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in xe-pw-150772v1_FULL:
### IGT changes ###
#### Possible regressions ####
* igt@xe_pat@pat-index-xe2:
- shard-bmg: [PASS][1] -> [ABORT][2] +2 other tests abort
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-6/igt@[email protected]
#### Warnings ####
* igt@xe_module_load@load:
- shard-bmg: ([PASS][3], [PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [SKIP][26], [PASS][27]) ([Intel XE#2457]) -> ([ABORT][28], [ABORT][29], [ABORT][30], [ABORT][31], [ABORT][32], [ABORT][33], [ABORT][34], [ABORT][35], [PASS][36], [ABORT][37], [ABORT][38], [ABORT][39], [PASS][40])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-1/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-1/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-8/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-8/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-5/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-6/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-6/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-5/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-5/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-7/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-3/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-4/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-6/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-2/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-bmg-4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-8/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-8/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-2/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-4/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-4/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-4/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-5/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-6/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-5/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-5/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-5/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-bmg-1/igt@[email protected]
Known issues
------------
Here are the changes found in xe-pw-150772v1_FULL that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_async_flips@async-flip-with-page-flip-events-tiled-atomic@pipe-a-hdmi-a-6-4-rc-ccs-cc:
- shard-dg2-set2: NOTRUN -> [SKIP][41] ([Intel XE#3767]) +15 other tests skip
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-436/igt@kms_async_flips@async-flip-with-page-flip-events-tiled-atomic@pipe-a-hdmi-a-6-4-rc-ccs-cc.html
* igt@kms_bw@linear-tiling-1-displays-1920x1080p:
- shard-dg2-set2: NOTRUN -> [SKIP][42] ([Intel XE#367])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-434/igt@[email protected]
* igt@kms_ccs@bad-rotation-90-4-tiled-mtl-rc-ccs-cc@pipe-b-hdmi-a-2:
- shard-dg2-set2: NOTRUN -> [SKIP][43] ([Intel XE#787]) +76 other tests skip
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-432/igt@kms_ccs@[email protected]
* igt@kms_ccs@crc-primary-suspend-yf-tiled-ccs@pipe-d-dp-2:
- shard-dg2-set2: NOTRUN -> [SKIP][44] ([Intel XE#455] / [Intel XE#787]) +12 other tests skip
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-432/igt@kms_ccs@[email protected]
* igt@kms_ccs@random-ccs-data-4-tiled-dg2-mc-ccs:
- shard-dg2-set2: [PASS][45] -> [INCOMPLETE][46] ([Intel XE#1727] / [Intel XE#3113] / [Intel XE#3124] / [Intel XE#4345])
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-dg2-435/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-433/igt@[email protected]
* igt@kms_ccs@random-ccs-data-4-tiled-dg2-rc-ccs@pipe-c-hdmi-a-6:
- shard-dg2-set2: [PASS][47] -> [INCOMPLETE][48] ([Intel XE#1727] / [Intel XE#3113] / [Intel XE#3124]) +2 other tests incomplete
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-dg2-434/igt@kms_ccs@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-464/igt@kms_ccs@[email protected]
* igt@kms_chamelium_frames@dp-frame-dump:
- shard-dg2-set2: NOTRUN -> [SKIP][49] ([Intel XE#373])
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-435/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-dg2-set2: NOTRUN -> [FAIL][50] ([Intel XE#1178]) +1 other test fail
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-434/igt@[email protected]
* igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-6:
- shard-dg2-set2: NOTRUN -> [SKIP][51] ([Intel XE#4494] / [i915#3804])
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-436/igt@kms_dither@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank@bc-hdmi-a6-dp4:
- shard-dg2-set2: [PASS][52] -> [FAIL][53] ([Intel XE#301]) +1 other test fail
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-dg2-435/igt@kms_flip@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-464/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank@a-edp1:
- shard-lnl: [PASS][54] -> [FAIL][55] ([Intel XE#301])
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-lnl-5/igt@kms_flip@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-lnl-8/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-wf_vblank-interruptible:
- shard-adlp: [PASS][56] -> [DMESG-WARN][57] ([Intel XE#4543]) +1 other test dmesg-warn
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@kms_flip@flip-vs-wf_vblank-interruptible.html
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@kms_flip@flip-vs-wf_vblank-interruptible.html
* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-downscaling:
- shard-dg2-set2: NOTRUN -> [SKIP][58] ([Intel XE#455]) +1 other test skip
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-434/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-downscaling.html
* igt@kms_frontbuffer_tracking@drrs-1p-primscrn-indfb-msflip-blt:
- shard-dg2-set2: NOTRUN -> [SKIP][59] ([Intel XE#651]) +1 other test skip
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-434/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt:
- shard-dg2-set2: NOTRUN -> [SKIP][60] ([Intel XE#653]) +1 other test skip
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-435/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt.html
* igt@kms_lease@lease-get:
- shard-adlp: [PASS][61] -> [SKIP][62] ([Intel XE#4950])
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
* igt@kms_pm_rpm@dpms-mode-unset-lpsp:
- shard-adlp: [PASS][63] -> [SKIP][64] ([Intel XE#4962])
[63]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
* igt@kms_psr@fbc-psr2-sprite-render:
- shard-dg2-set2: NOTRUN -> [SKIP][65] ([Intel XE#2850] / [Intel XE#929]) +2 other tests skip
[65]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-435/igt@[email protected]
* igt@kms_rmfb@close-fd@pipe-a-hdmi-a-1:
- shard-adlp: [PASS][66] -> [DMESG-WARN][67] ([Intel XE#2953] / [Intel XE#4173]) +7 other tests dmesg-warn
[66]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-1/igt@kms_rmfb@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-4/igt@kms_rmfb@[email protected]
* igt@xe_copy_basic@mem-set-linear-0x369:
- shard-dg2-set2: NOTRUN -> [SKIP][68] ([Intel XE#1126])
[68]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-435/igt@[email protected]
* igt@xe_exec_basic@multigpu-no-exec-null-defer-bind:
- shard-dg2-set2: [PASS][69] -> [SKIP][70] ([Intel XE#1392]) +1 other test skip
[69]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-dg2-464/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-432/igt@[email protected]
* igt@xe_exec_fault_mode@many-execqueues-userptr-invalidate-prefetch:
- shard-dg2-set2: NOTRUN -> [SKIP][71] ([Intel XE#288]) +2 other tests skip
[71]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-434/igt@xe_exec_fault_mode@many-execqueues-userptr-invalidate-prefetch.html
* igt@xe_exec_system_allocator@twice-new-busy-nomemset:
- shard-dg2-set2: NOTRUN -> [SKIP][72] ([Intel XE#4915]) +16 other tests skip
[72]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-434/igt@[email protected]
* igt@xe_exec_threads@threads-shared-vm-rebind:
- shard-adlp: [PASS][73] -> [SKIP][74] ([Intel XE#4945]) +6 other tests skip
[73]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
#### Possible fixes ####
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
- shard-adlp: [DMESG-WARN][75] ([Intel XE#2953] / [Intel XE#4173]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-4/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-3/igt@[email protected]
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip:
- shard-adlp: [DMESG-FAIL][77] ([Intel XE#4543]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-6/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html
[78]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-2/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html
* igt@kms_ccs@random-ccs-data-4-tiled-dg2-rc-ccs-cc:
- shard-dg2-set2: [INCOMPLETE][79] ([Intel XE#1727] / [Intel XE#3113] / [Intel XE#3124]) -> [PASS][80] +1 other test pass
[79]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-dg2-436/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-435/igt@[email protected]
* igt@kms_flip@flip-vs-blocking-wf-vblank@c-hdmi-a1:
- shard-adlp: [DMESG-WARN][81] ([Intel XE#4543]) -> [PASS][82] +6 other tests pass
[81]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@kms_flip@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-8/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
- shard-lnl: [FAIL][83] ([Intel XE#301]) -> [PASS][84] +2 other tests pass
[83]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-lnl-1/igt@kms_flip@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-lnl-2/igt@kms_flip@[email protected]
* igt@xe_exec_basic@multigpu-no-exec-null-defer-mmap:
- shard-dg2-set2: [SKIP][85] ([Intel XE#1392]) -> [PASS][86] +5 other tests pass
[85]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-dg2-432/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-dg2-436/igt@[email protected]
#### Warnings ####
* igt@kms_big_fb@y-tiled-64bpp-rotate-0:
- shard-adlp: [DMESG-FAIL][87] ([Intel XE#4543]) -> [SKIP][88] ([Intel XE#4947])
[87]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
* igt@kms_cursor_crc@cursor-rapid-movement-max-size:
- shard-adlp: [SKIP][89] ([Intel XE#455]) -> [SKIP][90] ([Intel XE#4950])
[89]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
- shard-adlp: [DMESG-FAIL][91] ([Intel XE#4543]) -> [DMESG-WARN][92] ([Intel XE#4543]) +1 other test dmesg-warn
[91]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@kms_flip@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-tiling-y:
- shard-adlp: [SKIP][93] ([Intel XE#653]) -> [SKIP][94] ([Intel XE#2351] / [Intel XE#4947])
[93]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
* igt@xe_exec_fault_mode@many-basic-prefetch:
- shard-adlp: [SKIP][95] ([Intel XE#288]) -> [SKIP][96] ([Intel XE#4945])
[95]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
* igt@xe_exec_system_allocator@many-malloc:
- shard-adlp: [SKIP][97] ([Intel XE#4915]) -> [SKIP][98] ([Intel XE#4945]) +14 other tests skip
[97]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db/shard-adlp-2/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/shard-adlp-1/igt@[email protected]
[Intel XE#1126]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1126
[Intel XE#1178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1178
[Intel XE#1392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1392
[Intel XE#1727]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1727
[Intel XE#2351]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2351
[Intel XE#2457]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2457
[Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
[Intel XE#2953]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2953
[Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
[Intel XE#3113]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3113
[Intel XE#3124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3124
[Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
[Intel XE#373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/373
[Intel XE#3767]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3767
[Intel XE#4173]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4173
[Intel XE#4345]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4345
[Intel XE#4494]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4494
[Intel XE#4543]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4543
[Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455
[Intel XE#4915]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4915
[Intel XE#4945]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4945
[Intel XE#4947]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4947
[Intel XE#4950]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4950
[Intel XE#4962]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4962
[Intel XE#651]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/651
[Intel XE#653]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/653
[Intel XE#787]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/787
[Intel XE#929]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/929
[i915#3804]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3804
Build changes
-------------
* Linux: xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db -> xe-pw-150772v1
IGT_8426: f87ffec6e23df5f3f044d90924f948e0bbd68c6c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-3306-b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db: b5a4f1f5ebf74c0b2c583cb7ea8dd768d8f315db
xe-pw-150772v1: 150772v1
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-150772v1/index.html