mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lizhi Hou <lizhi.hou@amd.com>
To: David Zhang <yidong.zhang@amd.com>, <quic_jhugo@quicinc.com>,
	<karol.wachowski@linux.intel.com>, <max.zhen@amd.com>,
	<ogabbay@kernel.org>, <dri-devel@lists.freedesktop.org>,
	<linux-kernel@vger.kernel.org>
Cc: <sonal.santan@amd.com>, <mario.limonciello@amd.com>
Subject: Re: [PATCH V3 03/19] accel/amdxdna: Add CERT firmware version support
Date: Thu, 8 Oct 2026 10:12:47 -0700	[thread overview]
Message-ID: <0e6284cc-e55f-e518-c61d-5e72ac50f45d@amd.com> (raw)
In-Reply-To: <20261008032348.2044667-4-yidong.zhang@amd.com>


On 10/7/26 20:23, David Zhang wrote:
> Add support to query and validate CERT firmware version:
> - Add mailbox opcodes and structs to query NPU firmware version (identify)
>    and CERT firmware version.
> - Unify firmware version storage by using struct
>    amdxdna_drm_query_firmware_version across the driver.
> - Introduce aie_check_cert_protocol() and cert_feature_tbl to validate
>    CERT firmware host queue protocol compatibility against driver
>    capabilities.
> - Add helper functions amdxdna_get_firmware_version() and
>    amdxdna_get_aie_version() to share version query handling across
>    generations.
>
> Note on patch ordering:
> Introducing CERT firmware protocol validation prior to the firmware 6.0
> upgrade ensures host queue protocol compatibility (host_queue_major/minor)
> is validated before the host queue layout restructure, preserving
> bisectability.
Please remove the patch ordering statement.
>
> Signed-off-by: David Zhang <yidong.zhang@amd.com>
> ---
>   drivers/accel/amdxdna/aie.c             | 45 ++++++++++++++++++++---
>   drivers/accel/amdxdna/aie.h             |  9 ++++-
>   drivers/accel/amdxdna/aie2_message.c    |  4 +--
>   drivers/accel/amdxdna/aie2_pci.c        | 47 +++----------------------
>   drivers/accel/amdxdna/aie2_pci.h        |  4 +--
>   drivers/accel/amdxdna/aie4_message.c    | 45 +++++++++++++++++++++++
>   drivers/accel/amdxdna/aie4_msg_priv.h   | 30 ++++++++++++++++
>   drivers/accel/amdxdna/aie4_pci.c        | 17 ++++++++-
>   drivers/accel/amdxdna/aie4_pci.h        | 11 ++++++
>   drivers/accel/amdxdna/amdxdna_pci_drv.h | 10 ++----
>   drivers/accel/amdxdna/amdxdna_sysfs.c   |  2 +-
>   drivers/accel/amdxdna/npu3_regs.c       |  7 ++++
>   12 files changed, 169 insertions(+), 62 deletions(-)
>
> diff --git a/drivers/accel/amdxdna/aie.c b/drivers/accel/amdxdna/aie.c
> index dd6f36f222c7..01a439c0ccf4 100644
> --- a/drivers/accel/amdxdna/aie.c
> +++ b/drivers/accel/amdxdna/aie.c
> @@ -65,13 +65,12 @@ int aie_send_mgmt_msg_wait(struct aie_device *aie, struct xdna_mailbox_msg *msg)
>   	return ret;
>   }
>   
> -int aie_check_protocol(struct aie_device *aie, u32 fw_major, u32 fw_minor)
> +static int aie_check_protocol_impl(struct aie_device *aie, u32 fw_major, u32 fw_minor,
> +				   const struct amdxdna_fw_feature_tbl *feature)
>   {
> -	const struct amdxdna_fw_feature_tbl *feature;
>   	bool found = false;
>   
> -	for (feature = aie->xdna->dev_info->fw_feature_tbl;
> -	     feature->major; feature++) {
> +	for (; feature && feature->major; feature++) {
>   		if (feature->major != fw_major)
>   			continue;
>   		if (fw_minor < feature->min_minor)
> @@ -88,6 +87,44 @@ int aie_check_protocol(struct aie_device *aie, u32 fw_major, u32 fw_minor)
>   	return found ? 0 : -EOPNOTSUPP;
>   }
>   
> +int aie_check_protocol(struct aie_device *aie, u32 fw_major, u32 fw_minor)
> +{
> +	return aie_check_protocol_impl(aie, fw_major, fw_minor,
> +				       aie->xdna->dev_info->fw_feature_tbl);
> +}
> +
> +int aie_check_cert_protocol(struct aie_device *aie, u32 cert_major, u32 cert_minor)
> +{
> +	return aie_check_protocol_impl(aie, cert_major, cert_minor,
> +				       aie->xdna->dev_info->cert_feature_tbl);
> +}

This seems duplicate with aie2_check_protocol().


Thanks,

Lizhi

> +
> +int amdxdna_get_aie_version(struct amdxdna_client *client,
> +			    struct amdxdna_drm_get_info *args,
> +			    struct amdxdna_drm_query_aie_version *version)
> +{
> +	u32 buf_sz;
> +
> +	buf_sz = min_t(u32, args->buffer_size, sizeof(*version));
> +	if (copy_to_user(u64_to_user_ptr(args->buffer), version, buf_sz))
> +		return -EFAULT;
> +
> +	return 0;
> +}
> +
> +int amdxdna_get_firmware_version(struct amdxdna_client *client,
> +				 struct amdxdna_drm_get_info *args,
> +				 struct amdxdna_drm_query_firmware_version *version)
> +{
> +	u32 buf_sz;
> +
> +	buf_sz = min_t(u32, args->buffer_size, sizeof(*version));
> +	if (copy_to_user(u64_to_user_ptr(args->buffer), version, buf_sz))
> +		return -EFAULT;
> +
> +	return 0;
> +}
> +
>   static void amdxdna_update_vbnv(struct amdxdna_dev *xdna,
>   				const struct amdxdna_rev_vbnv *tbl,
>   				u32 rev)
> diff --git a/drivers/accel/amdxdna/aie.h b/drivers/accel/amdxdna/aie.h
> index 0483d582b7f8..899399756661 100644
> --- a/drivers/accel/amdxdna/aie.h
> +++ b/drivers/accel/amdxdna/aie.h
> @@ -28,6 +28,7 @@ struct aie_device {
>   	struct psp_device *psp_hdl;
>   	struct smu_device *smu_hdl;
>   
> +	struct amdxdna_drm_query_aie_version version;
>   	struct amdxdna_drm_query_aie_metadata metadata;
>   };
>   
> @@ -96,6 +97,7 @@ void aie_dump_mgmt_chann_debug(struct aie_device *aie);
>   void aie_destroy_chann(struct aie_device *aie, struct mailbox_channel **chann);
>   int aie_send_mgmt_msg_wait(struct aie_device *aie, struct xdna_mailbox_msg *msg);
>   int aie_check_protocol(struct aie_device *aie, u32 fw_major, u32 fw_minor);
> +int aie_check_cert_protocol(struct aie_device *aie, u32 fw_major, u32 fw_minor);
>   void amdxdna_vbnv_init(struct amdxdna_dev *xdna);
>   int amdxdna_get_metadata(struct aie_device *aie, struct amdxdna_client *client,
>   			 struct amdxdna_drm_get_info *args);
> @@ -103,7 +105,12 @@ void *amdxdna_alloc_msg_buffer(struct amdxdna_dev *xdna, u32 *size,
>   			       dma_addr_t *dma_addr);
>   void amdxdna_free_msg_buffer(struct amdxdna_dev *xdna, size_t size,
>   			     void *cpu_addr, dma_addr_t dma_addr);
> -
> +int amdxdna_get_aie_version(struct amdxdna_client *client,
> +			    struct amdxdna_drm_get_info *args,
> +			    struct amdxdna_drm_query_aie_version *version);
> +int amdxdna_get_firmware_version(struct amdxdna_client *client,
> +				 struct amdxdna_drm_get_info *args,
> +				 struct amdxdna_drm_query_firmware_version *version);
>   /* aie_psp.c */
>   struct psp_device *aiem_psp_create(struct drm_device *ddev, struct psp_config *conf);
>   int aie_psp_start(struct psp_device *psp);
> diff --git a/drivers/accel/amdxdna/aie2_message.c b/drivers/accel/amdxdna/aie2_message.c
> index 56b919b350ac..d95a18af9b09 100644
> --- a/drivers/accel/amdxdna/aie2_message.c
> +++ b/drivers/accel/amdxdna/aie2_message.c
> @@ -149,7 +149,7 @@ int aie2_query_aie_metadata(struct amdxdna_dev_hdl *ndev,
>   }
>   
>   int aie2_query_firmware_version(struct amdxdna_dev_hdl *ndev,
> -				struct amdxdna_fw_ver *fw_ver)
> +				struct amdxdna_drm_query_firmware_version *fw_ver)
>   {
>   	DECLARE_AIE_MSG(firmware_version, MSG_OP_GET_FIRMWARE_VERSION);
>   	int ret;
> @@ -160,7 +160,7 @@ int aie2_query_firmware_version(struct amdxdna_dev_hdl *ndev,
>   
>   	fw_ver->major = resp.major;
>   	fw_ver->minor = resp.minor;
> -	fw_ver->sub = resp.sub;
> +	fw_ver->patch = resp.sub;
>   	fw_ver->build = resp.build;
>   
>   	return 0;
> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
> index d2fa46e4d3a4..62ee7deb6f92 100644
> --- a/drivers/accel/amdxdna/aie2_pci.c
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -206,15 +206,16 @@ static int aie2_mgmt_fw_init(struct amdxdna_dev_hdl *ndev)
>   
>   static int aie2_mgmt_fw_query(struct amdxdna_dev_hdl *ndev)
>   {
> +	struct amdxdna_dev *xdna = ndev->aie.xdna;
>   	int ret;
>   
> -	ret = aie2_query_firmware_version(ndev, &ndev->aie.xdna->fw_ver);
> +	ret = aie2_query_firmware_version(ndev, &xdna->fw_ver);
>   	if (ret) {
>   		XDNA_ERR(ndev->aie.xdna, "query firmware version failed");
>   		return ret;
>   	}
>   
> -	ret = aie2_query_aie_version(ndev, &ndev->version);
> +	ret = aie2_query_aie_version(ndev, &ndev->aie.version);
>   	if (ret) {
>   		XDNA_ERR(ndev->aie.xdna, "Query AIE version failed");
>   		return ret;
> @@ -684,44 +685,6 @@ static int aie2_get_aie_status(struct amdxdna_client *client,
>   	return 0;
>   }
>   
> -static int aie2_get_aie_version(struct amdxdna_client *client,
> -				struct amdxdna_drm_get_info *args)
> -{
> -	struct amdxdna_drm_query_aie_version version;
> -	struct amdxdna_dev *xdna = client->xdna;
> -	struct amdxdna_dev_hdl *ndev;
> -	u32 buf_sz;
> -
> -	ndev = xdna->dev_handle;
> -	version.major = ndev->version.major;
> -	version.minor = ndev->version.minor;
> -
> -	buf_sz = min(args->buffer_size, sizeof(version));
> -	if (copy_to_user(u64_to_user_ptr(args->buffer), &version, buf_sz))
> -		return -EFAULT;
> -
> -	return 0;
> -}
> -
> -static int aie2_get_firmware_version(struct amdxdna_client *client,
> -				     struct amdxdna_drm_get_info *args)
> -{
> -	struct amdxdna_drm_query_firmware_version version;
> -	struct amdxdna_dev *xdna = client->xdna;
> -	u32 buf_sz;
> -
> -	version.major = xdna->fw_ver.major;
> -	version.minor = xdna->fw_ver.minor;
> -	version.patch = xdna->fw_ver.sub;
> -	version.build = xdna->fw_ver.build;
> -
> -	buf_sz = min(args->buffer_size, sizeof(version));
> -	if (copy_to_user(u64_to_user_ptr(args->buffer), &version, buf_sz))
> -		return -EFAULT;
> -
> -	return 0;
> -}
> -
>   static int aie2_get_power_mode(struct amdxdna_client *client,
>   			       struct amdxdna_drm_get_info *args)
>   {
> @@ -1036,7 +999,7 @@ static int aie2_get_info(struct amdxdna_client *client, struct amdxdna_drm_get_i
>   		ret = amdxdna_get_metadata(&ndev->aie, client, args);
>   		break;
>   	case DRM_AMDXDNA_QUERY_AIE_VERSION:
> -		ret = aie2_get_aie_version(client, args);
> +		ret = amdxdna_get_aie_version(client, args, &ndev->aie.version);
>   		break;
>   	case DRM_AMDXDNA_QUERY_CLOCK_METADATA:
>   		ret = aie2_get_clock_metadata(client, args);
> @@ -1048,7 +1011,7 @@ static int aie2_get_info(struct amdxdna_client *client, struct amdxdna_drm_get_i
>   		ret = aie2_get_hwctx_status(client, args);
>   		break;
>   	case DRM_AMDXDNA_QUERY_FIRMWARE_VERSION:
> -		ret = aie2_get_firmware_version(client, args);
> +		ret = amdxdna_get_firmware_version(client, args, &xdna->fw_ver);
>   		break;
>   	case DRM_AMDXDNA_GET_POWER_MODE:
>   		ret = aie2_get_power_mode(client, args);
> diff --git a/drivers/accel/amdxdna/aie2_pci.h b/drivers/accel/amdxdna/aie2_pci.h
> index a5fd71329b93..b31f73082c17 100644
> --- a/drivers/accel/amdxdna/aie2_pci.h
> +++ b/drivers/accel/amdxdna/aie2_pci.h
> @@ -74,7 +74,6 @@ enum aie2_sram_reg_idx {
>   };
>   
>   struct amdxdna_client;
> -struct amdxdna_fw_ver;
>   struct amdxdna_hwctx;
>   struct amdxdna_sched_job;
>   
> @@ -150,7 +149,6 @@ struct amdxdna_dev_hdl {
>   	void			__iomem *mbox_base;
>   
>   	u32				total_col;
> -	struct amdxdna_drm_query_aie_version version;
>   	struct aie2_exec_msg_ops	*exec_msg_ops;
>   	struct drm_gpu_scheduler	*hwctx_sched;
>   	struct ida			hwctx_sched_ida;
> @@ -263,7 +261,7 @@ int aie2_query_aie_version(struct amdxdna_dev_hdl *ndev,
>   int aie2_query_aie_metadata(struct amdxdna_dev_hdl *ndev,
>   			    struct amdxdna_drm_query_aie_metadata *metadata);
>   int aie2_query_firmware_version(struct amdxdna_dev_hdl *ndev,
> -				struct amdxdna_fw_ver *fw_ver);
> +				struct amdxdna_drm_query_firmware_version *fw_ver);
>   int aie2_query_app_health(struct amdxdna_dev_hdl *ndev, u32 context_id,
>   			  struct app_health_report *report);
>   int aie2_get_dev_revision(struct amdxdna_dev_hdl *ndev, enum aie2_dev_revision *rev);
> diff --git a/drivers/accel/amdxdna/aie4_message.c b/drivers/accel/amdxdna/aie4_message.c
> index 88037edbb02a..b137a2a40b34 100644
> --- a/drivers/accel/amdxdna/aie4_message.c
> +++ b/drivers/accel/amdxdna/aie4_message.c
> @@ -64,6 +64,51 @@ int aie4_query_aie_metadata(struct amdxdna_dev_hdl *ndev,
>   	return 0;
>   }
>   
> +int aie4_query_npu_firmware_version(struct amdxdna_dev_hdl *ndev,
> +				    struct amdxdna_drm_query_firmware_version *fw_version)
> +{
> +	DECLARE_AIE_MSG(aie4_msg_identify, AIE4_MSG_OP_IDENTIFY);
> +	int ret;
> +
> +	ret = aie_send_mgmt_msg_wait(&ndev->aie, &msg);
> +	if (ret)
> +		return ret;
> +
> +	fw_version->major = resp.fw_major;
> +	fw_version->minor = resp.fw_minor;
> +	fw_version->patch = resp.fw_patch;
> +	fw_version->build = resp.fw_build;
> +
> +	return 0;
> +}
> +
> +int aie4_query_cert_firmware_version(struct amdxdna_dev_hdl *ndev,
> +				     struct amdxdna_drm_query_firmware_version *cert_version)
> +{
> +	DECLARE_AIE_MSG(aie4_msg_query_cert_firmware_version,
> +			AIE4_MSG_OP_QUERY_CERT_FIRMWARE_VERSION);
> +	int ret;
> +
> +	ret = aie_send_mgmt_msg_wait(&ndev->aie, &msg);
> +	if (ret)
> +		return ret;
> +
> +	ret = aie_check_cert_protocol(&ndev->aie,
> +				      resp.host_queue_major, resp.host_queue_minor);
> +	if (ret) {
> +		XDNA_ERR(ndev->aie.xdna, "host queue %d.%d is not supported",
> +			 resp.host_queue_major, resp.host_queue_minor);
> +		return ret;
> +	}
> +
> +	cert_version->major = resp.major_version;
> +	cert_version->minor = resp.minor_version;
> +	cert_version->patch = resp.hotfix;
> +	cert_version->build = resp.build;
> +
> +	return 0;
> +}
> +
>   int aie4_attach_work_buffer(struct amdxdna_dev_hdl *ndev)
>   {
>   	DECLARE_AIE_MSG(aie4_msg_attach_work_buffer, AIE4_MSG_OP_ATTACH_WORK_BUFFER);
> diff --git a/drivers/accel/amdxdna/aie4_msg_priv.h b/drivers/accel/amdxdna/aie4_msg_priv.h
> index af0866045b91..5b97c8057de0 100644
> --- a/drivers/accel/amdxdna/aie4_msg_priv.h
> +++ b/drivers/accel/amdxdna/aie4_msg_priv.h
> @@ -10,8 +10,10 @@
>   #include <linux/types.h>
>   
>   enum aie4_msg_opcode {
> +	AIE4_MSG_OP_IDENTIFY                         = 0x10002,
>   	AIE4_MSG_OP_SUSPEND                          = 0x10003,
>   	AIE4_MSG_OP_ATTACH_WORK_BUFFER               = 0x1000D,
> +	AIE4_MSG_OP_QUERY_CERT_FIRMWARE_VERSION      = 0x1000F,
>   
>   	AIE4_MSG_OP_CREATE_VFS                       = 0x20001,
>   	AIE4_MSG_OP_DESTROY_VFS                      = 0x20002,
> @@ -30,6 +32,18 @@ enum aie4_msg_status {
>   	MAX_AIE4_MSG_STATUS_CODE = 0x4,
>   };
>   
> +struct aie4_msg_identify_req {
> +	__u32 rsvd;
> +} __packed;
> +
> +struct aie4_msg_identify_resp {
> +	enum aie4_msg_status status;
> +	__u32 fw_major;
> +	__u32 fw_minor;
> +	__u32 fw_patch;
> +	__u32 fw_build;
> +} __packed;
> +
>   struct aie4_msg_suspend_req {
>   	__u32 rsvd;
>   } __packed;
> @@ -132,6 +146,22 @@ struct aie4_msg_aie4_tile_info_resp {
>   	struct aie4_tile_info info;
>   } __packed;
>   
> +struct aie4_msg_query_cert_firmware_version_req {
> +	__u32 resvd;
> +} __packed;
> +
> +struct aie4_msg_query_cert_firmware_version_resp {
> +	enum aie4_msg_status status;
> +	__u8 major_version;
> +	__u8 minor_version;
> +	__u8 git_hash[41];
> +	__u8 date[11];
> +	__u8 hotfix;
> +	__u8 build;
> +	__u16 host_queue_major;
> +	__u16 host_queue_minor;
> +} __packed;
> +
>   #define AIE4_WORK_BUFFER_MIN_SIZE      SZ_4M
>   
>   struct aie4_msg_attach_work_buffer_req {
> diff --git a/drivers/accel/amdxdna/aie4_pci.c b/drivers/accel/amdxdna/aie4_pci.c
> index f81c43a1f884..dbaf90af620f 100644
> --- a/drivers/accel/amdxdna/aie4_pci.c
> +++ b/drivers/accel/amdxdna/aie4_pci.c
> @@ -277,7 +277,22 @@ static void aie4_partition_fini(struct amdxdna_dev_hdl *ndev)
>   
>   static int aie4_query(struct amdxdna_dev_hdl *ndev)
>   {
> -	return aie4_query_aie_metadata(ndev, &ndev->aie.metadata);
> +	struct amdxdna_dev *xdna = ndev->aie.xdna;
> +	int ret;
> +
> +	ret = aie4_query_npu_firmware_version(ndev, &xdna->fw_ver);
> +	if (ret)
> +		return ret;
> +
> +	ret = aie4_query_cert_firmware_version(ndev, &ndev->cert_version);
> +	if (ret)
> +		return ret;
> +
> +	ret = aie4_query_aie_metadata(ndev, &ndev->aie.metadata);
> +	if (ret)
> +		return ret;
> +
> +	return 0;
>   }
>   
>   static int aie4_pf_hw_start(struct amdxdna_dev_hdl *ndev)
> diff --git a/drivers/accel/amdxdna/aie4_pci.h b/drivers/accel/amdxdna/aie4_pci.h
> index c6219544dc0f..8c62ee6a9b23 100644
> --- a/drivers/accel/amdxdna/aie4_pci.h
> +++ b/drivers/accel/amdxdna/aie4_pci.h
> @@ -57,6 +57,13 @@ struct amdxdna_dev_hdl {
>   	void				*work_buf;
>   	dma_addr_t			work_buf_addr;
>   	u32				work_buf_size;
> +
> +	struct amdxdna_drm_query_firmware_version cert_version;
> +};
> +
> +enum aie4_fw_feature {
> +	AIE4_HSA_COMMAND = 5,
> +	AIE4_FEATURE_MAX
>   };
>   
>   /* aie4_message.c */
> @@ -64,6 +71,10 @@ int aie4_query_aie_metadata(struct amdxdna_dev_hdl *ndev,
>   			    struct amdxdna_drm_query_aie_metadata *metadata);
>   int aie4_suspend_fw(struct amdxdna_dev_hdl *ndev);
>   int aie4_attach_work_buffer(struct amdxdna_dev_hdl *ndev);
> +int aie4_query_npu_firmware_version(struct amdxdna_dev_hdl *ndev,
> +				    struct amdxdna_drm_query_firmware_version *fw_version);
> +int aie4_query_cert_firmware_version(struct amdxdna_dev_hdl *ndev,
> +				     struct amdxdna_drm_query_firmware_version *cert_version);
>   
>   /* aie4_ctx.c */
>   int aie4_hwctx_init(struct amdxdna_hwctx *hwctx);
> diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.h b/drivers/accel/amdxdna/amdxdna_pci_drv.h
> index 84c8973e9197..0002e6ef32ba 100644
> --- a/drivers/accel/amdxdna/amdxdna_pci_drv.h
> +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.h
> @@ -99,16 +99,10 @@ struct amdxdna_dev_info {
>   	size_t				dev_heap_max_size;
>   	const struct amdxdna_dev_priv	*dev_priv;
>   	const struct amdxdna_fw_feature_tbl *fw_feature_tbl;
> +	const struct amdxdna_fw_feature_tbl *cert_feature_tbl;
>   	const struct amdxdna_dev_ops	*ops;
>   };
>   
> -struct amdxdna_fw_ver {
> -	u32 major;
> -	u32 minor;
> -	u32 sub;
> -	u32 build;
> -};
> -
>   struct amdxdna_carveout;
>   
>   struct amdxdna_dev {
> @@ -120,7 +114,7 @@ struct amdxdna_dev {
>   	struct mutex			dev_lock; /* per device lock */
>   	struct list_head		client_list;
>   	struct mutex			client_lock; /* client_list */
> -	struct amdxdna_fw_ver		fw_ver;
> +	struct amdxdna_drm_query_firmware_version fw_ver;
>   	struct rw_semaphore		notifier_lock; /* for mmu notifier*/
>   	struct workqueue_struct		*notifier_wq;
>   
> diff --git a/drivers/accel/amdxdna/amdxdna_sysfs.c b/drivers/accel/amdxdna/amdxdna_sysfs.c
> index d9e359ee8182..e20b7fb1e5d1 100644
> --- a/drivers/accel/amdxdna/amdxdna_sysfs.c
> +++ b/drivers/accel/amdxdna/amdxdna_sysfs.c
> @@ -37,7 +37,7 @@ static ssize_t fw_version_show(struct device *dev, struct device_attribute *attr
>   	struct amdxdna_dev *xdna = dev_get_drvdata(dev);
>   
>   	return sprintf(buf, "%d.%d.%d.%d\n", xdna->fw_ver.major,
> -		       xdna->fw_ver.minor, xdna->fw_ver.sub,
> +		       xdna->fw_ver.minor, xdna->fw_ver.patch,
>   		       xdna->fw_ver.build);
>   }
>   static DEVICE_ATTR_RO(fw_version);
> diff --git a/drivers/accel/amdxdna/npu3_regs.c b/drivers/accel/amdxdna/npu3_regs.c
> index 8d287ef32fff..e82bc0a4f597 100644
> --- a/drivers/accel/amdxdna/npu3_regs.c
> +++ b/drivers/accel/amdxdna/npu3_regs.c
> @@ -42,6 +42,11 @@ static const struct amdxdna_fw_feature_tbl npu3_fw_feature_table[] = {
>   	{ 0 }
>   };
>   
> +static const struct amdxdna_fw_feature_tbl npu3_cert_feature_table[] = {
> +	{ .features = BIT_U64(AIE4_HSA_COMMAND), .major = 1, .min_minor = 0 },
> +	{ 0 }
> +};
> +
>   static const struct amdxdna_dev_priv npu3_dev_priv = {
>   	.npufw_path             = "npu.sbin",
>   	.certfw_path            = "cert.sbin",
> @@ -85,6 +90,7 @@ const struct amdxdna_dev_info dev_npu3_pf_info = {
>   	.device_type		= AMDXDNA_DEV_TYPE_PF,
>   	.dev_priv		= &npu3_dev_priv,
>   	.fw_feature_tbl		= npu3_fw_feature_table,
> +	.cert_feature_tbl	= npu3_cert_feature_table,
>   	.ops			= &aie4_pf_ops,
>   };
>   
> @@ -96,5 +102,6 @@ const struct amdxdna_dev_info dev_npu3_vf_info = {
>   	.device_type		= AMDXDNA_DEV_TYPE_UMQ,
>   	.dev_priv		= &npu3_dev_vf_priv,
>   	.fw_feature_tbl		= npu3_fw_feature_table,
> +	.cert_feature_tbl	= npu3_cert_feature_table,
>   	.ops			= &aie4_vf_ops,
>   };

  reply	other threads:[~2026-10-08 17:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  3:23 [PATCH V3 00/19] accel/amdxdna: Kernel submission and PM for AIE4 David Zhang
2026-10-08  3:23 ` [PATCH V3 01/19] accel/amdxdna: Rename NPU3 firmware files David Zhang
2026-10-08 16:23   ` Lizhi Hou
2026-10-08  3:23 ` [PATCH V3 02/19] accel/amdxdna: Remove mmap for doorbell David Zhang
2026-10-08  3:23 ` [PATCH V3 03/19] accel/amdxdna: Add CERT firmware version support David Zhang
2026-10-08 17:12   ` Lizhi Hou [this message]
2026-10-08 17:26     ` Zhang, Yidong (David)
2026-10-08  3:23 ` [PATCH V3 04/19] accel/amdxdna: Upgrade firmware version to 6.0 David Zhang
2026-10-08 17:15   ` Lizhi Hou
2026-10-08  3:23 ` [PATCH V3 05/19] accel/amdxdna: Add NPU3 classic device support David Zhang
2026-10-08  3:23 ` [PATCH V3 06/19] accel/amdxdna: Add AIE version query to aie4_get_info David Zhang
2026-10-08  3:23 ` [PATCH V3 07/19] accel/amdxdna: Add get and set power_mode for AIE4 David Zhang
2026-10-08  3:23 ` [PATCH V3 08/19] accel/amdxdna: Add clock, DPM frequency, and resource info queries " David Zhang
2026-10-08  3:23 ` [PATCH V3 09/19] accel/amdxdna: Add context switch hysteresis with debugfs control David Zhang
2026-10-08  3:23 ` [PATCH V3 10/19] accel/amdxdna: Refactor AIE4 hardware initialization sequence David Zhang
2026-10-08  3:23 ` [PATCH V3 11/19] accel/amdxdna: Decouple AIE4 doorbell and MSI-X notify transport hooks David Zhang
2026-10-08  3:23 ` [PATCH V3 12/19] accel/amdxdna: Implement AIE4 kernel queue lifecycle and memory layout David Zhang
2026-10-08  3:23 ` [PATCH V3 13/19] accel/amdxdna: Prepare for AIE4 command submission David Zhang
2026-10-08  3:23 ` [PATCH V3 14/19] accel/amdxdna: Move HMM invalidate wait into common GEM code David Zhang
2026-10-08  3:23 ` [PATCH V3 15/19] accel/amdxdna: Make populate_range common for AIE2 and AIE4 David Zhang
2026-10-08  3:23 ` [PATCH V3 16/19] accel/amdxdna: Implement AIE4 command packet building and submission David Zhang
2026-10-08  3:23 ` [PATCH V3 17/19] accel/amdxdna: Enable AIE4 firmware logging to DRAM David Zhang
2026-10-08  3:23 ` [PATCH V3 18/19] accel/amdxdna: Implement AIE4 suspend and resume David Zhang
2026-10-08  3:23 ` [PATCH V3 19/19] accel/amdxdna: Implement runtime suspend and resume support David Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e6284cc-e55f-e518-c61d-5e72ac50f45d@amd.com \
    --to=lizhi.hou@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karol.wachowski@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=max.zhen@amd.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=sonal.santan@amd.com \
    --cc=yidong.zhang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®