mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
FROMGIT: firmware_class: make firmware caching configurable
Because firmware caching generates uevent messages that are sent over a netlink socket, it can prevent suspend on many platforms. It's also not always useful, so make it a configurable option. Signed-off-by: Mark Salyzyn <[email protected]> Cc: Tim Murray <[email protected]> Cc: Venkata Narendra Kumar Gutta <[email protected]> Cc: Luis Chamberlain <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Luis Chamberlain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit c74f8056621738f5be9f5d3d7e0caa927b21aef6 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-testing) Signed-off-by: Mark Salyzyn <[email protected]> Bug: 32180327 Bug: 137566496 Change-Id: I1250512b27edb56caa78d536e5ccf1fb669476ad (cherry picked from commit cd403ef6a75c38bc126b1b7f2362ab6426062df0)
This commit is contained in:
parent
6d88dbc147
commit
82967fe174
2 changed files with 15 additions and 3 deletions
|
|
@ -169,5 +169,17 @@ config FW_LOADER_COMPRESS
|
|||
be compressed with either none or crc32 integrity check type (pass
|
||||
"-C crc32" option to xz command).
|
||||
|
||||
config FW_CACHE
|
||||
bool "Enable firmware caching during suspend"
|
||||
depends on PM_SLEEP
|
||||
default y if PM_SLEEP
|
||||
help
|
||||
Because firmware caching generates uevent messages that are sent
|
||||
over a netlink socket, it can prevent suspend on many platforms.
|
||||
It is also not always useful, so on such platforms we have the
|
||||
option.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
endif # FW_LOADER
|
||||
endmenu
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ struct firmware_cache {
|
|||
struct list_head head;
|
||||
int state;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
#ifdef CONFIG_FW_CACHE
|
||||
/*
|
||||
* Names of firmware images which have been cached successfully
|
||||
* will be added into the below list so that device uncache
|
||||
|
|
@ -556,7 +556,7 @@ static void fw_set_page_data(struct fw_priv *fw_priv, struct firmware *fw)
|
|||
(unsigned int)fw_priv->size);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
#ifdef CONFIG_FW_CACHE
|
||||
static void fw_name_devm_release(struct device *dev, void *res)
|
||||
{
|
||||
struct fw_name_devm *fwn = res;
|
||||
|
|
@ -1046,7 +1046,7 @@ request_firmware_nowait(
|
|||
}
|
||||
EXPORT_SYMBOL(request_firmware_nowait);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
#ifdef CONFIG_FW_CACHE
|
||||
static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue