Loading drivers/platform/msm/gsi/gsi.c +23 −3 Original line number Diff line number Diff line Loading @@ -2419,6 +2419,11 @@ int gsi_alloc_channel(struct gsi_chan_props *props, unsigned long dev_hdl, ctx->stats.dp.last_timestamp = jiffies_to_msecs(jiffies); atomic_inc(&gsi_ctx->num_chan); if (props->prot == GSI_CHAN_PROT_GCI) { gsi_ctx->coal_info.ch_id = props->ch_id; gsi_ctx->coal_info.evchid = props->evt_ring_hdl; } return GSI_STATUS_SUCCESS; } EXPORT_SYMBOL(gsi_alloc_channel); Loading Loading @@ -3150,6 +3155,10 @@ int gsi_dealloc_channel(unsigned long chan_hdl) atomic_dec(&ctx->evtr->chan_ref_cnt); atomic_dec(&gsi_ctx->num_chan); if (ctx->props.prot == GSI_CHAN_PROT_GCI) { gsi_ctx->coal_info.ch_id = GSI_CHAN_MAX; gsi_ctx->coal_info.evchid = GSI_EVT_RING_MAX; } return GSI_STATUS_SUCCESS; } EXPORT_SYMBOL(gsi_dealloc_channel); Loading Loading @@ -3684,7 +3693,7 @@ EXPORT_SYMBOL(gsi_poll_n_channel); int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) { struct gsi_chan_ctx *ctx; struct gsi_chan_ctx *ctx, *coal_ctx; enum gsi_chan_mode curr; unsigned long flags; enum gsi_chan_mode chan_mode; Loading Loading @@ -3730,8 +3739,14 @@ int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) gsi_writel(1 << ctx->evtr->id, gsi_ctx->base + GSI_EE_n_CNTXT_SRC_IEOB_IRQ_CLR_OFFS(gsi_ctx->per.ee)); atomic_set(&ctx->poll_mode, mode); if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) { atomic_set(&ctx->evtr->chan->poll_mode, mode); } else if (gsi_ctx->coal_info.evchid == ctx->evtr->id) { coal_ctx = &gsi_ctx->chan[gsi_ctx->coal_info.ch_id]; if (coal_ctx != NULL) atomic_set(&coal_ctx->poll_mode, mode); } GSIDBG("set gsi_ctx evtr_id %d to %d mode\n", ctx->evtr->id, mode); ctx->stats.callback_to_poll++; Loading @@ -3740,8 +3755,13 @@ int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) if (curr == GSI_CHAN_MODE_POLL && mode == GSI_CHAN_MODE_CALLBACK) { atomic_set(&ctx->poll_mode, mode); if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) { atomic_set(&ctx->evtr->chan->poll_mode, mode); } else if (gsi_ctx->coal_info.evchid == ctx->evtr->id) { coal_ctx = &gsi_ctx->chan[gsi_ctx->coal_info.ch_id]; if (coal_ctx != NULL) atomic_set(&coal_ctx->poll_mode, mode); } __gsi_config_ieob_irq(gsi_ctx->per.ee, 1 << ctx->evtr->id, ~0); GSIDBG("set gsi_ctx evtr_id %d to %d mode\n", ctx->evtr->id, mode); Loading drivers/platform/msm/gsi/gsi.h +6 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,11 @@ struct gsi_generic_ee_cmd_debug_stats { unsigned long halt_channel; }; struct gsi_coal_chan_info { uint8_t ch_id; uint8_t evchid; }; struct gsi_ctx { void __iomem *base; struct device *dev; Loading @@ -222,6 +227,7 @@ struct gsi_ctx { struct completion gen_ee_cmd_compl; void *ipc_logbuf; void *ipc_logbuf_low; struct gsi_coal_chan_info coal_info; /* * The following used only on emulation systems. */ Loading Loading
drivers/platform/msm/gsi/gsi.c +23 −3 Original line number Diff line number Diff line Loading @@ -2419,6 +2419,11 @@ int gsi_alloc_channel(struct gsi_chan_props *props, unsigned long dev_hdl, ctx->stats.dp.last_timestamp = jiffies_to_msecs(jiffies); atomic_inc(&gsi_ctx->num_chan); if (props->prot == GSI_CHAN_PROT_GCI) { gsi_ctx->coal_info.ch_id = props->ch_id; gsi_ctx->coal_info.evchid = props->evt_ring_hdl; } return GSI_STATUS_SUCCESS; } EXPORT_SYMBOL(gsi_alloc_channel); Loading Loading @@ -3150,6 +3155,10 @@ int gsi_dealloc_channel(unsigned long chan_hdl) atomic_dec(&ctx->evtr->chan_ref_cnt); atomic_dec(&gsi_ctx->num_chan); if (ctx->props.prot == GSI_CHAN_PROT_GCI) { gsi_ctx->coal_info.ch_id = GSI_CHAN_MAX; gsi_ctx->coal_info.evchid = GSI_EVT_RING_MAX; } return GSI_STATUS_SUCCESS; } EXPORT_SYMBOL(gsi_dealloc_channel); Loading Loading @@ -3684,7 +3693,7 @@ EXPORT_SYMBOL(gsi_poll_n_channel); int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) { struct gsi_chan_ctx *ctx; struct gsi_chan_ctx *ctx, *coal_ctx; enum gsi_chan_mode curr; unsigned long flags; enum gsi_chan_mode chan_mode; Loading Loading @@ -3730,8 +3739,14 @@ int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) gsi_writel(1 << ctx->evtr->id, gsi_ctx->base + GSI_EE_n_CNTXT_SRC_IEOB_IRQ_CLR_OFFS(gsi_ctx->per.ee)); atomic_set(&ctx->poll_mode, mode); if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) { atomic_set(&ctx->evtr->chan->poll_mode, mode); } else if (gsi_ctx->coal_info.evchid == ctx->evtr->id) { coal_ctx = &gsi_ctx->chan[gsi_ctx->coal_info.ch_id]; if (coal_ctx != NULL) atomic_set(&coal_ctx->poll_mode, mode); } GSIDBG("set gsi_ctx evtr_id %d to %d mode\n", ctx->evtr->id, mode); ctx->stats.callback_to_poll++; Loading @@ -3740,8 +3755,13 @@ int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) if (curr == GSI_CHAN_MODE_POLL && mode == GSI_CHAN_MODE_CALLBACK) { atomic_set(&ctx->poll_mode, mode); if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) if ((ctx->props.prot == GSI_CHAN_PROT_GCI) && ctx->evtr->chan) { atomic_set(&ctx->evtr->chan->poll_mode, mode); } else if (gsi_ctx->coal_info.evchid == ctx->evtr->id) { coal_ctx = &gsi_ctx->chan[gsi_ctx->coal_info.ch_id]; if (coal_ctx != NULL) atomic_set(&coal_ctx->poll_mode, mode); } __gsi_config_ieob_irq(gsi_ctx->per.ee, 1 << ctx->evtr->id, ~0); GSIDBG("set gsi_ctx evtr_id %d to %d mode\n", ctx->evtr->id, mode); Loading
drivers/platform/msm/gsi/gsi.h +6 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,11 @@ struct gsi_generic_ee_cmd_debug_stats { unsigned long halt_channel; }; struct gsi_coal_chan_info { uint8_t ch_id; uint8_t evchid; }; struct gsi_ctx { void __iomem *base; struct device *dev; Loading @@ -222,6 +227,7 @@ struct gsi_ctx { struct completion gen_ee_cmd_compl; void *ipc_logbuf; void *ipc_logbuf_low; struct gsi_coal_chan_info coal_info; /* * The following used only on emulation systems. */ Loading