diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2024-02-13 13:47:29 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-13 14:22:57 +0000 |
commit | b30289e7fa927f921bfb4d0d04727461706ae822 (patch) | |
tree | 5819e481173ef6792e0c62a0804a8e5be2a97df7 /sound/soc/sof/sof-priv.h | |
parent | d0611f617d823a87f04186ad165e2990208c040b (diff) |
ASoC: SOF: Fix runtime pm usage counter balance after fw exception
If the retain context is enabled we will unconditionally increment the
device's pm use count on each exception and when the drivers are unloaded
we do not correct this (as we don't know how many times we 'prevented
d3 entry').
Introduce a flag to make sure that we do not increment the use count more
than once and on module unload decrement the use count if needed to
balance it.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240213114729.7055-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r-- | sound/soc/sof/sof-priv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 6d7897bf9607..5755c997a9de 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -595,6 +595,7 @@ struct snd_sof_dev { struct list_head dfsentry_list; bool dbg_dump_printed; bool ipc_dump_printed; + bool d3_prevented; /* runtime pm use count incremented to prevent context lost */ /* firmware loader */ struct sof_ipc_fw_ready fw_ready; |