drm/vc4: Add runtime PM support to the HDMI encoder driver 09/148509/2
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 11 Apr 2017 16:39:25 +0000 (18:39 +0200)
committerInki Dae <inki.dae@samsung.com>
Fri, 8 Sep 2017 05:05:07 +0000 (14:05 +0900)
commitabb90ef09941f48983a68cd6009eee0841e5d318
tree4e73c86bd54e88fccb3470f1feaebfcc2be9b93c
parentd6089261da7f62abdeb40ad5321fa3942bfa2716
drm/vc4: Add runtime PM support to the HDMI encoder driver

The HDMI driver is currently enabling all clocks at probe time and
keeps the power-domain connected to the HDMI encoder enabled.

Move all activation code to vc4_hdmi_encoder_enable() and make sure
the clks and power domain are released when the HDMI encoder is not used
by adding deactivation steps in vc4_hdmi_encoder_disable().

Note that the sequencing imposed by the IP requires that we move
vc4_hdmi_encoder_mode_set() code into vc4_hdmi_encoder_enable().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 4f6e3d66ac522dec9733d433ad00e8e77747c372)

[inki.dae: apply from rpi3-4.9.y]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I3ffc27cde4218eae97bc3358fe68185b34951810
drivers/gpu/drm/vc4/vc4_hdmi.c