Loading Documentation/devicetree/bindings/platform/msm/ipa.txt +4 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ memory allocation over a PCIe bridge configures embedded pipe filtering rules - qcom,skip-uc-pipe-reset: Boolean context flag to indicate whether a pipe reset via the IPA uC is required - qcom,use-dma-zone: Boolean context flag to indicate whether memory allocations controlled by IPA driver that do not specify a struct device * should use GFP_DMA to workaround IPA HW limitations IPA pipe sub nodes (A2 static pipes configurations): Loading arch/arm/boot/dts/qcom/msm8996-v2.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,7 @@ clock-names = "core_clk", "smmu_clk"; qcom,arm-smmu; qcom,smmu-disable-htw; qcom,use-dma-zone; ipa_smmu_ap: ipa_smmu_ap { compatible = "qcom,ipa-smmu-ap-cb"; Loading drivers/platform/msm/ipa/ipa.c +8 −0 Original line number Diff line number Diff line Loading @@ -3112,6 +3112,7 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p, ipa_ctx->modem_cfg_emb_pipe_flt = resource_p->modem_cfg_emb_pipe_flt; ipa_ctx->wan_rx_ring_size = resource_p->wan_rx_ring_size; ipa_ctx->skip_uc_pipe_reset = resource_p->skip_uc_pipe_reset; ipa_ctx->use_dma_zone = resource_p->use_dma_zone; /* default aggregation parameters */ ipa_ctx->aggregation_type = IPA_MBIM_16; Loading Loading @@ -3683,6 +3684,13 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, ipa_drv_res->skip_uc_pipe_reset ? "True" : "False"); ipa_drv_res->use_dma_zone = of_property_read_bool(pdev->dev.of_node, "qcom,use-dma-zone"); IPADBG(": use dma zone = %s\n", ipa_drv_res->use_dma_zone ? "True" : "False"); /* Get IPA wrapper address */ resource = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ipa-base"); Loading drivers/platform/msm/ipa/ipa_dp.c +6 −4 Original line number Diff line number Diff line Loading @@ -1055,7 +1055,7 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) ep->connect.options = ep->sys->sps_option; ep->connect.desc.size = sys_in->desc_fifo_sz; ep->connect.desc.base = dma_alloc_coherent(ipa_ctx->pdev, ep->connect.desc.size, &dma_addr, 0); ep->connect.desc.size, &dma_addr, GFP_KERNEL); if (!ipa_ctx->smmu_present) { ep->connect.desc.phys_base = dma_addr; } else { Loading Loading @@ -1414,7 +1414,7 @@ static void ipa_wq_repl_rx(struct work_struct *work) struct ipa_sys_context *sys; void *ptr; struct ipa_rx_pkt_wrapper *rx_pkt; gfp_t flag = GFP_KERNEL; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); u32 next; u32 curr; Loading Loading @@ -1579,7 +1579,8 @@ static void ipa_alloc_wlan_rx_common_cache(u32 size) void *ptr; struct ipa_rx_pkt_wrapper *rx_pkt; int rx_len_cached = 0; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); rx_len_cached = ipa_ctx->wc_memb.wlan_comm_total_cnt; while (rx_len_cached < size) { Loading Loading @@ -1649,7 +1650,8 @@ static void ipa_replenish_rx_cache(struct ipa_sys_context *sys) struct ipa_rx_pkt_wrapper *rx_pkt; int ret; int rx_len_cached = 0; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); rx_len_cached = sys->len; Loading drivers/platform/msm/ipa/ipa_i.h +2 −0 Original line number Diff line number Diff line Loading @@ -1225,6 +1225,7 @@ struct ipa_context { unsigned long peer_bam_dev; u32 peer_bam_map_cnt; u32 wdi_map_cnt; bool use_dma_zone; }; /** Loading Loading @@ -1274,6 +1275,7 @@ struct ipa_plat_drv_res { bool modem_cfg_emb_pipe_flt; u32 wan_rx_ring_size; bool skip_uc_pipe_reset; bool use_dma_zone; }; struct ipa_mem_partition { Loading Loading
Documentation/devicetree/bindings/platform/msm/ipa.txt +4 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ memory allocation over a PCIe bridge configures embedded pipe filtering rules - qcom,skip-uc-pipe-reset: Boolean context flag to indicate whether a pipe reset via the IPA uC is required - qcom,use-dma-zone: Boolean context flag to indicate whether memory allocations controlled by IPA driver that do not specify a struct device * should use GFP_DMA to workaround IPA HW limitations IPA pipe sub nodes (A2 static pipes configurations): Loading
arch/arm/boot/dts/qcom/msm8996-v2.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,7 @@ clock-names = "core_clk", "smmu_clk"; qcom,arm-smmu; qcom,smmu-disable-htw; qcom,use-dma-zone; ipa_smmu_ap: ipa_smmu_ap { compatible = "qcom,ipa-smmu-ap-cb"; Loading
drivers/platform/msm/ipa/ipa.c +8 −0 Original line number Diff line number Diff line Loading @@ -3112,6 +3112,7 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p, ipa_ctx->modem_cfg_emb_pipe_flt = resource_p->modem_cfg_emb_pipe_flt; ipa_ctx->wan_rx_ring_size = resource_p->wan_rx_ring_size; ipa_ctx->skip_uc_pipe_reset = resource_p->skip_uc_pipe_reset; ipa_ctx->use_dma_zone = resource_p->use_dma_zone; /* default aggregation parameters */ ipa_ctx->aggregation_type = IPA_MBIM_16; Loading Loading @@ -3683,6 +3684,13 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, ipa_drv_res->skip_uc_pipe_reset ? "True" : "False"); ipa_drv_res->use_dma_zone = of_property_read_bool(pdev->dev.of_node, "qcom,use-dma-zone"); IPADBG(": use dma zone = %s\n", ipa_drv_res->use_dma_zone ? "True" : "False"); /* Get IPA wrapper address */ resource = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ipa-base"); Loading
drivers/platform/msm/ipa/ipa_dp.c +6 −4 Original line number Diff line number Diff line Loading @@ -1055,7 +1055,7 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) ep->connect.options = ep->sys->sps_option; ep->connect.desc.size = sys_in->desc_fifo_sz; ep->connect.desc.base = dma_alloc_coherent(ipa_ctx->pdev, ep->connect.desc.size, &dma_addr, 0); ep->connect.desc.size, &dma_addr, GFP_KERNEL); if (!ipa_ctx->smmu_present) { ep->connect.desc.phys_base = dma_addr; } else { Loading Loading @@ -1414,7 +1414,7 @@ static void ipa_wq_repl_rx(struct work_struct *work) struct ipa_sys_context *sys; void *ptr; struct ipa_rx_pkt_wrapper *rx_pkt; gfp_t flag = GFP_KERNEL; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); u32 next; u32 curr; Loading Loading @@ -1579,7 +1579,8 @@ static void ipa_alloc_wlan_rx_common_cache(u32 size) void *ptr; struct ipa_rx_pkt_wrapper *rx_pkt; int rx_len_cached = 0; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); rx_len_cached = ipa_ctx->wc_memb.wlan_comm_total_cnt; while (rx_len_cached < size) { Loading Loading @@ -1649,7 +1650,8 @@ static void ipa_replenish_rx_cache(struct ipa_sys_context *sys) struct ipa_rx_pkt_wrapper *rx_pkt; int ret; int rx_len_cached = 0; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN; gfp_t flag = GFP_NOWAIT | __GFP_NOWARN | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); rx_len_cached = sys->len; Loading
drivers/platform/msm/ipa/ipa_i.h +2 −0 Original line number Diff line number Diff line Loading @@ -1225,6 +1225,7 @@ struct ipa_context { unsigned long peer_bam_dev; u32 peer_bam_map_cnt; u32 wdi_map_cnt; bool use_dma_zone; }; /** Loading Loading @@ -1274,6 +1275,7 @@ struct ipa_plat_drv_res { bool modem_cfg_emb_pipe_flt; u32 wan_rx_ring_size; bool skip_uc_pipe_reset; bool use_dma_zone; }; struct ipa_mem_partition { Loading