Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +4 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,10 @@ #define IPA_WDI2_OVER_GSI() (ipa3_ctx->ipa_wdi2_over_gsi \ && (ipa3_get_wdi_version() == IPA_WDI_2)) /* Bit alignment for IPA4.5 GSI rings */ #define IPA_LOW_16_BIT_MASK (0xFFFF) #define IPA4_5_GSI_RING_SIZE_ALIGN (16 * PAGE_SIZE) #define IPADBG(fmt, args...) \ do { \ pr_debug(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args);\ Loading drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c +11 −0 Original line number Diff line number Diff line Loading @@ -641,6 +641,17 @@ static int ipa_create_ap_smmu_mapping_sgt(struct sg_table *sgt, start_iova = va; } /* * In IPA4.5, GSI HW has such requirement: * Lower 16_bits of Ring base + ring length can’t exceed 16 bits */ if (ipa3_ctx->ipa_hw_type == IPA_HW_v4_5 && ((u32)(va & IPA_LOW_16_BIT_MASK) + len) >= IPA4_5_GSI_RING_SIZE_ALIGN) { va = roundup(cb->next_addr, IPA4_5_GSI_RING_SIZE_ALIGN); start_iova = va; } for_each_sg(sgt->sgl, sg, sgt->nents, i) { /* directly get sg_tbl PA from wlan-driver */ phys = sg->dma_address; Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +4 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,10 @@ #define IPA_WDI2_OVER_GSI() (ipa3_ctx->ipa_wdi2_over_gsi \ && (ipa3_get_wdi_version() == IPA_WDI_2)) /* Bit alignment for IPA4.5 GSI rings */ #define IPA_LOW_16_BIT_MASK (0xFFFF) #define IPA4_5_GSI_RING_SIZE_ALIGN (16 * PAGE_SIZE) #define IPADBG(fmt, args...) \ do { \ pr_debug(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args);\ Loading
drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c +11 −0 Original line number Diff line number Diff line Loading @@ -641,6 +641,17 @@ static int ipa_create_ap_smmu_mapping_sgt(struct sg_table *sgt, start_iova = va; } /* * In IPA4.5, GSI HW has such requirement: * Lower 16_bits of Ring base + ring length can’t exceed 16 bits */ if (ipa3_ctx->ipa_hw_type == IPA_HW_v4_5 && ((u32)(va & IPA_LOW_16_BIT_MASK) + len) >= IPA4_5_GSI_RING_SIZE_ALIGN) { va = roundup(cb->next_addr, IPA4_5_GSI_RING_SIZE_ALIGN); start_iova = va; } for_each_sg(sgt->sgl, sg, sgt->nents, i) { /* directly get sg_tbl PA from wlan-driver */ phys = sg->dma_address; Loading