Loading Documentation/devicetree/bindings/qdsp/msm-fastrpc.txt +11 −6 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ Subnode Required properties: - label : Label describing the channel this context bank belongs to - iommus : A list of phandle and IOMMU specifier pairs that describe the IOMMU master interfaces of the device - dma-coherent : A flag marking a context bank as I/O coherent - shared-cb : A value indicating how many fastrpc sessions can share a context bank Example: qcom,msm_fastrpc { Loading @@ -42,12 +45,14 @@ Example: qcom,msm_fastrpc_compute_cb_1 { compatible = "qcom,msm-fastrpc-compute-cb"; label = "adsprpc-smd"; iommus = <&apps_smmu 0x1401 0x0>, iommus = <&apps_smmu 0x1401 0x0>; dma-coherent; }; qcom,msm_fastrpc_compute_cb_2 { compatible = "qcom,msm-fastrpc-compute-cb"; label = "adsprpc-smd"; iommus = <&apps_smmu 0x1402 0x0>, label = "sdsprpc-smd"; iommus = <&apps_smmu 0x1402 0x0>; shared-cb = <5>; }; }; Loading drivers/char/adsprpc.c +20 −1 Original line number Diff line number Diff line Loading @@ -2960,7 +2960,8 @@ static int fastrpc_cb_probe(struct device *dev) struct of_phandle_args iommuspec; const char *name; dma_addr_t start = 0x80000000; int err = 0, cid, i; int err = 0; unsigned int sharedcb_count = 0, cid, i, j; int secure_vmid = VMID_CP_PIXEL; VERIFY(err, NULL != (name = of_get_property(dev->of_node, Loading Loading @@ -3022,6 +3023,24 @@ static int fastrpc_cb_probe(struct device *dev) dma_set_max_seg_size(sess->smmu.dev, DMA_BIT_MASK(32)); dma_set_seg_boundary(sess->smmu.dev, DMA_BIT_MASK(64)); if (of_get_property(dev->of_node, "shared-cb", NULL) != NULL) { VERIFY(err, !of_property_read_u32(dev->of_node, "shared-cb", &sharedcb_count)); if (err) goto bail; if (sharedcb_count > 0) { struct fastrpc_session_ctx *dup_sess; for (j = 1; j < sharedcb_count && chan->sesscount < NUM_SESSIONS; j++) { chan->sesscount++; dup_sess = &chan->session[chan->sesscount]; memcpy(dup_sess, sess, sizeof(struct fastrpc_session_ctx)); } } } chan->sesscount++; debugfs_global_file = debugfs_create_file("global", 0644, debugfs_root, NULL, &debugfs_fops); Loading Loading
Documentation/devicetree/bindings/qdsp/msm-fastrpc.txt +11 −6 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ Subnode Required properties: - label : Label describing the channel this context bank belongs to - iommus : A list of phandle and IOMMU specifier pairs that describe the IOMMU master interfaces of the device - dma-coherent : A flag marking a context bank as I/O coherent - shared-cb : A value indicating how many fastrpc sessions can share a context bank Example: qcom,msm_fastrpc { Loading @@ -42,12 +45,14 @@ Example: qcom,msm_fastrpc_compute_cb_1 { compatible = "qcom,msm-fastrpc-compute-cb"; label = "adsprpc-smd"; iommus = <&apps_smmu 0x1401 0x0>, iommus = <&apps_smmu 0x1401 0x0>; dma-coherent; }; qcom,msm_fastrpc_compute_cb_2 { compatible = "qcom,msm-fastrpc-compute-cb"; label = "adsprpc-smd"; iommus = <&apps_smmu 0x1402 0x0>, label = "sdsprpc-smd"; iommus = <&apps_smmu 0x1402 0x0>; shared-cb = <5>; }; }; Loading
drivers/char/adsprpc.c +20 −1 Original line number Diff line number Diff line Loading @@ -2960,7 +2960,8 @@ static int fastrpc_cb_probe(struct device *dev) struct of_phandle_args iommuspec; const char *name; dma_addr_t start = 0x80000000; int err = 0, cid, i; int err = 0; unsigned int sharedcb_count = 0, cid, i, j; int secure_vmid = VMID_CP_PIXEL; VERIFY(err, NULL != (name = of_get_property(dev->of_node, Loading Loading @@ -3022,6 +3023,24 @@ static int fastrpc_cb_probe(struct device *dev) dma_set_max_seg_size(sess->smmu.dev, DMA_BIT_MASK(32)); dma_set_seg_boundary(sess->smmu.dev, DMA_BIT_MASK(64)); if (of_get_property(dev->of_node, "shared-cb", NULL) != NULL) { VERIFY(err, !of_property_read_u32(dev->of_node, "shared-cb", &sharedcb_count)); if (err) goto bail; if (sharedcb_count > 0) { struct fastrpc_session_ctx *dup_sess; for (j = 1; j < sharedcb_count && chan->sesscount < NUM_SESSIONS; j++) { chan->sesscount++; dup_sess = &chan->session[chan->sesscount]; memcpy(dup_sess, sess, sizeof(struct fastrpc_session_ctx)); } } } chan->sesscount++; debugfs_global_file = debugfs_create_file("global", 0644, debugfs_root, NULL, &debugfs_fops); Loading