Skip to contentSkip to conversation

media: coda: Add system resume interface

PATCH In review Xiaolei Wang 2 participants 3 messages Dec 21, 2024 – Feb 13, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: coda: Add system resume interface

When the system goes into sleep mode, the dependent power will be turned off, so when the system resumes, coda_hw_init() needs to be called, otherwise it will get 'CODA PIC_RUN timeout' after resuming.

---
 drivers/media/platform/chips-media/coda/coda-common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/chips-media/coda/coda-common.c +1 -0
index 289a076c3bcc..e6e3f5ec24f6 100644
@@ -3340,6 +3340,7 @@ static int coda_runtime_resume(struct device *dev)
 
 static const struct dev_pm_ops coda_pm_ops = {
 	SET_RUNTIME_PM_OPS(NULL, coda_runtime_resume, NULL)
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver coda_driver = {
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Xiaolei Wang

When the system goes into sleep mode, the dependent power will be turned off, so when the system resumes, coda_hw_init() needs to be called, otherwise it will get 'CODA PIC_RUN timeout' after resuming.

---
 drivers/media/platform/chips-media/coda/coda-common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/chips-media/coda/coda-common.c +0 -0
index 289a076c3bcc..e6e3f5ec24f6 100644

drivers/media/platform/chips-media/coda/coda-common.c static int coda_runtime_resume(struct device *dev) · line 3346

Quoted 7 lines
drivers/media/platform/chips-media/coda/coda-common.c +1 -0
@@ -3340,6 +3340,7 @@ static int coda_runtime_resume(struct device *dev)
 
 static const struct dev_pm_ops coda_pm_ops = {
 	SET_RUNTIME_PM_OPS(NULL, coda_runtime_resume, NULL)
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver coda_driver = {

regards
Philipp

#2 lore raw
Quoted 20 lines · Philipp Zabel

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 16 lines · Xiaolei Wang

When the system goes into sleep mode, the dependent power will be turned off, so when the system resumes, coda_hw_init() needs to be called, otherwise it will get 'CODA PIC_RUN timeout' after resuming.

---
  drivers/media/platform/chips-media/coda/coda-common.c | 1 +
  1 file changed, 1 insertion(+)
drivers/media/platform/chips-media/coda/coda-common.c +0 -0
index 289a076c3bcc..e6e3f5ec24f6 100644
@@ -3340,6 +3340,7 @@ static int coda_runtime_resume(struct device *dev)
 
Quoted 7 lines

drivers/media/platform/chips-media/coda/coda-common.c static int coda_runtime_resume(struct device *dev) · line 3346

Quoted 6 lines
drivers/media/platform/chips-media/coda/coda-common.c +1 -0
  static const struct dev_pm_ops coda_pm_ops = {
       SET_RUNTIME_PM_OPS(NULL, coda_runtime_resume, NULL)
+     SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
  };
 
  static struct platform_driver coda_driver = {

Humble Ping...

thanks

xiaolei

Quoted 3 lines

regards
Philipp