Skip to content

Commit 5be3aeb

Browse files
committed
OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
If runtime PM is not enabled in the kernel config, pm_runtime_get_sync() will always return 1 and pm_runtime_put_sync() will always return -ENOSYS. pm_runtime_get_sync() returning 1 presents no problem to the driver, but -ENOSYS from pm_runtime_put_sync() causes the driver to print a warning. One option would be to ignore errors returned by pm_runtime_put_sync() totally, as they only say that the call was unable to put the hardware into suspend mode. However, I chose to ignore the returned -ENOSYS explicitly, and print a warning for other errors, as I think we should get notified if the HW failed to go to suspend properly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Jassi Brar <jaswinder.singh@linaro.org> Cc: Grazvydas Ignotas <notasas@gmail.com>
1 parent 2b8501d commit 5be3aeb

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/video/omap2/dss/dispc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void dispc_runtime_put(void)
384384
DSSDBG("dispc_runtime_put\n");
385385

386386
r = pm_runtime_put_sync(&dispc.pdev->dev);
387-
WARN_ON(r < 0);
387+
WARN_ON(r < 0 && r != -ENOSYS);
388388
}
389389

390390
static inline bool dispc_mgr_is_lcd(enum omap_channel channel)

‎drivers/video/omap2/dss/dsi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ void dsi_runtime_put(struct platform_device *dsidev)
10751075
DSSDBG("dsi_runtime_put\n");
10761076

10771077
r = pm_runtime_put_sync(&dsi->pdev->dev);
1078-
WARN_ON(r < 0);
1078+
WARN_ON(r < 0 && r != -ENOSYS);
10791079
}
10801080

10811081
/* source clock for DSI PLL. this could also be PCLKFREE */

‎drivers/video/omap2/dss/dss.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static void dss_runtime_put(void)
731731
DSSDBG("dss_runtime_put\n");
732732

733733
r = pm_runtime_put_sync(&dss.pdev->dev);
734-
WARN_ON(r < 0 && r != -EBUSY);
734+
WARN_ON(r < 0 && r != -ENOSYS && r != -EBUSY);
735735
}
736736

737737
/* DEBUGFS */

‎drivers/video/omap2/dss/hdmi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static void hdmi_runtime_put(void)
138138
DSSDBG("hdmi_runtime_put\n");
139139

140140
r = pm_runtime_put_sync(&hdmi.pdev->dev);
141-
WARN_ON(r < 0);
141+
WARN_ON(r < 0 && r != -ENOSYS);
142142
}
143143

144144
static int __init hdmi_init_display(struct omap_dss_device *dssdev)

‎drivers/video/omap2/dss/rfbi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void rfbi_runtime_put(void)
141141
DSSDBG("rfbi_runtime_put\n");
142142

143143
r = pm_runtime_put_sync(&rfbi.pdev->dev);
144-
WARN_ON(r < 0);
144+
WARN_ON(r < 0 && r != -ENOSYS);
145145
}
146146

147147
void rfbi_bus_lock(void)

‎drivers/video/omap2/dss/venc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static void venc_runtime_put(void)
402402
DSSDBG("venc_runtime_put\n");
403403

404404
r = pm_runtime_put_sync(&venc.pdev->dev);
405-
WARN_ON(r < 0);
405+
WARN_ON(r < 0 && r != -ENOSYS);
406406
}
407407

408408
static const struct venc_config *venc_timings_to_config(

0 commit comments

Comments
 (0)