diff --git a/QDMA/linux-kernel/RELEASE b/QDMA/linux-kernel/RELEASE index 51278dad9fa855e19da4fb2cb7304507bd537917..85b1b242b11af43e167b77725733d372a2d5a674 100755 --- a/QDMA/linux-kernel/RELEASE +++ b/QDMA/linux-kernel/RELEASE @@ -1,4 +1,4 @@ -RELEASE: 2023.1.3 +RELEASE: 2023.2.0 ================= This release is validated @@ -6,6 +6,7 @@ This release is validated - On VCU1525 for QDMA4.0 2020.2 example design - On VCU1525 for QDMA3.1 2019.2 example design - On XCVP1202 for CPM5 2022.1 example design + - On XCVC1902 for CPM4 2022.1 example design SUPPORTED FEATURES: =================== @@ -144,8 +145,18 @@ CPM5 ---------------- - dma-ctl application is updated to append q params during queue start. +2023.2.0 Updates +---------------- +- Added driver support for CPM4 design. + + KNOWN ISSUES: ============= +- CPM4 Only + - Due to HW PDI limitaion, + - VF is supported in poll mode only. + - VF functionality on VM is not verfied. + - Observed MMAP failure for applications when device is binded QDMA Linux driver on Fedora37. Fix will be availbale in upcoming release. - CPM5 Only diff --git a/QDMA/linux-kernel/apps/dma-ctl/main.c b/QDMA/linux-kernel/apps/dma-ctl/main.c index 95159ed89eec9a946637a13d2468ababbcade63a..2a80961e2a261b1da19f7c1fbc79450cf2f62b7a 100755 --- a/QDMA/linux-kernel/apps/dma-ctl/main.c +++ b/QDMA/linux-kernel/apps/dma-ctl/main.c @@ -131,7 +131,7 @@ static void dump_dev_global_csr(struct xcmd_info *xcmd) printf("%d ",xcmd->resp.csr.c2h_cnt_th[i]); printf("\nC2H Buf Sizes:"); for ( int i=0; i < QDMA_GLOBAL_CSR_ARRAY_SZ; i++) - printf("%d ",xcmd->resp.csr.c2h_cnt_th[i]); + printf("%d ",xcmd->resp.csr.c2h_buf_sz[i]); printf("\nWriteback Interval:%d\n",xcmd->resp.csr.wb_intvl); } diff --git a/QDMA/linux-kernel/apps/dma-ctl/version.h b/QDMA/linux-kernel/apps/dma-ctl/version.h index 447858d884b2690529c06ab53d35e3edf9b1ea02..e01b78a8afd91dadf267ba65ede5d32bb37edcb3 100755 --- a/QDMA/linux-kernel/apps/dma-ctl/version.h +++ b/QDMA/linux-kernel/apps/dma-ctl/version.h @@ -13,7 +13,7 @@ #define __DMA_CTL_VERSION_H #define PROGNAME "dma-ctl" -#define VERSION "2023.1.3" +#define VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/apps/dma-from-device/version.h b/QDMA/linux-kernel/apps/dma-from-device/version.h index 273a5d255e86e060c9a825e61776ae1c8aac0099..9eeb78480294c11d50c6b5c0aa473606f4f7abb2 100755 --- a/QDMA/linux-kernel/apps/dma-from-device/version.h +++ b/QDMA/linux-kernel/apps/dma-from-device/version.h @@ -13,7 +13,7 @@ #define __DMA_FROM_DEVICE_VERSION_H #define PROGNAME "dma-from-device" -#define VERSION "2023.1.2" +#define VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/apps/dma-latency/version.h b/QDMA/linux-kernel/apps/dma-latency/version.h index 2ec9693b8e57a3dcef607f4acbbc710d022378e4..650deb97fe511e997f777dabdbeeb964405472dd 100755 --- a/QDMA/linux-kernel/apps/dma-latency/version.h +++ b/QDMA/linux-kernel/apps/dma-latency/version.h @@ -13,7 +13,7 @@ #define __DMA_LATENCY_VERSION_H #define PROGNAME "dma-latency" -#define VERSION "2023.1.2" +#define VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/apps/dma-perf/version.h b/QDMA/linux-kernel/apps/dma-perf/version.h index dc3db51160de829ac0aa0b906d239aee5359d936..53a766a5ea2dc6ab901a96e957eeab83c035047a 100755 --- a/QDMA/linux-kernel/apps/dma-perf/version.h +++ b/QDMA/linux-kernel/apps/dma-perf/version.h @@ -13,7 +13,7 @@ #define __DMA_PERF_VERSION_H #define PROGNAME "dma-perf" -#define VERSION "2023.1.2" +#define VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/apps/dma-to-device/version.h b/QDMA/linux-kernel/apps/dma-to-device/version.h index 03e2a8398c18a90cffc2826d2ea0961c9edfaada..b14cefc12295cd85626a2b0178a0a19c7ff5054b 100755 --- a/QDMA/linux-kernel/apps/dma-to-device/version.h +++ b/QDMA/linux-kernel/apps/dma-to-device/version.h @@ -13,7 +13,7 @@ #define __DMA_TO_DEVICE_VERSION_H #define PROGNAME "dma-to-device" -#define VERSION "2023.1.2" +#define VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/apps/dma-utils/version.h b/QDMA/linux-kernel/apps/dma-utils/version.h index 510eea844939727f86b9ab33c921210ffb46e778..7e540efcbafff602b9019b1fe099e70d6908ef83 100755 --- a/QDMA/linux-kernel/apps/dma-utils/version.h +++ b/QDMA/linux-kernel/apps/dma-utils/version.h @@ -13,7 +13,7 @@ #define __DMA_UTILS_VERSION_H #define LIBNAME "dma-utils" -#define QDMATUILS_VERSION "2023.1.2" +#define QDMATUILS_VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/apps/dma-xfer/version.h b/QDMA/linux-kernel/apps/dma-xfer/version.h index 98a77e475e47fe37a41ca6800bb1e235f59baa70..31e8654401b57b9f6adf963fd946b9b339b27951 100755 --- a/QDMA/linux-kernel/apps/dma-xfer/version.h +++ b/QDMA/linux-kernel/apps/dma-xfer/version.h @@ -12,7 +12,7 @@ #define __DMA_XFER_VERSION_H #define PROGNAME "dma-xfer" -#define VERSION "2023.1.2" +#define VERSION "2023.2.0" #define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc." #endif diff --git a/QDMA/linux-kernel/driver/libqdma/libqdma_export.c b/QDMA/linux-kernel/driver/libqdma/libqdma_export.c index 6280254f18ce96b6199c6362e05161d5b34a949f..cf9ae2ce5ed25cfb0d6780b309db75793ff3b3d1 100755 --- a/QDMA/linux-kernel/driver/libqdma/libqdma_export.c +++ b/QDMA/linux-kernel/driver/libqdma/libqdma_export.c @@ -2672,7 +2672,8 @@ int qdma_init_st_ctxt(unsigned long dev_hndl, char *buf, int buflen) } if ((xdev->version_info.ip_type == QDMA_VERSAL_HARD_IP) && - (xdev->version_info.device_type == QDMA_DEVICE_VERSAL_CPM5)) { + ((xdev->version_info.device_type == QDMA_DEVICE_VERSAL_CPM4) || + (xdev->version_info.device_type == QDMA_DEVICE_VERSAL_CPM5))) { if (xdev->hw.qdma_init_st_ctxt == NULL) { pr_err("Err: Feature not supported\n"); snprintf(buf, buflen, "Err: Feature not supported\n"); diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h index 9fb91818f00a67642acd10d45b428a035f127f1e..5bc29ab91577bba8d403bfa52691d1229c78f295 100755 --- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h +++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved. - * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. * * This source code is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -20,8 +20,8 @@ #define QDMA_VERSION_MAJOR 2023 -#define QDMA_VERSION_MINOR 1 -#define QDMA_VERSION_PATCH 2 +#define QDMA_VERSION_MINOR 2 +#define QDMA_VERSION_PATCH 0 #define QDMA_VERSION_STR \ __stringify(QDMA_VERSION_MAJOR) "." \ diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c index 757662f801490d37c0aeabe9afa970bbcc084803..33c45ff6598c0c6a6cfade9358bba7fcb5aa4d07 100755 --- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c +++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c @@ -4923,6 +4923,15 @@ int qdma_cpm4_init_ctxt_memory(void *dev_hndl) int sel = QDMA_CTXT_SEL_SW_C2H; int rv; + +#ifdef TANDEM_BOOT_SUPPORTED + for (; sel <= QDMA_CTXT_SEL_CR_H2C; sel++) { + rv = qdma_cpm4_indirect_reg_clear(dev_hndl, + (enum ind_ctxt_cmd_sel)sel, i); + if (rv < 0) + return rv; + } +#else for (; sel <= QDMA_CTXT_SEL_PFTCH; sel++) { /** if the st mode(h2c/c2h) not enabled * in the design, then skip the PFTCH @@ -4942,6 +4951,7 @@ int qdma_cpm4_init_ctxt_memory(void *dev_hndl) if (rv < 0) return rv; } +#endif } /* fmap */ @@ -4957,6 +4967,60 @@ int qdma_cpm4_init_ctxt_memory(void *dev_hndl) return 0; } +#ifdef TANDEM_BOOT_SUPPORTED +/*****************************************************************************/ +/** + * qdma_cpm4_init_st_ctxt() - Initialize the ST context + * + * @dev_hndl: device handle + * + * Return: returns the platform specific error code + *****************************************************************************/ +int qdma_cpm4_init_st_ctxt(void *dev_hndl) +{ + uint32_t data[QDMA_REG_IND_CTXT_REG_COUNT]; + uint16_t i = 0; + struct qdma_dev_attributes dev_info; + + if (!dev_hndl) { + qdma_log_error("%s: dev_handle is NULL, err:%d\n", + __func__, -QDMA_ERR_INV_PARAM); + return -QDMA_ERR_INV_PARAM; + } + + qdma_memset(data, 0, sizeof(uint32_t) * QDMA_REG_IND_CTXT_REG_COUNT); + qdma_cpm4_get_device_attributes(dev_hndl, &dev_info); + + for (; i < dev_info.num_qs; i++) { + int sel = QDMA_CTXT_SEL_CMPT; + int rv; + + for (; sel <= QDMA_CTXT_SEL_PFTCH; sel++) { + /** if the st mode(h2c/c2h) not enabled + * in the design, then skip the PFTCH + * and CMPT context setup + */ + if ((dev_info.st_en == 0) && + ((sel == QDMA_CTXT_SEL_PFTCH) || + (sel == QDMA_CTXT_SEL_CMPT))) { + qdma_log_debug("%s: ST context is skipped:", + __func__); + qdma_log_debug("sel = %d\n", sel); + continue; + } + + rv = qdma_cpm4_indirect_reg_clear(dev_hndl, + (enum ind_ctxt_cmd_sel)sel, i); + if (rv < 0) + return rv; + } + } + + return QDMA_SUCCESS; + +} +#endif + static int get_reg_entry(uint32_t reg_addr, int *reg_entry) { uint32_t i = 0; diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.h b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.h index b238c3317ef658c5ef64c5660bc93d324112adab..cecb0d731793eda5b85ed9114e1e3093f3183351 100755 --- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.h +++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.h @@ -163,6 +163,10 @@ struct qdma_cpm4_hw_err_info { int qdma_cpm4_init_ctxt_memory(void *dev_hndl); +#ifdef TANDEM_BOOT_SUPPORTED +int qdma_cpm4_init_st_ctxt(void *dev_hndl); +#endif + int qdma_cpm4_qid2vec_conf(void *dev_hndl, uint8_t c2h, uint16_t hw_qid, struct qdma_qid2vec *ctxt, enum qdma_hw_access_type access_type); diff --git a/QDMA/linux-kernel/driver/libqdma/version.h b/QDMA/linux-kernel/driver/libqdma/version.h index 2246946a74d1d6872a2aca64fb0dbf8ba0c4e31e..5b6e3324a1afd144d39faf502d4e45baf46e55f8 100755 --- a/QDMA/linux-kernel/driver/libqdma/version.h +++ b/QDMA/linux-kernel/driver/libqdma/version.h @@ -24,7 +24,7 @@ #define LIBQDMA_MODULE_DESC "Xilinx QDMA Library" #define LIBQDMA_VERSION_MAJOR 2023 -#define LIBQDMA_VERSION_MINOR 1 +#define LIBQDMA_VERSION_MINOR 2 #define LIBQDMA_VERSION_PATCH 0 #define LIBQDMA_VERSION_STR \ diff --git a/QDMA/linux-kernel/driver/src/version.h b/QDMA/linux-kernel/driver/src/version.h index 2b97f6634faaa36e8919eee83567ac6d05bdbb75..57274288452c085397621373c0c39b9e6f68e219 100755 --- a/QDMA/linux-kernel/driver/src/version.h +++ b/QDMA/linux-kernel/driver/src/version.h @@ -29,10 +29,10 @@ #define DRV_MODULE_NAME "qdma-pf" #define DRV_MODULE_DESC "Xilinx QDMA PF Reference Driver" #endif /* #ifdef __QDMA_VF__ */ -#define DRV_MODULE_RELDATE "Jan 2023" +#define DRV_MODULE_RELDATE "Sept 2023" #define DRV_MOD_MAJOR 2023 -#define DRV_MOD_MINOR 1 +#define DRV_MOD_MINOR 2 #define DRV_MOD_PATCHLEVEL 0 #define DRV_MODULE_VERSION \