OpenCloudOS-Kernel/drivers/gpu/drm/vc4
Maxime Ripard 258e483a4d
drm/vc4: hdmi: Rework power up
The current code tries to handle the case where CONFIG_PM isn't selected
by first calling our runtime_resume implementation and then properly
report the power state to the runtime_pm core.

This allows to have a functionning device even if pm_runtime_get_*
functions are nops.

However, the device power state if CONFIG_PM is enabled is
RPM_SUSPENDED, and thus our vc4_hdmi_write() and vc4_hdmi_read() calls
in the runtime_pm hooks will now report a warning since the device might
not be properly powered.

Even more so, we need CONFIG_PM enabled since the previous RaspberryPi
have a power domain that needs to be powered up for the HDMI controller
to be usable.

The previous patch has created a dependency on CONFIG_PM, now we can
just assume it's there and only call pm_runtime_resume_and_get() to make
sure our device is powered in bind.

Link: https://lore.kernel.org/r/20220629123510.1915022-39-maxime@cerno.tech
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
(cherry picked from commit 53565c28e6)
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2022-08-18 17:15:18 +02:00
..
Kconfig drm/vc4: hdmi: Depends on CONFIG_PM 2022-08-18 17:14:58 +02:00
Makefile drm/vc4: hdmi: Add PHY init and disable function 2020-09-07 18:06:04 +02:00
vc4_bo.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_crtc.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_debugfs.c drm/vc4: Leverage the load tracker on the BCM2711 2021-11-04 10:36:25 +01:00
vc4_dpi.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
vc4_drv.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_drv.h Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_dsi.c drm/vc4: dsi: Add correct stop condition to vc4_dsi_encoder_disable iteration 2022-06-28 14:55:38 +02:00
vc4_fence.c
vc4_gem.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_hdmi.c drm/vc4: hdmi: Rework power up 2022-08-18 17:15:18 +02:00
vc4_hdmi.h drm/vc4: hdmi: Skip writes to disabled packet RAM 2022-06-28 14:56:01 +02:00
vc4_hdmi_phy.c drm/vc4: hdmi: Rename pixel_rate variable 2022-03-24 13:43:59 +01:00
vc4_hdmi_regs.h drm/vc4: hdmi: Add MISC_CONTROL register for vc4 2022-06-28 14:56:08 +02:00
vc4_hvs.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_irq.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_kms.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_packet.h
vc4_perfmon.c drm/vc4: perfmon: Fix variable dereferenced before check 2022-06-27 15:43:14 +02:00
vc4_plane.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: drop unexpected word "the" in the comments 2022-06-22 09:22:55 +02:00
vc4_render_cl.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_trace.h drm/vc4: add tracepoints for CL submissions 2022-03-17 15:12:25 +01:00
vc4_trace_points.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vc4_txp.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
vc4_v3d.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_validate.c drm/vc4: fix error code in vc4_check_tex_size() 2022-06-22 16:41:30 +02:00
vc4_validate_shaders.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_vec.c drm/vc4: Separate VEC compatible variants 2021-05-24 13:52:33 +02:00