drm/vc4: Unselect PM
Subsystems (3)
PATCH v2 1/1 drm/vc4: Unselect PM
It turns out we can't select PM when allowing the compilation for COMPILE_TEST. Indeed, PM might not be defined at all, or come with extra requirements we can't meet.
This select was initially introduced since we need to call the vc4_hdmi_runtime_resume() at probe time to make sure our device is properly powered at bind time, no matter whether PM is there or not, and we needed to make sure we didn't have a defined but not used warning for vc4_hdmi_runtime_suspend().
This will still happen on platforms that don't define PM though, since SET_RUNTIME_PM_OPS will then be a nop. In order to fix both issues, let's remove the select, and add a __maybe_unused attribute to vc4_hdmi_runtime_resume().
---
I'm not sure how to merge this one, since this commit has been reverted in Linus tree, and un-reverted in linux-next. Should we wait a bit until the reworked version of the original commit has been merged again?
Maxime
Changes from v1:
- remove select
- add __maybe_unused to vc4_hdmi_runtime_resume
- reword the commit log
--- drivers/gpu/drm/vc4/Kconfig | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/vc4/Kconfig +0 -1
@@ -9,7 +9,6 @@ config DRM_VC4 select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER select DRM_PANEL_BRIDGE - select PM select SND_PCM select SND_PCM_ELD select SND_SOC_GENERIC_DMAENGINE_PCM
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -2122,7 +2122,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)return 0 ; } -static int vc4_hdmi_runtime_suspend (struct device *dev) +static int __maybe_unused vc4_hdmi_runtime_suspend (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev);
Signature · 7 lines
2.31.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 10 lines · Maxime Ripard
It turns out we can't select PM when allowing the compilation for
COMPILE_TEST. Indeed, PM might not be defined at all, or come with extra requirements we can't meet.This select was initially introduced since we need to call the
vc4_hdmi_runtime_resume()at probe time to make sure our device is properly powered at bind time, no matter whether PM is there or not, and we needed to make sure we didn't have a defined but not used warning forvc4_hdmi_runtime_suspend().
Quoted 7 lines
This will still happen on platforms that don't define PM though, since
SET_RUNTIME_PM_OPSwill then be a nop. In order to fix both issues, let's remove the select, and add a__maybe_unusedattribute tovc4_hdmi_runtime_resume().Reported-by Randy Dunlap <[email protected]>Signed-off-by Maxime Ripard <[email protected]>
Quoted 45 lines
---
I'm not sure how to merge this one, since this commit has been reverted in Linus tree, and un-reverted in linux-next. Should we wait a bit until the reworked version of the original commit has been merged again?
Maxime
Changes from v1:
- remove select
- add__maybe_unusedtovc4_hdmi_runtime_resume
- reword the commit log--- drivers/gpu/drm/vc4/Kconfig | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/vc4/Kconfig +0
-1@@ -9,7 +9,6 @@ config DRM_VC4 select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER select DRM_PANEL_BRIDGE - select PM select SND_PCM select SND_PCM_ELD select SND_SOC_GENERIC_DMAENGINE_PCMdrivers/gpu/drm/vc4/vc4_hdmi.c +1
-1@@ -2122,7 +2122,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)return 0 ; } -static int vc4_hdmi_runtime_suspend (struct device *dev) +static int __maybe_unused vc4_hdmi_runtime_suspend (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev);Signature · 1 line
2.31.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 10 lines · Maxime Ripard
It turns out we can't select PM when allowing the compilation for
COMPILE_TEST. Indeed, PM might not be defined at all, or come with extra requirements we can't meet.This select was initially introduced since we need to call the
vc4_hdmi_runtime_resume()at probe time to make sure our device is properly powered at bind time, no matter whether PM is there or not, and we needed to make sure we didn't have a defined but not used warning forvc4_hdmi_runtime_suspend().
Quoted 8 lines
This will still happen on platforms that don't define PM though, since
SET_RUNTIME_PM_OPSwill then be a nop. In order to fix both issues, let's remove the select, and add a__maybe_unusedattribute tovc4_hdmi_runtime_resume().Reported-by Randy Dunlap <[email protected]>Signed-off-by Maxime Ripard <[email protected]>
LGTM. Thanks.
Quoted 43 lines
---
I'm not sure how to merge this one, since this commit has been reverted in Linus tree, and un-reverted in linux-next. Should we wait a bit until the reworked version of the original commit has been merged again?
Maxime
Changes from v1:
- remove select
- add__maybe_unusedtovc4_hdmi_runtime_resume
- reword the commit log--- drivers/gpu/drm/vc4/Kconfig | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/vc4/Kconfig +0
-1@@ -9,7 +9,6 @@ config DRM_VC4 select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER select DRM_PANEL_BRIDGE - select PM select SND_PCM select SND_PCM_ELD select SND_SOC_GENERIC_DMAENGINE_PCMdrivers/gpu/drm/vc4/vc4_hdmi.c +1
-1@@ -2122,7 +2122,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)return 0 ; } -static int vc4_hdmi_runtime_suspend (struct device *dev) +static int __maybe_unused vc4_hdmi_runtime_suspend (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev);
Signature · 6 lines
~Randy _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel