From 0c196acfcbb766a07151cfae76c2318eca661c40 Mon Sep 17 00:00:00 2001 From: Sujit Reddy Thumma Date: Wed, 19 Jun 2013 20:15:37 +0530 Subject: mmc: sdhci: Defer release of CPU DMA PM QoS vote in high load cases PM QoS vote of default value mean that the CPU is allowed to move into deepest low power mode whenever possible. Currently, if there are back-to-back MMC requests, with a short delay, the PM QoS vote to default value is done immediately which cause the immediate request to have high latency as the CPU might have idle'd and moved to deepest low power mode. To avoid this defer the PM QoS vote till a defined timeout (pm_qos_timeout_us), so that back-to-back requests may not suffer from additional latencies. In addition, if the load on MMC is low, the additional latency may be sustainable. Hence, aggressively release the vote in order to achieve additional power savings. CRs-Fixed: 501712 Change-Id: I82166b0ce9416eb0d519f7da26e5a96956093cb2 Signed-off-by: Sujit Reddy Thumma [subhashj@codeaurora.org: fixed minor merge conflict and fixed compilation errors] Signed-off-by: Subhash Jadavani --- include/linux/mmc/host.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 2b6159a85a15..1939cd47b3aa 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -79,6 +79,12 @@ struct mmc_ios { #define MMC_SET_DRIVER_TYPE_D 3 }; +/* states to represent load on the host */ +enum mmc_load { + MMC_LOAD_HIGH, + MMC_LOAD_LOW, +}; + struct mmc_host_ops { /* * 'enable' is called when the host is claimed and 'disable' is called @@ -150,6 +156,7 @@ struct mmc_host_ops { */ int (*multi_io_quirk)(struct mmc_card *card, unsigned int direction, int blk_size); + int (*notify_load)(struct mmc_host *, enum mmc_load); }; struct mmc_card; -- cgit v1.2.3