Loading drivers/platform/msm/gsi/gsi.c +7 −0 Original line number Diff line number Diff line Loading @@ -2888,6 +2888,13 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code) gsi_ctx->scratch.word0.val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_0_OFFS(gsi_ctx->per.ee)); if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == GSI_GEN_EE_CMD_RETURN_CODE_RETRY) { GSIDBG("chan_idx=%u ee=%u busy try again\n", chan_idx, ee); *code = GSI_GEN_EE_CMD_RETURN_CODE_RETRY; res = -GSI_STATUS_AGAIN; goto free_lock; } if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == 0) { GSIERR("No response received\n"); res = -GSI_STATUS_ERROR; Loading drivers/platform/msm/gsi/gsi.h +1 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,7 @@ enum gsi_generic_ee_cmd_return_code { GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_DIRECTION = 0x3, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_TYPE = 0x4, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_INDEX = 0x5, GSI_GEN_EE_CMD_RETURN_CODE_RETRY = 0x6, }; extern struct gsi_ctx *gsi_ctx; Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +18 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ #define IPA_SMEM_SIZE (8 * 1024) #define IPA_GSI_CHANNEL_HALT_MIN_SLEEP 5000 #define IPA_GSI_CHANNEL_HALT_MAX_SLEEP 10000 #define IPA_GSI_CHANNEL_HALT_MAX_TRY 10 /* round addresses for closes page per SMMU requirements */ #define IPA_SMMU_ROUND_TO_PAGE(iova, pa, size, iova_p, pa_p, size_p) \ do { \ Loading Loading @@ -1969,6 +1973,7 @@ static void ipa3_halt_q6_cons_gsi_channels(void) int ep_idx; int client_idx; const struct ipa_gsi_ep_config *gsi_ep_cfg; int i; int ret; int code = 0; Loading @@ -1988,6 +1993,19 @@ static void ipa3_halt_q6_cons_gsi_channels(void) ret = gsi_halt_channel_ee( gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, &code); for (i = 0; i < IPA_GSI_CHANNEL_STOP_MAX_RETRY && ret == -GSI_STATUS_AGAIN; i++) { IPADBG( "ch %d ee %d with code %d\n is busy try again", gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, code); usleep_range(IPA_GSI_CHANNEL_HALT_MIN_SLEEP, IPA_GSI_CHANNEL_HALT_MAX_SLEEP); ret = gsi_halt_channel_ee( gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, &code); } if (ret == GSI_STATUS_SUCCESS) IPADBG("halted gsi ch %d ee %d with code %d\n", gsi_ep_cfg->ipa_gsi_chan_num, Loading Loading
drivers/platform/msm/gsi/gsi.c +7 −0 Original line number Diff line number Diff line Loading @@ -2888,6 +2888,13 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code) gsi_ctx->scratch.word0.val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_0_OFFS(gsi_ctx->per.ee)); if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == GSI_GEN_EE_CMD_RETURN_CODE_RETRY) { GSIDBG("chan_idx=%u ee=%u busy try again\n", chan_idx, ee); *code = GSI_GEN_EE_CMD_RETURN_CODE_RETRY; res = -GSI_STATUS_AGAIN; goto free_lock; } if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == 0) { GSIERR("No response received\n"); res = -GSI_STATUS_ERROR; Loading
drivers/platform/msm/gsi/gsi.h +1 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,7 @@ enum gsi_generic_ee_cmd_return_code { GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_DIRECTION = 0x3, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_TYPE = 0x4, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_INDEX = 0x5, GSI_GEN_EE_CMD_RETURN_CODE_RETRY = 0x6, }; extern struct gsi_ctx *gsi_ctx; Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +18 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ #define IPA_SMEM_SIZE (8 * 1024) #define IPA_GSI_CHANNEL_HALT_MIN_SLEEP 5000 #define IPA_GSI_CHANNEL_HALT_MAX_SLEEP 10000 #define IPA_GSI_CHANNEL_HALT_MAX_TRY 10 /* round addresses for closes page per SMMU requirements */ #define IPA_SMMU_ROUND_TO_PAGE(iova, pa, size, iova_p, pa_p, size_p) \ do { \ Loading Loading @@ -1969,6 +1973,7 @@ static void ipa3_halt_q6_cons_gsi_channels(void) int ep_idx; int client_idx; const struct ipa_gsi_ep_config *gsi_ep_cfg; int i; int ret; int code = 0; Loading @@ -1988,6 +1993,19 @@ static void ipa3_halt_q6_cons_gsi_channels(void) ret = gsi_halt_channel_ee( gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, &code); for (i = 0; i < IPA_GSI_CHANNEL_STOP_MAX_RETRY && ret == -GSI_STATUS_AGAIN; i++) { IPADBG( "ch %d ee %d with code %d\n is busy try again", gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, code); usleep_range(IPA_GSI_CHANNEL_HALT_MIN_SLEEP, IPA_GSI_CHANNEL_HALT_MAX_SLEEP); ret = gsi_halt_channel_ee( gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, &code); } if (ret == GSI_STATUS_SUCCESS) IPADBG("halted gsi ch %d ee %d with code %d\n", gsi_ep_cfg->ipa_gsi_chan_num, Loading