From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35771C7115B for ; Thu, 19 Jun 2025 09:07:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CAA310EA06; Thu, 19 Jun 2025 09:07:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MvgJ/DcI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2321E10E9EE; Thu, 19 Jun 2025 09:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750324022; x=1781860022; h=message-id:date:subject:to:cc:references:from: in-reply-to:mime-version; bh=BmF4uUn72/o6/hUR3ezg3xxMk+F8ZGv/xFggzTFr2jE=; b=MvgJ/DcIOx8YIhsLGvZlBw30E3I24FEwKA+hKTIivK+aw1P9bJfRIlKk jroOIJHlRPUFwJJX8tE7cXioSN6zUKqCjtl4wVunXCJIvkBIuBJxYjhm7 BZvKFFATrWj3FevIAPvDZgPhgXMeEAY306XicaNgcYGqvq4LIQn0U7H2d fKj2VUdYKS8R3WoYFoAfX3BXLzpSJtuUIzMCt9a+nnWROtwz8nzAFA4k0 7VzdfE9CyjoB/xB+z/Hs0pJladYsIT5iTbHSYvMvIZv8FQeY+2mVUomZN kVVqREglP9Fu9lJ/FGaiu0MhXhKdl6+JgM1evfMpIgRMGlVCFMdHeKShB w==; X-CSE-ConnectionGUID: as1l1Re7TviMnuLqQmb/pg== X-CSE-MsgGUID: 9NzTLhbBQfK+sUUcwf4hFA== X-IronPort-AV: E=McAfee;i="6800,10657,11468"; a="52722338" X-IronPort-AV: E=Sophos;i="6.16,248,1744095600"; d="scan'208,217";a="52722338" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2025 02:07:02 -0700 X-CSE-ConnectionGUID: Q42mDV/NSj6S55CsEoemtg== X-CSE-MsgGUID: ESOOonnlQZGKbRmlWxd2mA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,248,1744095600"; d="scan'208,217";a="150895918" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by fmviesa009.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2025 02:07:01 -0700 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25; Thu, 19 Jun 2025 02:07:00 -0700 Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25 via Frontend Transport; Thu, 19 Jun 2025 02:07:00 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (40.107.100.69) by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25; Thu, 19 Jun 2025 02:06:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eGh0xoeFWBg5KAQPIgLUHGgfJogjIxyRqOrNG7T6HvaODn36ewEoE8r9PTRS3EyGRMbEJLHmVh4WUQlTL8pD7ZF5zNRyvNjKsUDCI9rOQ394V5zhAlM7tr/1qRx5Y+F1hIXKLGq4saPJa5gH92IATyGmG+VSFKiOzEiNDJ33Gnvz9MvMyJLX+7pUJ4LON0me5PZquUefc8SdDXhHXDeElgz7iBRWbdHJy+wzhH+18sGc6xCAR0PEM5jx2Xa5He0IbNAfq7I2AohsIn9AHLehUfdp5IK8rTjmJgoZUiKPeAibv2R2N4esp3Cd0n1mX7mWEbBdFB6U8ZV7GakSa8I8Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gd79RdQ3XlguuWV5UosBYXv+gZk5NojFfw7GJ5mNjiw=; b=pBquZ4nI+I8/ObumIAkgj22D5bawrfWpMHMtfjyb16hgJNpCtBSgPSikt8JMnGolo7wihytmXBloL2b9p+io+9xA2fxfgXLZK10fdP0t6IlLQqKgWmyodDdf3PA6bOcPIRlnpwo6SN1D3Wvm/J2kZcFgM1QSL3gOKkv2EE3EF8EY/8gT4oHJnQWh5Z6Vk61cN/auiAowvBNF2CbLJOIs9yeMcQi+kwqapnF8iJ7tbdXVhkJ4Pv3p4miBoL/zfdcYaz+6i+sfE3Fr3zNFmOAfWHfJ0O6BsI2a4Rd1qwgmuGOiLRA0WHRuqa8WGkw4TQpJmBAQ5f3LRaieqqfpppW09w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BN9PR11MB5530.namprd11.prod.outlook.com (2603:10b6:408:103::8) by DS4PPF4B1ECA5EA.namprd11.prod.outlook.com (2603:10b6:f:fc02::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.30; Thu, 19 Jun 2025 09:06:29 +0000 Received: from BN9PR11MB5530.namprd11.prod.outlook.com ([fe80::13bd:eb49:2046:32a9]) by BN9PR11MB5530.namprd11.prod.outlook.com ([fe80::13bd:eb49:2046:32a9%5]) with mapi id 15.20.8857.022; Thu, 19 Jun 2025 09:06:28 +0000 Content-Type: multipart/alternative; boundary="------------WXkGpym6lvvplNfdIXPOh90P" Message-ID: Date: Thu, 19 Jun 2025 14:36:20 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 02/10] mei: late_bind: add late binding component driver To: "Gupta, Anshuman" , "Vivi, Rodrigo" , "intel-xe@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Jani Nikula , "Usyskin, Alexander" CC: "gregkh@linuxfoundation.org" , "Ceraolo Spurio, Daniele" , "jgg@nvidia.com" References: <20250618190007.2932322-1-badal.nilawar@intel.com> <20250618190007.2932322-3-badal.nilawar@intel.com> Content-Language: en-US From: "Nilawar, Badal" In-Reply-To: X-ClientProxiedBy: MA0PR01CA0091.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ae::14) To BN9PR11MB5530.namprd11.prod.outlook.com (2603:10b6:408:103::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN9PR11MB5530:EE_|DS4PPF4B1ECA5EA:EE_ X-MS-Office365-Filtering-Correlation-Id: 90a05e81-cea3-4a3f-1c70-08ddaf109378 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|366016|921020|8096899003|7053199007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?QzdlUEdHZmxYWlJiNDFiMTlqNk5SRkI2Rnl0Si96UThSa1hJ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nc3ekMvRHhwaUhwc21iQlpzS2ZNeWtZZjVqWDI4cjNVV0tT?= =?utf-8?B?OHJmM25JdCtTcldWelZHOUt0SUIvOS9SNk5HQXUvbzZhcHJkb2U2SUtvVWVn?= =?utf-8?B?NkpqQkJ2VmZLUjgvZWhIUWc3V1NlUDFmaFBRQ0xXeUp5czVHdW53b3FwVnUy?= =?utf-8?B?RXBGYWZVZzNRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5530.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(921020)(8096899003)(7053199007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Um41VjN6Q2N4b1gzYzlUb2grVzFmckU2L01ybVhRUGl3TnJSM0FROEE1YmY1?= =?utf-8?B?QmlHOStKUk5GcTk3TWtQUTdQbkI1VlJVYm9MV004R0s1dDNiQTR4NGw5QmVY?= =?utf-8?B?VXoxcTVJRytvdzA2UWJsL2dBR1l1ejQyQXFRUXNGaTduRFBVK1FZcGU1bnNt?= =?utf-8?B?aHJtRnc0eEZaNFB2Z0tSMk5SSjBtT3RMTk5kTDNXdzZkRkJEK1A4cXorblhm?= =?utf-8?B?ei95blBrV2twaDk4bDBZRm00and4cUFST0lRaG9HY2pQOVQ2bVF3K0Jjek1i?= =?utf-8?B?dWFQZ2dZTnliV2E1ZGhjNzgvTTBQZ1V5Z0xVQ2pMSDhIaWpuZzJLd0ZLTThU?= =?utf-8?B?MkIwc3ZQNk5jOEcyUUw4SndIa21kQmhITjNNSEYydm9Wb2s3QndoY21aOUR2?= =?utf-8?B?OG9TYzErVVJKSkxDaDI5R2RqN3pXSTJIRGg4TlB5MlRWNWFzR0pTQXNWbUt5?= =?utf-8?B?SDFibWV5MytPMGRYUGpzbGswWUJJd3hGRmd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1HQkN0S0pjWjNQbE1taXdYVW1neGhveVZ0TW1Bbmo2?= =?utf-8?B?UkNWUGk1UVBxK2NwdDhTL0F6aGxpK0t3NzZoOFkyVEJpVmxkQ2tXZkJVRG1U?= =?utf-8?B?YStjS1NUVnMvaTVLL2pDNm9JalBzazkxMWcyOUJudTJneXlTci9pS0RyTk5z?= =?utf-8?B?U21rQ3kyQUdRUE1vajFGMG1CQVZkTGF0Qm45WnkwcXhLY0svdytuTWVTbTMx?= =?utf-8?B?bFdNOEkzazVxSkpwUHJ0dEJuOVppUmlEcEhqVDJtYzBiRWhkeEh5ckZYRmJl?= =?utf-8?B?d0c4VXlna0k3R1AreDdHcUY4TCsxT3FLcTh0ZjRTaDBaV1RhR1luVktxdkpR?= =?utf-8?B?Zmd5YU4weGM4Y2lLY3B6RDdkZ2k2bUN5UUlVaG9qajZtbU95TGFuZzAxbXdu?= =?utf-8?B?VHBNdG0xVm05c2V6dUdRK1ZYWFNwaXdTeDBCbmFMa2Vtb29wcitoQWxyUkRr?= =?utf-8?B?bnZmbXlXSEVTdXJldVNVb0pnamhSMG4xa1lNeTFwWStaU1FVeGJ0ekFsNis0?= =?utf-8?B?S3g0d3FQclFKNVVoRmpmdThYbFgrSEFuRHg2aGhYc2pJaGZ1K3MvbUMyN3pB?= =?utf-8?B?ZW8rTmpDQWNGY0ZQNkRMTmV4Ylc3b01lUEVBUlR0QVNNRU40elVFRmZhMU9Q?= =?utf-8?B?QXFDbkxVZG9XZEd2YnVwNGx2dllSelVYcEpiTVZhZlR2M3FOTjZnMlFzemlX?= =?utf-8?B?YjdSaG0veGdmaEVtcjFySzBRLzZRTXh6Um9uZ1lhT0c4TkpYUXRZcWVJSVpn?= =?utf-8?B?L3c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 90a05e81-cea3-4a3f-1c70-08ddaf109378 X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5530.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2025 09:06:28.8794 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IefJJ4saSGyVavo2LkR1n/p8fYDT/PW1Q3R/5i9LXzNqmWKDjIooY5FitQIduFWfcs+J5o9YlUMM4r1sFyRSfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS4PPF4B1ECA5EA X-OriginatorOrg: intel.com X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" --------------WXkGpym6lvvplNfdIXPOh90P Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit On 19-06-2025 13:02, Gupta, Anshuman wrote: > >> -----Original Message----- >> From: Nilawar, Badal >> Sent: Thursday, June 19, 2025 12:30 AM >> To:intel-xe@lists.freedesktop.org;dri-devel@lists.freedesktop.org; linux- >> kernel@vger.kernel.org >> Cc: Gupta, Anshuman; Vivi, Rodrigo >> ; Usyskin, Alexander; >> gregkh@linuxfoundation.org; Ceraolo Spurio, Daniele >> ;jgg@nvidia.com >> Subject: [PATCH v3 02/10] mei: late_bind: add late binding component driver >> >> From: Alexander Usyskin >> >> 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 >> Signed-off-by: Badal Nilawar >> --- >> v2: >> - Use generic naming (Jani) > This patch still wrong naming I915_COMPONENT_LATE_BIND. > LATE_BIND will never be supported by i915, it is a wrong prefix. > @Nikula, Jani @Vivi, Rodrigo is it ok use the i915 naming prefix here ? > We can use INTEL_COMPONENT_LATE_BIND here ? Agree, if we use INTEL_ prefix here is it correct to add this file? > > This header include/drm/intel/i915_component.h is used by both XE and i915. > May be a separate series later requires refactoring this header. Agree, better handle naming of all the components while refactoring. > > >> - 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) >> --- >> 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 | 264 ++++++++++++++++++++ >> include/drm/intel/i915_component.h | 1 + >> include/drm/intel/late_bind_mei_interface.h | 50 ++++ >> 7 files changed, 339 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 >> >> diff --git a/drivers/misc/mei/Kconfig b/drivers/misc/mei/Kconfig index >> 7575fee96cc6..771becc68095 100644 >> --- a/drivers/misc/mei/Kconfig >> +++ b/drivers/misc/mei/Kconfig >> @@ -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 >> diff --git a/drivers/misc/mei/Makefile b/drivers/misc/mei/Makefile index >> 6f9fdbf1a495..84bfde888d81 100644 >> --- a/drivers/misc/mei/Makefile >> +++ b/drivers/misc/mei/Makefile >> @@ -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..65c7180c5678 >> --- /dev/null >> +++ b/drivers/misc/mei/late_bind/Kconfig >> @@ -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. >> diff --git a/drivers/misc/mei/late_bind/Makefile >> b/drivers/misc/mei/late_bind/Makefile >> new file mode 100644 >> index 000000000000..a0aeda5853f0 >> --- /dev/null >> +++ b/drivers/misc/mei/late_bind/Makefile >> @@ -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 >> diff --git a/drivers/misc/mei/late_bind/mei_late_bind.c >> b/drivers/misc/mei/late_bind/mei_late_bind.c >> new file mode 100644 >> index 000000000000..cb985f32309e >> --- /dev/null >> +++ b/drivers/misc/mei/late_bind/mei_late_bind.c >> @@ -0,0 +1,264 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +/* >> + * Copyright (C) 2025 Intel Corporation */ #include >> + #include #include >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#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 > I commented earlier in V2 series as well, is this timeout specific only to LATE BINDING ? > If this is generic timeout for mei_cldev_{send,recv}_timeout(), > then this marco should be part of standard MEI headers not late binding. > Other consumers of mei_cldev_{send,recv}_timeout() send the timeout input by component-ops callback . > > @Shahsa could you please explained that. As per Sasha: This  is not generic timeout, only for specific client - mkhi as it is general purpose client and many user-space  connects there. Timeouts are derived from real word experience, spec say "close connection as fast as you can and retry if busy", no specific timeout as it flow-specific thing. >> + >> +/** >> + * 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); >> + return -EINVAL; >> + } > Why are we not checking mkhi_msg_hdr hdr->result here ? Sasha has some suggestions around this, will incorporate in next rev. >> + >> + 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; >> + int 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. %d\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; >> + } > Use Kzalloc here, to make sure reserved filed of header is zeroed. Sure. >> + >> + 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); >> + if (ret < 0) { >> + dev_err(dev, "mei_cldev_send failed. %d\n", ret); >> + goto end; >> + } >> + ret = mei_cldev_recv_timeout(cldev, (void *)&rsp, sizeof(rsp), >> LATE_BIND_RECV_TIMEOUT_MSEC); >> + if (ret < 0) { >> + dev_err(dev, "mei_cldev_recv failed. %d\n", ret); >> + 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", >> + *(uint32_t *)&rsp.header); >> + goto end; >> + } >> + ret = (int)rsp.status; >> + dev_dbg(dev, "%s status = %d\n", __func__, ret); > AFAIU It would be useful to add the status enum in late_bind_mei_interface.h. Will discuss with Sasha and add if he agree. >> + >> +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 late >> bind. >> + * >> + * The function checks if requested is Intel VGA device > Please modify the Kenel Doc comment here, as per the function. >> + * and the parent of requester and the grand parent of mei_if are the same > We are matching against the requester not parent of requester. > Modify the Kernel Doc comment properly. >> + * device. >> + * >> + * @dev: master device >> + * @subcomponent: subcomponent to match (I915_COMPONENT_LATE_BIND) >> + * @data: compare data (mei late-bind bus device) > AFAIK It is mei client device not mei bus device. It is late-bind device on mei bus. xe_device -> mei client aux device -> [mei bus]-> mei late bind device >> + * >> + * Return: >> + * * 1 - if components match >> + * * 0 - otherwise >> + */ >> +static int mei_late_bind_component_match(struct device *dev, int >> subcomponent, >> + 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; > This condition should be like below, if I am not missing anything. > if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8) && > pdev->class != (PCI_CLASS_DISPLAY_OTHER << 8)) Correct, will fix this. Thanks, Badal > > Thanks, > Anshuman. >> + >> + if (subcomponent != I915_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- >>> dev); >> + 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); } >> + >> +#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"); >> diff --git a/include/drm/intel/i915_component.h >> b/include/drm/intel/i915_component.h >> index 4ea3b17aa143..4945044d41e6 100644 >> --- a/include/drm/intel/i915_component.h >> +++ b/include/drm/intel/i915_component.h >> @@ -31,6 +31,7 @@ enum i915_component_type { >> I915_COMPONENT_HDCP, >> I915_COMPONENT_PXP, >> I915_COMPONENT_GSC_PROXY, >> + I915_COMPONENT_LATE_BIND, >> }; >> >> /* MAX_PORT is the number of port >> diff --git a/include/drm/intel/late_bind_mei_interface.h >> b/include/drm/intel/late_bind_mei_interface.h >> new file mode 100644 >> index 000000000000..2c53657ce91b >> --- /dev/null >> +++ b/include/drm/intel/late_bind_mei_interface.h >> @@ -0,0 +1,50 @@ >> +/* SPDX-License-Identifier: MIT */ >> +/* >> + * Copyright (c) 2025 Intel Corporation */ >> + >> +#ifndef _LATE_BIND_MEI_INTERFACE_H_ >> +#define _LATE_BIND_MEI_INTERFACE_H_ >> + >> +#include >> + >> +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, }; >> + >> +/** >> + * 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 --------------WXkGpym6lvvplNfdIXPOh90P Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit


On 19-06-2025 13:02, Gupta, Anshuman wrote:

-----Original Message-----
From: Nilawar, Badal <badal.nilawar@intel.com>
Sent: Thursday, June 19, 2025 12:30 AM
To: intel-xe@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-
kernel@vger.kernel.org
Cc: Gupta, Anshuman <anshuman.gupta@intel.com>; Vivi, Rodrigo
<rodrigo.vivi@intel.com>; Usyskin, Alexander <alexander.usyskin@intel.com>;
gregkh@linuxfoundation.org; Ceraolo Spurio, Daniele
<daniele.ceraolospurio@intel.com>; jgg@nvidia.com
Subject: [PATCH v3 02/10] mei: late_bind: add late binding component driver

From: Alexander Usyskin <alexander.usyskin@intel.com>

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 <alexander.usyskin@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
---
v2:
 - Use generic naming (Jani)
This patch still wrong naming I915_COMPONENT_LATE_BIND.
LATE_BIND will never be supported by i915, it is a wrong prefix.
@Nikula, Jani @Vivi, Rodrigo is it ok use the i915 naming prefix here ?
We can use INTEL_COMPONENT_LATE_BIND here ?

Agree, if we use INTEL_ prefix here is it correct to add this file? 


This header include/drm/intel/i915_component.h is used by both XE and i915.
May be a separate series later requires refactoring this header.

Agree, better handle naming of all the components while refactoring.



 - 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)
---
 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  | 264 ++++++++++++++++++++
 include/drm/intel/i915_component.h          |   1 +
 include/drm/intel/late_bind_mei_interface.h |  50 ++++
 7 files changed, 339 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

diff --git a/drivers/misc/mei/Kconfig b/drivers/misc/mei/Kconfig index
7575fee96cc6..771becc68095 100644
--- a/drivers/misc/mei/Kconfig
+++ b/drivers/misc/mei/Kconfig
@@ -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
diff --git a/drivers/misc/mei/Makefile b/drivers/misc/mei/Makefile index
6f9fdbf1a495..84bfde888d81 100644
--- a/drivers/misc/mei/Makefile
+++ b/drivers/misc/mei/Makefile
@@ -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..65c7180c5678
--- /dev/null
+++ b/drivers/misc/mei/late_bind/Kconfig
@@ -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.
diff --git a/drivers/misc/mei/late_bind/Makefile
b/drivers/misc/mei/late_bind/Makefile
new file mode 100644
index 000000000000..a0aeda5853f0
--- /dev/null
+++ b/drivers/misc/mei/late_bind/Makefile
@@ -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
diff --git a/drivers/misc/mei/late_bind/mei_late_bind.c
b/drivers/misc/mei/late_bind/mei_late_bind.c
new file mode 100644
index 000000000000..cb985f32309e
--- /dev/null
+++ b/drivers/misc/mei/late_bind/mei_late_bind.c
@@ -0,0 +1,264 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2025 Intel Corporation  */ #include
+<drm/drm_connector.h> #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
I commented earlier in V2 series as well, is this timeout specific only to LATE BINDING ?
If this is generic timeout for mei_cldev_{send,recv}_timeout(), 
then this marco should be part of standard MEI headers not late binding.
Other consumers of mei_cldev_{send,recv}_timeout() send the timeout input by component-ops callback .

@Shahsa could you please explained that.

As per Sasha:

This  is not generic timeout, only for specific client - mkhi as it is general purpose client and many user-space  connects there.
Timeouts are derived from 
real word experience, spec say "close connection as fast as you can and retry if busy", no specific timeout as it flow-specific thing.


      
+
+/**
+ * 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);
+		return -EINVAL;
+	}
Why are we not checking mkhi_msg_hdr hdr->result here ?
Sasha has some suggestions around this, will incorporate in next rev.

      
+
+	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;
+	int 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. %d\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;
+	}
Use Kzalloc here, to make sure reserved filed of header is zeroed.
Sure.

      
+
+	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);
+	if (ret < 0) {
+		dev_err(dev, "mei_cldev_send failed. %d\n", ret);
+		goto end;
+	}
+	ret = mei_cldev_recv_timeout(cldev, (void *)&rsp, sizeof(rsp),
LATE_BIND_RECV_TIMEOUT_MSEC);
+	if (ret < 0) {
+		dev_err(dev, "mei_cldev_recv failed. %d\n", ret);
+		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",
+			*(uint32_t *)&rsp.header);

      
+		goto end;
+	}
+	ret = (int)rsp.status;
+	dev_dbg(dev, "%s status = %d\n", __func__, ret);
AFAIU It would be useful to add the status enum in late_bind_mei_interface.h.
Will discuss with Sasha and add if he agree. 


      
+
+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 late
bind.
+ *
+ *    The function checks if requested is Intel VGA device
Please modify the Kenel Doc comment here, as per the function.
+ *    and the parent of requester and the grand parent of mei_if are the same
We are matching against the requester not parent of requester.
Modify the Kernel Doc comment properly.
+ *    device.
+ *
+ * @dev: master device
+ * @subcomponent: subcomponent to match (I915_COMPONENT_LATE_BIND)
+ * @data: compare data (mei late-bind bus device)
AFAIK It is mei client device not mei bus device.

It is late-bind device on mei bus.  

xe_device -> mei client aux device -> [mei bus]-> mei late bind device


      
+ *
+ * Return:
+ * * 1 - if components match
+ * * 0 - otherwise
+ */
+static int mei_late_bind_component_match(struct device *dev, int
subcomponent,
+					 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;
This condition should be like below,  if I am not missing anything. 
if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8) &&
 pdev->class != (PCI_CLASS_DISPLAY_OTHER << 8))

Correct, will fix this. 

Thanks,
Badal


Thanks,
Anshuman.
+
+	if (subcomponent != I915_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-
dev);
+	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); }
+
+#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");
diff --git a/include/drm/intel/i915_component.h
b/include/drm/intel/i915_component.h
index 4ea3b17aa143..4945044d41e6 100644
--- a/include/drm/intel/i915_component.h
+++ b/include/drm/intel/i915_component.h
@@ -31,6 +31,7 @@ enum i915_component_type {
 	I915_COMPONENT_HDCP,
 	I915_COMPONENT_PXP,
 	I915_COMPONENT_GSC_PROXY,
+	I915_COMPONENT_LATE_BIND,
 };

 /* MAX_PORT is the number of port
diff --git a/include/drm/intel/late_bind_mei_interface.h
b/include/drm/intel/late_bind_mei_interface.h
new file mode 100644
index 000000000000..2c53657ce91b
--- /dev/null
+++ b/include/drm/intel/late_bind_mei_interface.h
@@ -0,0 +1,50 @@
+/* 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, };
+
+/**
+ * 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

    
--------------WXkGpym6lvvplNfdIXPOh90P--