mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
Revert "bus: mhi: core: Fix MHI runtime_pm behavior"
This reverts commit 4547a749be.
This is done to ensure internal usecases with WLAN are not
impacted with high power usage. Runtime PM get also results in a
WoW exit and is also unnecessary as we already have the if
suspended check and the pending packets counter in place to take
care of rejecting suspends if they occur. The only major benefit
of this patch was to ensure controller is able to mark last busy
timestamp for runtime PM. If needed, support for it can be added
in a future patch to allow controller to update the timestamp.
Change-Id: I3e16ab3631468edd0fda3657adf0f5ae55f0be16
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
parent
09138d7384
commit
5653395337
|
|
@ -689,11 +689,8 @@ static int parse_xfer_event(struct mhi_controller *mhi_cntrl,
|
|||
/* notify client */
|
||||
mhi_chan->xfer_cb(mhi_chan->mhi_dev, &result);
|
||||
|
||||
if (mhi_chan->dir == DMA_TO_DEVICE) {
|
||||
if (mhi_chan->dir == DMA_TO_DEVICE)
|
||||
atomic_dec(&mhi_cntrl->pending_pkts);
|
||||
/* Release the reference got from mhi_queue() */
|
||||
mhi_cntrl->runtime_put(mhi_cntrl);
|
||||
}
|
||||
|
||||
/*
|
||||
* Recycle the buffer if buffer is pre-allocated,
|
||||
|
|
@ -1214,11 +1211,9 @@ static int mhi_queue(struct mhi_device *mhi_dev, struct mhi_buf_info *buf_info,
|
|||
|
||||
read_lock_irqsave(&mhi_cntrl->pm_lock, flags);
|
||||
|
||||
/* Packet is queued, take a usage ref to exit M3 if necessary
|
||||
* for host->device buffer, balanced put is done on buffer completion
|
||||
* for device->host buffer, balanced put is after ringing the DB
|
||||
*/
|
||||
mhi_cntrl->runtime_get(mhi_cntrl);
|
||||
/* trigger M3 exit if necessary */
|
||||
if (MHI_PM_IN_SUSPEND_STATE(mhi_cntrl->pm_state))
|
||||
mhi_trigger_resume(mhi_cntrl);
|
||||
|
||||
/* Assert dev_wake (to exit/prevent M1/M2)*/
|
||||
mhi_cntrl->wake_toggle(mhi_cntrl);
|
||||
|
|
@ -1229,9 +1224,6 @@ static int mhi_queue(struct mhi_device *mhi_dev, struct mhi_buf_info *buf_info,
|
|||
if (likely(MHI_DB_ACCESS_VALID(mhi_cntrl)))
|
||||
mhi_ring_chan_db(mhi_cntrl, mhi_chan);
|
||||
|
||||
if (dir == DMA_FROM_DEVICE)
|
||||
mhi_cntrl->runtime_put(mhi_cntrl);
|
||||
|
||||
read_unlock_irqrestore(&mhi_cntrl->pm_lock, flags);
|
||||
|
||||
return ret;
|
||||
|
|
@ -1679,11 +1671,8 @@ static void mhi_reset_data_chan(struct mhi_controller *mhi_cntrl,
|
|||
while (tre_ring->rp != tre_ring->wp) {
|
||||
struct mhi_buf_info *buf_info = buf_ring->rp;
|
||||
|
||||
if (mhi_chan->dir == DMA_TO_DEVICE) {
|
||||
if (mhi_chan->dir == DMA_TO_DEVICE)
|
||||
atomic_dec(&mhi_cntrl->pending_pkts);
|
||||
/* Release the reference got from mhi_queue() */
|
||||
mhi_cntrl->runtime_put(mhi_cntrl);
|
||||
}
|
||||
|
||||
if (!buf_info->pre_mapped)
|
||||
mhi_cntrl->unmap_single(mhi_cntrl, buf_info);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user