Kill unused scheduler knob and parameter sched_enable_power_aware. HMP
scheduler always take into account power cost for placing task.
Change-Id: Ib26a21df9b903baac26c026862b0a41b4a8834f3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Kill unused scheduler knob sched_account_wait_time. With this change
scheduler always accounts task's wait time into demand.
Change-Id: Ifa4bcb5685798f48fd020f3d0c9853220b3f5fdc
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
When a buffer is added to the LRU list, a reference is taken which is
not dropped until the buffer is evicted from the LRU list. This is the
correct behavior, however this LRU reference will prevent the buffer
from being dropped. This means that the buffer can't actually be dropped
until it is selected for eviction. There's no bound on the time spent
on the LRU list, which means that the buffer may be undroppable for
very long periods of time. Given that migration involves dropping
buffers, the associated page is now unmigratible for long periods of
time as well. CMA relies on being able to migrate a specific range
of pages, so these these types of failures make CMA significantly
less reliable, especially under high filesystem usage.
Rather than waiting for the LRU algorithm to eventually kick out
the buffer, explicitly remove the buffer from the LRU list when trying
to drop it. There is still the possibility that the buffer
could be added back on the list, but that indicates the buffer is
still in use and would probably have other 'in use' indicates to
prevent dropping.
Change-Id: I253f4ee2069e190c1115afc421dadd27a7fa87dc
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This change fixes few compilations issues seen
if we enable the SDHCi MSM driver.
Change-Id: Iaa556e189cbbc6a7f9c3d485e94a43cb21a968a7
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Make sure that the session count does not exceed the maximum
sessions to avoid buffer overflow.
Change-Id: I1a9830a6f859d7d525247d27d0a143997998d997
Acked-by: Bharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
msm-3.18 kernel had our own implementation of 64-bit ADMA support but
upstream kernel have now added its own implementation of 64-bit ADMA
support hence this patch removes some of the remaining variables from
our implementation.
Change-Id: I3ea8e9e498b25b75fb1f5ccc4ffe5f6986cd564a
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This patch adds check to enable the 64-bit DMA only if the chipset
supports the same.
Change-Id: I5dbe6f91d5e530b289f4cf395ae7b673acd85fcf
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
SDHCI_USE_ADMA_64BIT flag was being used by msm-3.18 kernel but now that
upstream sdhci driver has introduced support for 64-bit ADMA, it defined
new flag SDHCI_USE_64_BIT_DMA. Hence replace all the SDHCI_USE_ADMA_64BIT
references with SDHCI_USE_64_BIT_DMA flag.
Change-Id: I6a1e426c156d4ddb92bba00b5ec0cfb156d9550b
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Change "man_bkops_en" to "bkops_en" to hold the status of
both manual and auto bkops.
Change-Id: I60029bae67cebb2c91147ad741b96f4caed9c1d9
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
There seems to be bit map usage overlap between few MMC_QUIRKS_*,
this change fixes it.
Change-Id: I717a2de1261ed2de1a8c730b005b137f0687d969
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This reverts commit 82ccc79fd3c4456b7b344db4576e874d324c6243.
Similar change is already present and this one just added the
duplicate code hence revert it.
Change-Id: Ia96ebe80e4fb7987f9e98e42575ff2ebe153dd23
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
If zero length ADMA descriptor with "Tran" attribute is queued to ADMA
descriptor table then host controller ADMA engine might get stuck.
Currently we are seeing zero length descriptor getting queued in for
SDIO transactions:
SDHCi driver requires that any data buffer address should be 4-byte
aligned for 32-bit ADMA and 8-bytes aligned for 64-bit ADMA. For 64-bit
ADMA, it forces 8-byte alignment for any data buffer addresses. This
aligment requirement is not an issue with eMMC/SD cards as their
transactions are always in multiple of 512-bytes (block size) and hence
sdhci driver would always get the data buffers whose address is properly
aligned.
SDIO can have transactions less than 512-bytes. Hence its quite possible
for driver to receives data buffer addresses which are not properly
aligned. And if they are not aligned, SDHCi driver bounces the non-aligned
bytes to pre-allocated aligned buffer until the rest of the data buffer
becomes aligned. But this logic has a bug where after moving the
non-aligned number of bytes to aligned buffer, it assumes that we will
always be left with non-zero number of bytes in original data buffer and
hence driver ends up queuing one more descriptor which can be of zero
length.
Fix this by checking for the remaining data length before queuing up the
next descriptor.
Change-Id: I7af77b2a2661c00f2b1da47953717b1506bdba83
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
There's a deadlock between runtime-suspend and devfreq monitor.
runtime-suspend context:
[<ffffffc00008771c>] __switch_to+0x7c
[<ffffffc000e0212c>] __schedule+0x53c
[<ffffffc000e02404>] schedule+0x74
[<ffffffc000e02770>] schedule_preempt_disabled+0x14
[<ffffffc000e04c8c>] __mutex_lock_slowpath+0x1dc
[<ffffffc000e04e54>] mutex_lock+0x2c
[<ffffffc000acfc98>] devfreq_monitor_suspend+0x1c
[<ffffffc000ad160c>] devfreq_simple_ondemand_handler+0x4c
[<ffffffc000acf8b4>] devfreq_suspend_device+0x2c
[<ffffffc0008fa5a0>] mmc_suspend_clk_scaling+0xac
[<ffffffc000900398>] _mmc_suspend.isra.11+0x38
[<ffffffc000900798>] mmc_runtime_suspend+0x1cc
[<ffffffc0008fd4c4>] mmc_runtime_suspend+0x18
[<ffffffc000579c98>] __rpm_callback+0x40
[<ffffffc000579d0c>] rpm_callback+0x40
[<ffffffc00057a338>] rpm_suspend+0x25c
In the above stack, runtime-suspend is waiting on the devfreq mutex.
In the below stack, the mutex has been acquired and since the device
power state is DEV_SUSPENDING, devfreq is waiting for the device to
resume, thus causing a deadlock.
[<ffffffc000e02404>] schedule+0x74
[<ffffffc00057abdc>] rpm_resume+0x264
[<ffffffc00057ae80>] __pm_runtime_resume+0x70
[<ffffffc0008f880c>] mmc_get_card+0x1c
[<ffffffc0008f9d08>] mmc_devfreq_set_target+0x154
[<ffffffc000acf9d0>] update_devfreq+0xd0
[<ffffffc000acfb38>] devfreq_monitor+0x2c
Fix this by not waiting for device to resume in devfreq. The suspend would
ensure that this devfreq monitor thread is suspended before suspending the
device.
Change-Id: Ic0e89becbfded35c90c4061f0fe03d61125f66d5
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Hynix emmc cards are causing read data timeout.
Increase timeout value to max of 4sec and add card
quirk for all Hynix emmc cards.
Change-Id: I78637dc787964ec5cafe297587d6a12ecf1d31c6
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
The commit '77dacd' misses to add mmc_host_clk_release() in the
completion path of a CQ request i.e., in mmc_blk_cmdq_complete_rq().
Hence, the reference counter of clocks (host->clk_requests) never
becomes 0, preventing the clocks from gating. However, the clocks
are still turned off through other power management features such as
runtime/system suspend.
Change-Id: I0032861b1e5218bdf3c5bed664869c708ce50148
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Some devices require long BKOPs time in order to provide high performance.
In the current solution, the host disables auto BKOPs or stops manual BKOPs
in runtime suspend, regardless of the device need for BKOPs.
This patch adds a check for device BKOPs status and defers suspend in case
when BKOPs need.
CRs-Fixed: 979630
Change-Id: Ib38d1ce58e4195d4969e9a367b5738c8e598d0ba
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
On runtime suspend flow, AUTO_EN must be turned off (see eMMC 5.1
specification 6.6.28). During runtime resume, it should be restored again.
When partial card initialization flow is used on runtime resume (instead of
full card initialization), this flow should restore AUTO_EN bit if needed.
CRs-Fixed: 979630
Change-Id: I4ac3b7c45fdba36d014f4c88cb704bbf36011d59
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Remove the runtime idle state. It was introduced by
217cf95511d23f703d0e7e597d3132739739654b
Instead of checking BKOPS logic in the runtime idle state, all relevant
logic should be performed in runtime suspend callback.
CRs-Fixed: 979630
Change-Id: Iaf0d8326c0e3fd6507b075339f2cc87ae1bdf6b2
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
The mmc host needs to perform at its peak when clock scaling
is disabled, hence switch the frequency to max.
CRs-fixed: 981387
Change-Id: Ie959b8e565ee2dad53cdd9d913bcb8696519d7ca
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
CMDQ shutdown path calls blk_cleanup_queue, which changes queue_lock
from driver lock to it's original request_queue lock.
Hence during above shutdown process if below sequence is exercised
as well then may see below spinlock bug.
a) Some process say iozoneA has already acquired queue_lock (which
is md->lock).
b) adb reboot has been issued and CMDQ driver has completed calling
blk_cleanup_queue which switches the queue_lock from md->lock to
q->__queue_lock.
c) ProcessA tries to release queue_lock but finds an unbalance that
the lock is already released
Hence remove blk_cleanup_queue and instead make sure there are no
active_reqs in flight by mmccmdqd before this kthread is exited.
Callstack:
<6> BUG: spinlock already unlocked on CPU#6, iozone/4391
<6> lock: 0xffffffc06ab8be80, .magic: dead4ead,
.owner: <none>/-1, .owner_cpu: -1
[ffffffc0420e3b28] __delay at ffffffc00031a328
[ffffffc0420e3b38] __const_udelay at ffffffc00031a304
[ffffffc0420e3b58] msm_trigger_wdog_bite at ffffffc0004476cc
[ffffffc0420e3b68] spin_bug at ffffffc0000e4554
[ffffffc0420e3b98] do_raw_spin_unlock at ffffffc0000e47a0
[ffffffc0420e3bc8] _raw_spin_unlock_irq at ffffffc000db3ee0
[ffffffc0420e3be8] blk_queue_bio at ffffffc0002ff1e4
[ffffffc0420e3bf8] generic_make_request at ffffffc0002fd210
[ffffffc0420e3c58] submit_bio at ffffffc0002fd328
[ffffffc0420e3ca8] submit_bio_wait at ffffffc0002f5768
[ffffffc0420e3d00] compat_sys_call_table at ffffffc00008e000
[ffffffc0420e3d18] submit_bio_wait at ffffffc0002f574c
[ffffffc0420e3d38] __blkdev_issue_flush at ffffffc00030043c
[ffffffc0420e3da8] blkdev_issue_flush at ffffffc000300494
[ffffffc0420e3dd8] ext4_sync_fs at ffffffc0002597a4
CRs-fixed: 953541
Change-Id: I769cc25c14b6d873f64a898d6b73f33cc59d9c5d
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Due to recent DDR52 lower bus speed mode in clock scaling,
there is a mismatch between the clock frequencies used by
the devfreq framework and the MMC driver. Due to this, SDCC
clock is sometimes running at DDR25 and ICE clock is running
at 100MHz causing the power regression. Fix this mismatch by
initializing the frequencies properly during MMC resume based
on the current ios.clock.
CRs-Fixed: 974940
Change-Id: I09fe888d0fbd1fde3f6a6f32806315ddbb5bf6e1
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Some eMMC vendors violate eMMC 5.0 spec and set REL_WR_SEC_C
register to 0x10 to indicate the ability of RPMB throughput
improvement thus lead to failure when TZ module write data to
RPMB partition. This change will check bit[4] of EXT_CSD[166]
and if it is not set then change value of REL_WR_SEC_C to 0x1
directly ignoring value of EXT_CSD[222].
CRs-Fixed: 866059
Change-Id: Ibd12c94ad691eca1fa3ea2049b750a6e98178678
Signed-off-by: xiaonian <xiaonian@codeaurora.org>
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
Some controllers doesn't have any limitation on the memory
it can address. Hence, the bounce limit parameter must be taken
based on the device dma_mask.
Currently it is set to BLK_BOUNCE_HIGH, which may cause bouncing
of memory higher than this limit. Use dma_mask as the limit for
queue bounce parameter to avoid this unncessary memory bouncing
in the block layer.
CRs-Fixed: 964435
Change-Id: I0955438a540ca9adf5bcd3a0dbf9201a5ef456a5
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
For any commands, that are sent during tuning sequence
CRC errors are expected. But if SDHCI_NEEDS_RETUNING flag
is set, then it will recursively do the tuning and gets
stuck in tuning. Fix this by not allowing the re-tuning to
happen while it is already in tuning process.
Change-Id: I9cc39f03a01c34f2f5639d4c20776fd575c25231
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Make sure we don't peek the block layer queue and act on it when
block queue is stopped. The block queue will be stopped when mmc
block is suspended, wait till it is properly resumed before pulling
new requests.
Change-Id: Ifc369687c13dae904271e8f92d3604edbd667d82
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
It seems that when we are configuring sdiowakeup_irq, we are
receiving a spurious interrupt which sets sdio_pending_processing
state to true.
Now, if the sdio card is physically connected but wifi not enabled
in that case suspend functionality will be broken sdhci_msm_suspend_noirq
will return -EBUSY if sdio_pending_processing is set to true.
Thus fix it by setting this flag to false after we have disabled
sdiowakeup_irq.
CRs-Fixed: 957968
Change-Id: I755b0b5602345ad6bf557c6055b9057012de0797
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
There are many valid WMI commands with only header without any
additional payload. Such WMI commands could not be sent using
the debugfs wmi_send facility. Fix the code to allow sending
of such commands.
Change-Id: I581e099db5d2ee81be4345101aa54352b1d9564f
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 69218a48005d0c93b8e9ec483f42ead481a43034
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
Add a check on cmdq_host->ops to avoid NULL pointer
dereference, if sdhci_dumpregs is called before
initializing cmdq_host->ops structure.
Change-Id: Idd1794e162c7a53cc63504e15e6e490481f104a3
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Change mdelay to udelay to fix 100sec waiting timeout
bug in sdhci_reset. sdhci_reset is intended to only
wait for 100msec.
Change-Id: I6b5c9b10daf7cd8a7faf16ac6bdb09c5079a39e9
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
If during early boot register dump is called, then
there could be a NULL pointer dereference since mmc_host
structure might not be populated with cq_host info.
Thus fix this by using sdhci_host to get cq_host structure info
in sdhci_msm_cmdq_dump_debug_ram.
Change-Id: Ieaca7887001daabd4a6a0b05f7b0048dc11bbeee
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
cmdq_halt and cmdq_disable gets called from cmdq_irq in case
of error. Thus add cmdq_disable_nosync and unhalt support
in cmdq_halt_poll which can be called from irq context.
Change-Id: I172e0e29a5584f02dd96c8af5ea1b97dc8c46083
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
No need to call post_req if it's a DCMD request
completion.
Change-Id: Id11165967e316b1e556aaeb6d67bd18844cee6e1
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
In case of error, software may power cycle/reset both
controller and card. Thus even if auto bkops is enabled,
mmc_set_ios can be used to power-off/power-on.
Fix this by removing this condition from mmc_set_ios.
Change-Id: I88a610ecbcc4036ac8ba99bc54706243b40db391
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Currently cmdq discard requests are not using same
softirq completion path as other cmdq request. So there
is no way to detect any error and handle it in case
of error of DCMD requests.
Make cmdq discard requests use blk_complete_requests
which complete via softirq completion path.
Change-Id: I1e03c81bc6fee8266cf1c86bada015e548770d7a
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This does following:
1. Adds support to handle multiple cmdq software requests timeout.
Currently we schedule error handling work for the first timedout
request. We requeue all pending tasks, knock off all tasks from
device queue and reset card and controller as part of this, then
for all other software requests timeout, if it comes while executing
error work, we return BLK_EH_NOT_HANDLED.
This fixes BUG_ON in case of multiple requests timesout together.
2. Current code resets CQE, power cycle the card and requeue all the
requests in case of any error.
3. mmc_blk_cmdq_err work takes care freeing up all resource allocation
like clk and rpm hold, in case of reset_all.
4. Currently we were never clearing error CMDQ_STATE_ERR in case of any
error. This patch takes care of this bug.
Change-Id: I83d483c11fe2d7f2e462086cc3c0932057304c0d
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
[subhashj@codeaurora.org: fixed compilation error]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This patch does following-
This adds an API(mmc_cmdq_hw_reset), for RESET_ALL
of SDHCI, power cycle mmc card and
reintialize it, which enables cmdq as well(if supported).
This acquires claim_host before calling mmc_power_restore.
mmc_power_restore should be called with claim_host acquired,
since this function is required from non-claim-host context in
cmdq error handling.
Change-Id: I31c4449dead1d4ad4e10a4822cce2298ec5fb4b6
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts, dropped some changes
related to mmc_do_hw_reset]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Call mmc_/cmdq_post_req with tag number instead of
mrq. This is needed in error handling as part of multiple
request error handling.
Change-Id: I175432639d28378ec74669e31deb4d1667c49bb8
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This adds WA to handle few CQE error which
can cause HALT to fail or can give CQTERRI info
as NULL.
Like - currently there is a HW bug that in
case of ADMA error CQE will not stop and CQTERRI
register will not be updated with any valid values.
Halt will also most likely fail in case of ADMA error.
Thus possible WA for this is to disable CQE,
do reset_all and requeue all the requests in flight.
Change-Id: I5aaddbb7bec1de7dbc959144dc2f1a5ad16789ff
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Add a check in mmc_cmdq_ready_wait to not pull any
requests in case if CQE is disabled and card is not suspended.
This means that CQE must be in error state and so mmc_cmdq_thread
should stop issuing requests.
Change-Id: I0c5e6556d3d881f1a675db4fff4f995de024ddf8
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
There could be a case where after platform device (sdhci_msm)
suspend, (where external gpio to IRQ is configured for wakeup
in case of sdio) external gpioIRQ is raised before
system suspend is completed.
To solve this problem we use a flag to signal
sdhci_msm_suspend_noirq to abort suspend with -EBUSY signal.
Change-Id: I82617d5a02674af24d330601e41fb3c20278f672
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This patch adds following helper API/info -
1. cmdq_halt_poll to halt the controller using polling
method. This is to be mainly used in case of an error
from cmdq_irq context.
2. Adds num_cq_slots & dcmd_cq_slot info to
mmc_host structure. This can be useful info
for mmc host structure like in case of handling
of multiple error requests
3. Adds CMDQ_STATE_CQ_DISABLE for cmdq host.
In case of an error if halt also fails, CQE error handling
code will disable CQ. So block layer needs to know
- to not pull any requests in such case.
Change-Id: I8e9a8d5094db82336917fcca4361ce84316c34ef
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
cmdq_irq should be handled before clearning error interrupt.
Because in case of an error CQE needs to be halted/disabled
in cmdq_irq, before we clear the error interrupt.
Otherwise, CQE might start processing other requests whose
doorbell is set, even in case of error in previous completed
request.
Change-Id: I8c77ca08dcf440293844120c1b59d2dada84bac5
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This change reverts the following gerrits as they cause the
timeout issues with Hynix cards. Also, the latest code supports
sleep/awake through CMD5 and hence MMC_PM_KEEP_POWER need not be
set for Hynix eMMC cards.
edcf5be "mmc: host: add detect vops chain"
09287cb "mmc: sdhci-msm: configure MMC_PM_KEEP_POWER for SDIO"
7cf603a "mmc: schci: add support for MMC_PM_KEEP_POWER in eMMC"
c085820 "mmc: core: set MMC_PM_KEEP_POWER for certain Hynix mmc cards"
CRs-Fixed: 947299
Change-Id: If863771191ee7c2b717d5817f4a88e4ad936653a
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Configure the controller to send the QSR at 1 clock period.
This would send SQS(CMD13) when no data transfer is in
progress. This decrease in the polling period increases the
performance of the device.
CRs-fixed: 891366
Change-Id: Ic2807c6334a778b5f0c89fb605c6923a44f7624a
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
When mmc request timeout occurs (eg. card is not responding), it is
possible that devfreq update poll interval ended and devfreq update
started. Update context takes devfreq lock and block on
__mmc_claim_host(). Error handling flow (same context that executes mmc
request) tries to suspend clock scaling, the flow is trying to take devfreq
lock while holding (and not releasing) mmc host. Although it is
incrementing devfreq_abort counter, but it is not enough to cause devfreq
update context to release devfreq lock, because the context scheduled out
from execution.
This patch wakes up devfreq update context, it causes to break polling loop
waiting for mmc host exclusive access (because devfreq_abourt countr > 0),
so devfreq lock will be released and clock scaling may be successfully
suspended.
Change-Id: I3d1e7b38d7d281594b49d8452198ed4c1e550b73
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
When in SVS2 on low load scenario and there are lots of requests
queued for CMDQ we need to wait till the queue is empty to scale
back up to Nominal even if there is a sudden increase in load.
This impacts performance where lots of IO get executed in SVS2
frequency since the queue is full. As SVS2 is a low load use case
we can serialize the requests and not queue them in parallel
without impacting other use cases. This makes sure the queue gets
empty faster and we will be able to scale up to Nominal frequency
when needed.
Change-Id: Idbe7e939e01327061dfa5de93c0eaed59b910592
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>