Loading drivers/bus/mhi/core/mhi_main.c +24 −1 Original line number Diff line number Diff line Loading @@ -333,6 +333,29 @@ static void mhi_recycle_ev_ring_element(struct mhi_controller *mhi_cntrl, smp_wmb(); } static void mhi_recycle_fwd_ev_ring_element(struct mhi_controller *mhi_cntrl, struct mhi_ring *ring) { dma_addr_t ctxt_wp; /* update the WP */ ring->wp += ring->el_size; if (ring->wp >= (ring->base + ring->len)) ring->wp = ring->base; /* update the context WP based on the RP to support fast forwarding */ ctxt_wp = ring->iommu_base + (ring->wp - ring->base); *ring->ctxt_wp = ctxt_wp; /* update the RP */ ring->rp += ring->el_size; if (ring->rp >= (ring->base + ring->len)) ring->rp = ring->base; /* visible to other cores */ smp_wmb(); } static bool mhi_is_ring_full(struct mhi_controller *mhi_cntrl, struct mhi_ring *ring) { Loading Loading @@ -1542,7 +1565,7 @@ int mhi_process_bw_scale_ev_ring(struct mhi_controller *mhi_cntrl, ev_ring->wp = dev_rp - 1; if (ev_ring->wp < ev_ring->base) ev_ring->wp = ev_ring->base + ev_ring->len - ev_ring->el_size; mhi_recycle_ev_ring_element(mhi_cntrl, ev_ring); mhi_recycle_fwd_ev_ring_element(mhi_cntrl, ev_ring); read_lock_bh(&mhi_cntrl->pm_lock); if (likely(MHI_DB_ACCESS_VALID(mhi_cntrl))) Loading Loading
drivers/bus/mhi/core/mhi_main.c +24 −1 Original line number Diff line number Diff line Loading @@ -333,6 +333,29 @@ static void mhi_recycle_ev_ring_element(struct mhi_controller *mhi_cntrl, smp_wmb(); } static void mhi_recycle_fwd_ev_ring_element(struct mhi_controller *mhi_cntrl, struct mhi_ring *ring) { dma_addr_t ctxt_wp; /* update the WP */ ring->wp += ring->el_size; if (ring->wp >= (ring->base + ring->len)) ring->wp = ring->base; /* update the context WP based on the RP to support fast forwarding */ ctxt_wp = ring->iommu_base + (ring->wp - ring->base); *ring->ctxt_wp = ctxt_wp; /* update the RP */ ring->rp += ring->el_size; if (ring->rp >= (ring->base + ring->len)) ring->rp = ring->base; /* visible to other cores */ smp_wmb(); } static bool mhi_is_ring_full(struct mhi_controller *mhi_cntrl, struct mhi_ring *ring) { Loading Loading @@ -1542,7 +1565,7 @@ int mhi_process_bw_scale_ev_ring(struct mhi_controller *mhi_cntrl, ev_ring->wp = dev_rp - 1; if (ev_ring->wp < ev_ring->base) ev_ring->wp = ev_ring->base + ev_ring->len - ev_ring->el_size; mhi_recycle_ev_ring_element(mhi_cntrl, ev_ring); mhi_recycle_fwd_ev_ring_element(mhi_cntrl, ev_ring); read_lock_bh(&mhi_cntrl->pm_lock); if (likely(MHI_DB_ACCESS_VALID(mhi_cntrl))) Loading