- New linux kernel 4.20 requires VRING device address in the resource table be dynamically allocated.
Signed-off-by: Yuan Zhao <[email protected]> --- ...-resource-table-for-new-Linux-kernel.patch | 95 +++++++++++++++++++ .../recipes-ti/ocl/opencl-monitor-ipu_git.bb | 3 +- .../recipes-ti/ocl/opencl-monitor_git.bb | 3 +- 3 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 meta-arago-extras/recipes-ti/ocl/files/0001-Update-VRING-in-resource-table-for-new-Linux-kernel.patch diff --git a/meta-arago-extras/recipes-ti/ocl/files/0001-Update-VRING-in-resource-table-for-new-Linux-kernel.patch b/meta-arago-extras/recipes-ti/ocl/files/0001-Update-VRING-in-resource-table-for-new-Linux-kernel.patch new file mode 100644 index 00000000..fcdb2215 --- /dev/null +++ b/meta-arago-extras/recipes-ti/ocl/files/0001-Update-VRING-in-resource-table-for-new-Linux-kernel.patch @@ -0,0 +1,95 @@ +ocl: Update VRING in resource table for new Linux kernel + +- Mark the vring device addresses as FW_RSC_ADDR_ANY, so that Linux kernel + knows it needs to update these to the actual dynamically allocated + memory locations. The virtqueue driver itself will poll for the + completion status of this update. +- The change is backward compatible with 4.19 kernel + +Upstream-Status: Submitted + +Signed-off-by: Yuan Zhao <[email protected]> +--- + monitor/src/custom_rsc_table_tci6638.h | 7 +++---- + monitor/src/custom_rsc_table_vayu_dsp.h | 7 +++---- + monitor_ipu/src/custom_rsc_table_vayu_ipu1.h | 7 +++---- + 3 files changed, 9 insertions(+), 12 deletions(-) + +diff --git a/monitor/src/custom_rsc_table_tci6638.h b/monitor/src/custom_rsc_table_tci6638.h +index db6f686..c9f3f49 100644 +--- a/monitor/src/custom_rsc_table_tci6638.h ++++ b/monitor/src/custom_rsc_table_tci6638.h +@@ -49,8 +49,7 @@ + /* flip up bits whose indices represent features we support */ + #define RPMSG_IPU_C0_FEATURES 1 + +-#define RPMSG_VRING0_DA 0xA0000000 +-#define RPMSG_VRING1_DA 0xA0004000 ++#define RPMSG_VRING_ADDR_ANY FW_RSC_ADDR_ANY + + /* + * sizes of the virtqueues (expressed in number of buffers supported, +@@ -112,8 +111,8 @@ struct my_resource_table ti_ipc_remoteproc_ResourceTable = { + /* no config data */ + }, + /* the two vrings */ +- { RPMSG_VRING0_DA, 4096, RPMSG_VQ0_SIZE, 1, 0 }, +- { RPMSG_VRING1_DA, 4096, RPMSG_VQ1_SIZE, 2, 0 }, ++ { RPMSG_VRING_ADDR_ANY, 4096, RPMSG_VQ0_SIZE, 1, 0 }, ++ { RPMSG_VRING_ADDR_ANY, 4096, RPMSG_VQ1_SIZE, 2, 0 }, + #endif + + { +diff --git a/monitor/src/custom_rsc_table_vayu_dsp.h b/monitor/src/custom_rsc_table_vayu_dsp.h +index ddcf4a5..f7fe9e7 100644 +--- a/monitor/src/custom_rsc_table_vayu_dsp.h ++++ b/monitor/src/custom_rsc_table_vayu_dsp.h +@@ -138,8 +138,7 @@ + + // Must be marked non-cached by monitor + #define DSP_MEM_IPC_VRING 0xFFF00000 +-#define DSP_MEM_RPMSG_VRING0 0xFFF00000 +-#define DSP_MEM_RPMSG_VRING1 0xFFF04000 ++#define RPMSG_VRING_ADDR_ANY FW_RSC_ADDR_ANY + #define DSP_MEM_VRING_BUFS0 0xFFF40000 + #define DSP_MEM_VRING_BUFS1 0xFFF80000 + +@@ -272,8 +271,8 @@ struct my_resource_table ti_ipc_remoteproc_ResourceTable = { + /* no config data */ + }, + /* the two vrings */ +- { DSP_MEM_RPMSG_VRING0, 4096, DSP_RPMSG_VQ0_SIZE, 1, 0 }, +- { DSP_MEM_RPMSG_VRING1, 4096, DSP_RPMSG_VQ1_SIZE, 2, 0 }, ++ { RPMSG_VRING_ADDR_ANY, 4096, DSP_RPMSG_VQ0_SIZE, 1, 0 }, ++ { RPMSG_VRING_ADDR_ANY, 4096, DSP_RPMSG_VQ1_SIZE, 2, 0 }, + + { + TYPE_CARVEOUT, +diff --git a/monitor_ipu/src/custom_rsc_table_vayu_ipu1.h b/monitor_ipu/src/custom_rsc_table_vayu_ipu1.h +index b06ab86..ab80089 100644 +--- a/monitor_ipu/src/custom_rsc_table_vayu_ipu1.h ++++ b/monitor_ipu/src/custom_rsc_table_vayu_ipu1.h +@@ -96,8 +96,7 @@ + + #define IPU_MEM_IPC_VRING 0x60000000 + #define IPU_PHYS_MEM_IPC_VRING 0x9D000000 +-#define IPU_MEM_RPMSG_VRING0 0x60000000 +-#define IPU_MEM_RPMSG_VRING1 0x60004000 ++#define RPMSG_VRING_ADDR_ANY FW_RSC_ADDR_ANY + + /* + * Sizes of the virtqueues (expressed in number of buffers supported, +@@ -206,8 +205,8 @@ struct my_resource_table ti_ipc_remoteproc_ResourceTable = { + /* no config data */ + }, + /* the two vrings */ +- { IPU_MEM_RPMSG_VRING0, 4096, IPU_RPMSG_VQ0_SIZE, 1, 0 }, +- { IPU_MEM_RPMSG_VRING1, 4096, IPU_RPMSG_VQ1_SIZE, 2, 0 }, ++ { RPMSG_VRING_ADDR_ANY, 4096, IPU_RPMSG_VQ0_SIZE, 1, 0 }, ++ { RPMSG_VRING_ADDR_ANY, 4096, IPU_RPMSG_VQ1_SIZE, 2, 0 }, + + { + TYPE_CARVEOUT, +-- +2.17.1 + diff --git a/meta-arago-extras/recipes-ti/ocl/opencl-monitor-ipu_git.bb b/meta-arago-extras/recipes-ti/ocl/opencl-monitor-ipu_git.bb index 98103222..0e7e4540 100644 --- a/meta-arago-extras/recipes-ti/ocl/opencl-monitor-ipu_git.bb +++ b/meta-arago-extras/recipes-ti/ocl/opencl-monitor-ipu_git.bb @@ -5,7 +5,8 @@ LICENSE = "BSD" include ocl.inc require recipes-ti/includes/arago-paths.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" +SRC_URI += "file://0001-Update-VRING-in-resource-table-for-new-Linux-kernel.patch;patchdir=.." inherit update-alternatives diff --git a/meta-arago-extras/recipes-ti/ocl/opencl-monitor_git.bb b/meta-arago-extras/recipes-ti/ocl/opencl-monitor_git.bb index 0ab21a1a..6689f94b 100644 --- a/meta-arago-extras/recipes-ti/ocl/opencl-monitor_git.bb +++ b/meta-arago-extras/recipes-ti/ocl/opencl-monitor_git.bb @@ -5,7 +5,8 @@ LICENSE = "BSD" include ocl.inc require recipes-ti/includes/arago-paths.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" +SRC_URI += "file://0001-Update-VRING-in-resource-table-for-new-Linux-kernel.patch;patchdir=.." inherit update-alternatives -- 2.24.1 _______________________________________________ meta-arago mailing list [email protected] http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
