linux/drivers/gpu/drm/tidss
Tomi Valkeinen efeefba966 drm/tidss: Fix dss reset
[ Upstream commit bc288a9278 ]

The probe function calls dispc_softreset() before runtime PM is enabled
and without enabling any of the DSS clocks. This happens to work by
luck, and we need to make sure the DSS HW is active and the fclk is
enabled.

To fix the above, add a new function, dispc_init_hw(), which does:

- pm_runtime_set_active()
- clk_prepare_enable(fclk)
- dispc_softreset().

This ensures that the reset can be successfully accomplished.

Note that we use pm_runtime_set_active(), not the normal
pm_runtime_get(). The reason for this is that at this point we haven't
enabled the runtime PM yet and also we don't want the normal resume
callback to be called: the dispc resume callback does some initial HW
setup, and it expects that the HW was off (no video ports are
streaming). If the bootloader has enabled the DSS and has set up a
boot time splash-screen, the DSS would be enabled and streaming which
might lead to issues with the normal resume callback.

Fixes: c9b2d923be ("drm/tidss: Soft Reset DISPC on startup")
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-8-ac91b5ea35c0@ideasonboard.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-01-25 15:45:00 -08:00
..
Kconfig drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
Makefile drm/tidss: New driver for TI Keystone platform Display SubSystem 2020-01-27 19:27:30 +02:00
tidss_crtc.c drm/tidss: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
tidss_crtc.h drm/tidss: Replace HTTP links with HTTPS ones 2020-07-16 22:13:52 +02:00
tidss_dispc.c drm/tidss: Fix dss reset 2024-01-25 15:45:00 -08:00
tidss_dispc.h drm/tidss: Add support for AM625 DSS 2023-06-19 11:30:12 +03:00
tidss_dispc_regs.h drm/tidss: Replace HTTP links with HTTPS ones 2020-07-16 22:13:52 +02:00
tidss_drv.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
tidss_drv.h drm/tidss: Convert to Linux IRQ interfaces 2021-08-10 20:13:49 +02:00
tidss_encoder.c drm/tidss: Update encoder/bridge chain connect model 2023-07-10 14:21:29 +02:00
tidss_encoder.h drm/tidss: Update encoder/bridge chain connect model 2023-07-10 14:21:29 +02:00
tidss_irq.c drm/tidss: Convert to Linux IRQ interfaces 2021-08-10 20:13:49 +02:00
tidss_irq.h drm/tidss: Convert to Linux IRQ interfaces 2021-08-10 20:13:49 +02:00
tidss_kms.c Revert "drm/tidss: Annotate dma-fence critical section in commit path" 2024-01-25 15:44:57 -08:00
tidss_kms.h drm/tidss: Replace HTTP links with HTTPS ones 2020-07-16 22:13:52 +02:00
tidss_plane.c drm: Fix references to drm_plane_helper_check_state() 2023-07-29 21:25:18 +02:00
tidss_plane.h drm/tidss: Replace HTTP links with HTTPS ones 2020-07-16 22:13:52 +02:00
tidss_scale_coefs.c drm/tidss: Replace HTTP links with HTTPS ones 2020-07-16 22:13:52 +02:00
tidss_scale_coefs.h drm/tidss: Replace HTTP links with HTTPS ones 2020-07-16 22:13:52 +02:00