mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09: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 <salyzyn@android.com>
Cc: Tim Murray <timmurray@google.com>
Cc: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20191113225429.118495-1-salyzyn@android.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c74f805662 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-testing)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 32180327
Bug: 137566496
Change-Id: I1250512b27edb56caa78d536e5ccf1fb669476ad
This commit is contained in:
committed by
Alistair Delva
parent
332eaac720
commit
c7378fb082
@@ -150,5 +150,17 @@ config FW_LOADER_USER_HELPER_FALLBACK
|
||||
|
||||
If you are unsure about this, say N here.
|
||||
|
||||
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
|
||||
|
||||
@@ -50,7 +50,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
|
||||
@@ -372,7 +372,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;
|
||||
@@ -856,7 +856,7 @@ request_firmware_nowait(
|
||||
}
|
||||
EXPORT_SYMBOL(request_firmware_nowait);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
#ifdef CONFIG_FW_CACHE
|
||||
static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user