From patchwork Thu Sep 21 20:43:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chautru, Nicolas" X-Patchwork-Id: 131809 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0BCAE4260E; Thu, 21 Sep 2023 22:47:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62A1E402EC; Thu, 21 Sep 2023 22:47:02 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id DCF8D402C9 for ; Thu, 21 Sep 2023 22:46:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695329219; x=1726865219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a5DAaG1Y13G8DM6GNnGQQ9xbBjXoq03SwQgjOHx7qGo=; b=oDk1bT33kpFZGq9C4p/G+XaL7uZwPMbaRsKLDFZNa3NnwSZKnNaKHnwD W/l214mvpcpHA0NktQbD9uE2K8PyGO1TkDmPSujUBEQg5T34p6D3O8PDa FuiwwFeVBROqUFylY+KD35TIM38eQvcOB9H4QC32VZo/u4sD5VtzUgtbH Jmanhjoty2rgYf7qEktPDW6xxfydgLwqOYBUWy2pUzbL8x7uem8Wv3hGD vHYQ8bfu9z8SPN2tEA5/wVuyVY+ejAdxjpTK4iNOHs85bjsJ/Ew3ClGkF 4Bq6DGAuiYCnb3Z2dVsxWjPOYyGAPyTWJWSWZ2Xapw8TgHI/xPXAVZe8R g==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="447138103" X-IronPort-AV: E=Sophos;i="6.03,166,1694761200"; d="scan'208";a="447138103" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 13:46:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="696907247" X-IronPort-AV: E=Sophos;i="6.03,166,1694761200"; d="scan'208";a="696907247" Received: from spr-npg-bds1-eec2.sn.intel.com (HELO spr-npg-bds1-eec2..) ([10.233.181.123]) by orsmga003.jf.intel.com with ESMTP; 21 Sep 2023 13:46:57 -0700 From: Nicolas Chautru To: dev@dpdk.org, maxime.coquelin@redhat.com Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com, Nicolas Chautru Subject: [PATCH v2 2/7] baseband/acc: add FFT version in the VRB PMD Date: Thu, 21 Sep 2023 20:43:44 +0000 Message-Id: <20230921204349.3285318-3-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230921204349.3285318-1-nicolas.chautru@intel.com> References: <20230921204349.3285318-1-nicolas.chautru@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This allows to expose the flexible version of the pointwise flexible multiplication being dynamically configured on the device. Signed-off-by: Nicolas Chautru --- drivers/baseband/acc/acc_common.h | 1 + drivers/baseband/acc/rte_vrb_pmd.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h index 5bb00746c3..df18506e75 100644 --- a/drivers/baseband/acc/acc_common.h +++ b/drivers/baseband/acc/acc_common.h @@ -512,6 +512,7 @@ struct acc_deq_intr_details { enum { ACC_VF2PF_STATUS_REQUEST = 1, ACC_VF2PF_USING_VF = 2, + ACC_VF2PF_LUT_VER_REQUEST = 3, }; diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c index 9e5a73c9c7..3c8f3409ed 100644 --- a/drivers/baseband/acc/rte_vrb_pmd.c +++ b/drivers/baseband/acc/rte_vrb_pmd.c @@ -298,6 +298,27 @@ vrb_device_status(struct rte_bbdev *dev) return reg; } +/* Request device FFT related version information. */ +static inline uint32_t +vrb_device_fft_ver(struct rte_bbdev *dev) +{ + struct acc_device *d = dev->data->dev_private; + uint32_t reg, time_out = 0; + + if (d->pf_device) + return 0; + + vrb_vf2pf(d, ACC_VF2PF_LUT_VER_REQUEST); + reg = acc_reg_read(d, d->reg_addr->pf2vf_doorbell); + while ((time_out < ACC_STATUS_TO) && (reg == RTE_BBDEV_DEV_NOSTATUS)) { + usleep(ACC_STATUS_WAIT); /*< Wait or VF->PF->VF Comms */ + reg = acc_reg_read(d, d->reg_addr->pf2vf_doorbell); + time_out++; + } + + return reg; +} + /* Checks PF Info Ring to find the interrupt cause and handles it accordingly. */ static inline void vrb_check_ir(struct acc_device *acc_dev) @@ -1100,6 +1121,7 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) fetch_acc_config(dev); /* Check the status of device. */ dev_info->device_status = vrb_device_status(dev); + dev_info->fft_version = vrb_device_fft_ver(dev); /* Exposed number of queues. */ dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;