linux_dsm_epyc7002/drivers/gpu/drm/exynos
Krzysztof Kozlowski 030794a368 drm/exynos: Fix DSI resuming fail because power domain being off
During system resume from suspend to RAM the Exynos DRM driver forced
CRTC mode thus turning display on (DPMS_ON). This lead to runtime resuming
of DSI which failed because whole LCD power domain was off and it was
not allowed to turn on because of system resume in progress.

Forcing mode should not be needed and removing it solves this particular
problem.

This necessary fix for following scenario reproduced on Exynos DRM:
1. Power domain is off before suspending the system.
2. System is suspended to RAM.
3. Resuming starts. The Exynos DRM driver resume callback is called.
4. The Exynos DRM driver calls drm_helper_resume_force_mode() which turns
   on the screen by calling exynos_dsi_dpms with DRM_MODE_DPMS_ON.
5. The Exynos DSI driver calls pm_runtime_get. The driver runtime
   resumes and this should turn LCD power domain on.
6. Unfortunately the domain cannot be turned on because system resume is
   in progress and genpd->prepared_count is positive.

Steps to reproduce:
1. Add runtime PM to Exynos DSI driver.
2. Build Exynos DRM/FB without FRAMEBUFFER_CONSOLE.
3. Enable the connector and screen (e.g. with modeset-vsync).
4. echo 3 > /sys/devices/platform/exynos-drm/graphics/fb0/blank
5. echo mem > /sys/power/state
6. Resume.
[   77.712469] PM: early resume of devices complete after 3.854 msecs
[   77.712739] exynos-dsi 11c80000.dsi: pm_genpd_resume()
[   77.712758] exynos4-fimc 11800000.fimc: pm_genpd_resume()
[   77.712774] exynos4-fimc 11810000.fimc: pm_genpd_resume()
[   77.712787] exynos-drm-fimc 11820000.fimc: pm_genpd_resume()
[   77.712802] exynos-drm-fimc 11830000.fimc: pm_genpd_resume()
[   77.712815] s5p-mipi-csis 11880000.csis: pm_genpd_resume()
[   77.712829] s5p-mipi-csis 11890000.csis: pm_genpd_resume()
[   77.712843] exynos-fimc-lite 12390000.fimc-lite: pm_genpd_resume()
[   77.712856] exynos-fimc-lite 123a0000.fimc-lite: pm_genpd_resume()
[   77.713788] exynos4-fb 11c00000.fimd: pm_genpd_resume()
[   77.713912] wake disabled for irq 184
[   77.713923] wake disabled for irq 185
[   77.714082] wake disabled for irq 173
[   77.715676] wake disabled for irq 176
[   77.718540] exynos4-fb 11c00000.fimd: pm_genpd_runtime_resume()
[   77.718567] exynos4-fb 11c00000.fimd: state restore latency exceeded, new value 1708 ns
[   77.718636] exynos-dsi 11c80000.dsi: pm_genpd_runtime_resume()
[   77.892366] exynos-dsi 11c80000.dsi: PLL failed to stabilize
[   77.892377] exynos-dsi 11c80000.dsi: failed to configure DSI PLL
[   78.192168] exynos-dsi 11c80000.dsi: timeout waiting for reset
[   78.211578] exynos-dsi 11c80000.dsi: waiting for bus lanes timed out
[   78.307173] exynos-dsi 11c80000.dsi: xfer timed out: d1 00 (null)
[   78.307190] panel_s6e8aa0 11c80000.dsi.0: error -110 reading dcs seq(0xd1)
[   78.307199] panel_s6e8aa0 11c80000.dsi.0: read id failed

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-24 18:02:52 +09:00
..
exynos_dp_core.c drm/exynos: dp: Remove support for unused dptx-phy 2014-11-24 18:02:51 +09:00
exynos_dp_core.h drm/exynos: dp: Remove support for unused dptx-phy 2014-11-24 18:02:51 +09:00
exynos_dp_reg.c drm/exynos: Fix checkpatch warning in exynos_dp_reg.c 2014-06-02 02:07:12 +09:00
exynos_dp_reg.h drm/exynos: Move dp driver from video/ to drm/ 2014-03-24 00:36:34 +09:00
exynos_drm_buf.c drm/exynos: fix return value check in lowlevel_buffer_allocate() 2013-09-16 21:57:08 +09:00
exynos_drm_buf.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_connector.c drm/exynos: use helpers 2014-07-18 14:24:34 +10:00
exynos_drm_connector.h drm/exynos: Remove dpms link between encoder/connector 2014-03-24 00:36:30 +09:00
exynos_drm_core.c drm/exynos: add component framework support 2014-06-02 02:07:04 +09:00
exynos_drm_crtc.c drm/exynos: enable vblank after DPMS on 2014-11-03 01:51:28 +09:00
exynos_drm_crtc.h drm/exynos: Replace repeated declarations by #include "exynos_drm_drv.h" 2014-11-24 18:02:51 +09:00
exynos_drm_dmabuf.c dma-buf: use reservation objects 2014-07-08 13:03:20 -07:00
exynos_drm_dmabuf.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_dpi.c drm/exynos: remove explicit encoder/connector de-initialization 2014-11-03 01:51:27 +09:00
exynos_drm_drv.c drm/exynos: Fix DSI resuming fail because power domain being off 2014-11-24 18:02:52 +09:00
exynos_drm_drv.h drm/exynos: remove leftover hdmi function declarations 2014-11-24 18:02:51 +09:00
exynos_drm_dsi.c drm/exynos: dsi: move DSIM_STATE_ENABLED set position 2014-11-24 18:02:52 +09:00
exynos_drm_encoder.c drm/exynos: Restrict plane loops to only operate on overlay planes (v2) 2014-04-01 20:11:18 -04:00
exynos_drm_encoder.h drm/exynos: remove extra declaration of struct exynos_drm_manager 2014-11-24 18:02:50 +09:00
exynos_drm_fb.c drm/exynos/fb: free exynos framebuffer on error 2014-09-20 00:56:14 +09:00
exynos_drm_fb.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_fbdev.c drm/exynos/fbdev: fix fbdev gem object cleanup 2014-09-20 00:56:14 +09:00
exynos_drm_fbdev.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_fimc.c drm/exynos/fimc: fix source buffer registers 2014-09-20 00:56:13 +09:00
exynos_drm_fimc.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_fimd.c drm/exynos: fimd: move handle vblank position in TE handler 2014-11-24 18:02:52 +09:00
exynos_drm_g2d.c drm/exynos: g2d: fix null pointer dereference 2014-11-24 18:02:48 +09:00
exynos_drm_g2d.h drm/exynos: add G2D driver 2012-05-17 20:14:48 +09:00
exynos_drm_gem.c drm/exynos: use drm generic mmap interface 2014-09-20 01:00:13 +09:00
exynos_drm_gem.h drm: Extract <drm/drm_gem.h> 2014-09-24 11:43:41 +10:00
exynos_drm_gsc.c drm/exynos/ipp: replace work_struct casting with better constructs 2014-09-20 00:56:12 +09:00
exynos_drm_gsc.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_iommu.c arm: dma-mapping: remove order parameter from arm_iommu_create_mapping() 2014-02-28 11:55:18 +01:00
exynos_drm_iommu.h drm/exynos: remove uneeded declaration of struct dma_iommu_mapping 2014-11-24 18:02:50 +09:00
exynos_drm_ipp.c drm/exynos/ipp: traverse ipp drivers list safely 2014-09-20 00:56:13 +09:00
exynos_drm_ipp.h drm/exynos/ipp: remove unused field in command node 2014-09-20 00:56:10 +09:00
exynos_drm_plane.c drm/exynos: switch to universal plane API 2014-09-20 01:17:53 +09:00
exynos_drm_plane.h drm/exynos: switch to universal plane API 2014-09-20 01:17:53 +09:00
exynos_drm_rotator.c drm/exynos/ipp: replace work_struct casting with better constructs 2014-09-20 00:56:12 +09:00
exynos_drm_rotator.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_drm_vidi.c drm/exynos: vidi: fix build warning 2014-11-03 01:51:27 +09:00
exynos_drm_vidi.h drm/exynos: change file license to GPL 2013-01-04 15:54:32 +09:00
exynos_hdmi.c drm/exynos: remove explicit encoder/connector de-initialization 2014-11-03 01:51:27 +09:00
exynos_mixer.c drm/exynos: switch to universal plane API 2014-09-20 01:17:53 +09:00
exynos_mixer.h drm/exynos: Remove exynos_drm_hdmi shim 2014-03-24 00:36:32 +09:00
Kconfig drm/panel: Changes for v3.17-rc1 2014-08-07 19:51:52 +10:00
Makefile drm/exynos: add DSIM driver 2014-04-04 21:24:48 +09:00
regs-fimc.h drm/exynos: add device tree support for fimc ipp driver 2013-04-29 14:35:32 +09:00
regs-gsc.h drm/exynos: add gsc ipp driver 2012-12-15 02:40:00 +09:00
regs-hdmi.h drm/exynos: add hdmiphy power on/off sequence 2014-06-02 02:07:15 +09:00
regs-mixer.h drm/exynos: stop mixer before gating clocks during poweroff 2014-06-24 11:27:29 +09:00
regs-rotator.h drm/exynos: add rotator ipp driver 2012-12-15 02:39:41 +09:00
regs-vp.h drm/exynos: added hdmi display support 2011-12-29 11:21:42 +09:00