On 06/12/2021 13:14, Laurent Pinchart wrote:
Hi Arnd,
Thank you for the patch.
On Sun, Dec 05, 2021 at 02:15:56PM +0100, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@xxxxxxxx>
Using the SET_RUNTIME_PM_OPS() macro causes a warning about the
referenced functions when they are marked static but not __maybe_unused:
drivers/gpu/drm/omapdrm/dss/dss.c:1572:12: error: unused function 'dss_runtime_suspend' [-Werror,-Wunused-function]
drivers/gpu/drm/omapdrm/dss/dss.c:1584:12: error: unused function 'dss_runtime_resume' [-Werror,-Wunused-function]
drivers/gpu/drm/omapdrm/dss/dispc.c:4845:12: error: unused function 'dispc_runtime_suspend' [-Werror,-Wunused-function]
drivers/gpu/drm/omapdrm/dss/dispc.c:4860:12: error: unused function 'dispc_runtime_resume' [-Werror,-Wunused-function]
Fixes: b92f7ea556f8 ("drm/omap: dss: Make use of the helper macro SET_RUNTIME_PM_OPS()")
I wonder how well drivers are tested with !CONFIG_PM. We may be going
through hoops and loops to support this when it actually won't work in
most drivers. That's a separate issue though :-)
It won't work, but can be fixed. I did that for tidss, some years back.
The problem is that the driver depends on runtime_suspend/resume to be
called, and the fix is to call them manually when !CONFIG_PM.
Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Tomi, could you apply this ?
Yes, I'll push to drm-misc-next. Thanks!
Tomi