linux-uconsole/drivers/gpu/drm/msm
Jeffrey Hugo 2e7d73cb22 drm/msm/dsi: Implement reset correctly
[ Upstream commit 78e31c4226 ]

On msm8998, vblank timeouts are observed because the DSI controller is not
reset properly, which ends up stalling the MDP.  This is because the reset
logic is not correct per the hardware documentation.

The documentation states that after asserting reset, software should wait
some time (no indication of how long), or poll the status register until it
returns 0 before deasserting reset.

wmb() is insufficient for this purpose since it just ensures ordering, not
timing between writes.  Since asserting and deasserting reset occurs on the
same register, ordering is already guaranteed by the architecture, making
the wmb extraneous.

Since we would define a timeout for polling the status register to avoid a
possible infinite loop, lets just use a static delay of 20 ms, since 16.666
ms is the time available to process one frame at 60 fps.

Fixes: a689554ba6 ("drm/msm: Initial add DSI connector support")
Cc: Hai Li <hali@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Reviewed-by: Sean Paul <sean@poorly.run>
[seanpaul renamed RESET_DELAY to DSI_RESET_TOGGLE_DELAY_MS]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191011133939.16551-1-jeffrey.l.hugo@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:51:18 +01:00
..
adreno drm/msm/a3xx: remove TPL1 regs from snapshot 2020-01-27 14:50:57 +01:00
disp drm/msm/mdp5: Fix mdp5_cfg_init error return 2020-01-27 14:50:56 +01:00
dsi drm/msm/dsi: Implement reset correctly 2020-01-27 14:51:18 +01:00
edp drm/msm: update generated headers 2018-08-10 18:49:18 -04:00
hdmi drm/msm/hdmi: Enable HPD after HDMI IRQ is set up 2018-12-21 14:15:18 +01:00
Kconfig drm/msm/gpu: Capture the GPU state on a GPU hang 2018-07-30 08:49:56 -04:00
Makefile drm/msm: Add A6XX device support 2018-08-10 18:49:18 -04:00
msm_atomic.c drm/msm: Grab a vblank reference when waiting for commit_done 2018-12-21 14:15:15 +01:00
msm_debugfs.c drm/msm: fix memleak on release 2019-12-13 08:52:44 +01:00
msm_debugfs.h
msm_drv.c drm: msm: Fix add_gpu_components 2019-08-25 10:47:57 +02:00
msm_drv.h drm/msm: dpu: Allow planes to extend past active display 2018-11-21 09:19:09 +01:00
msm_fb.c drm/msm: Add modifier to mdp_get_format arguments 2018-06-03 16:48:59 -04:00
msm_fbdev.c drm/msm: don't deref error pointer in the msm_fbdev_create error path 2018-06-03 16:49:00 -04:00
msm_fence.c
msm_fence.h
msm_gem.c gpu: drm: msm: Change return type to vm_fault_t 2018-08-03 09:53:36 -04:00
msm_gem.h
msm_gem_prime.c
msm_gem_shrinker.c
msm_gem_submit.c drm/msm: Move fence put to where failure occurs 2018-12-13 09:16:21 +01:00
msm_gem_vma.c
msm_gpu.c drm/msm: include linux/sched/task.h 2020-01-09 10:19:03 +01:00
msm_gpu.h drm/msm/gpu: fix building without debugfs 2019-02-06 17:30:06 +01:00
msm_iommu.c drm/msm: Fix error return checking 2018-12-21 14:15:19 +01:00
msm_kms.h drm/msm: Add SDM845 DPU support 2018-07-26 10:45:04 -04:00
msm_mmu.h
msm_perf.c
msm_rd.c drm/msm: Unblock writer if reader closes file 2019-03-05 17:58:45 +01:00
msm_ringbuffer.c
msm_ringbuffer.h
msm_submitqueue.c
NOTES