mirror_ubuntu-kernels/drivers/gpu/drm/msm
Kuogee Hsieh a6e2af64a7 drm/msm/dp: force link training for display resolution change
Display resolution change is implemented through drm modeset. Older
modeset (resolution) has to be disabled first before newer modeset
(resolution) can be enabled. Display disable will turn off both
pixel clock and main link clock so that main link have to be
re-trained during display enable to have new video stream flow
again. At current implementation, display enable function manually
kicks up irq_hpd_handle which will read panel link status and start
link training if link status is not in sync state.

However, there is rare case that a particular panel links status keep
staying in sync for some period of time after main link had been shut
down previously at display disabled. In this case, main link retraining
will not be executed by irq_hdp_handle(). Hence video stream of newer
display resolution will fail to be transmitted to panel due to main
link is not in sync between host and panel.

This patch will bypass irq_hpd_handle() in favor of directly call
dp_ctrl_on_stream() to always perform link training in regardless of
main link status. So that no unexpected exception resolution change
failure cases will happen. Also this implementation are more efficient
than manual kicking off irq_hpd_handle function.

Changes in v2:
-- set force_link_train flag on DP only (is_edp == false)

Changes in v3:
-- revise commit  text
-- add Fixes tag

Changes in v4:
-- revise commit  text

Changes in v5:
-- fix spelling at commit text

Changes in v6:
-- split dp_ctrl_on_stream() for phy test case
-- revise commit text for modeset

Changes in v7:
-- drop 0 assignment at local variable (ret = 0)

Changes in v8:
-- add patch to remove pixel_rate from dp_ctrl

Changes in v9:
-- forward declare dp_ctrl_on_stream_phy_test_report()

Fixes: 62671d2ef2 ("drm/msm/dp: fixes wrong connection state caused by failure of link train")
Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/489895/
Link: https://lore.kernel.org/r/1655411200-7255-1-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2022-06-18 09:14:06 -07:00
..
adreno drm/msm: Don't overwrite hw fence in hw_init 2022-06-18 09:13:33 -07:00
disp drm/msm/dpu: limit wb modes based on max_mixer_width 2022-06-18 09:14:06 -07:00
dp drm/msm/dp: force link training for display resolution change 2022-06-18 09:14:06 -07:00
dsi drm/msm/dsi: don't powerup at modeset time for parade-ps8640 2022-05-18 10:51:42 -07:00
hdmi drm/msm/hdmi: fix error check return value of irq_of_parse_and_map() 2022-05-02 02:39:34 +03:00
Kconfig drm/msm: select DRM_DP_AUX_BUS for the AUX bus support 2022-05-02 02:39:23 +03:00
Makefile drm/msm/dpu: add the writeback connector layer 2022-05-02 02:13:00 +03:00
msm_atomic_trace.h
msm_atomic_tracepoints.c
msm_atomic.c drm/msm: Avoid dirtyfb stalls on video mode displays (v2) 2022-02-25 07:59:58 -08:00
msm_debugfs.c drm/msm: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE 2022-02-18 18:32:52 +03:00
msm_debugfs.h
msm_drv.c drm/msm: Ensure mmap offset is initialized 2022-06-01 17:20:08 -07:00
msm_drv.h drm/msm: Ensure mmap offset is initialized 2022-06-01 17:20:08 -07:00
msm_fb.c drm/msm: Fix fb plane offset calculation 2022-05-18 10:55:47 -07:00
msm_fbdev.c drm/msm: Remove unnecessary struct_mutex 2021-11-28 09:50:33 -08:00
msm_fence.c drm/msm: Drop update_fences() 2022-06-18 09:13:32 -07:00
msm_fence.h drm/msm/gem: Add fenced vma unpin 2022-04-21 15:03:12 -07:00
msm_gem_prime.c drm/msm: Ensure mmap offset is initialized 2022-06-01 17:20:08 -07:00
msm_gem_shrinker.c treewide: Add missing includes masked by cgroup -> bpf dependency 2021-12-03 10:58:13 -08:00
msm_gem_submit.c drm/msm/gem: Separate object and vma unpin 2022-06-15 13:06:54 -07:00
msm_gem_vma.c drm/msm/gem: Drop early returns in close/purge vma 2022-06-15 13:22:45 -07:00
msm_gem.c drm/msm/gem: Separate object and vma unpin 2022-06-15 13:06:54 -07:00
msm_gem.h drm/msm/gem: Separate object and vma unpin 2022-06-15 13:06:54 -07:00
msm_gpu_devfreq.c drm/msm: return the average load over the polling period 2022-04-21 15:05:23 -07:00
msm_gpu_trace.h
msm_gpu_tracepoints.c
msm_gpu.c drm/msm: Don't overwrite hw fence in hw_init 2022-06-18 09:13:33 -07:00
msm_gpu.h drm/msm: return the average load over the polling period 2022-04-21 15:05:23 -07:00
msm_gpummu.c drm/msm: devcoredump iommu fault support 2021-06-23 07:33:55 -07:00
msm_io_utils.c drm/msm: move utility functions from msm_drv.c 2022-02-18 18:32:52 +03:00
msm_iommu.c drm/msm: use for_each_sgtable_sg to iterate over scatterlist 2022-06-14 11:54:38 -07:00
msm_kms.h drm/msm: don't free the IRQ if it was not requested 2022-05-18 15:55:46 -07:00
msm_mdss.c drm/msm/dpu: Move min BW request and full BW disable back to mdss 2022-06-01 16:16:19 -07:00
msm_mmu.h drm/msm: devcoredump iommu fault support 2021-06-23 07:33:55 -07:00
msm_perf.c drm/msm: Remove struct_mutex usage 2021-11-28 09:50:33 -08:00
msm_rd.c drm/msm: Add support for pointer params 2022-04-21 15:01:08 -07:00
msm_ringbuffer.c drm/msm/gem: Separate object and vma unpin 2022-06-15 13:06:54 -07:00
msm_ringbuffer.h drm/msm/gpu: Drop duplicate fence counter 2022-04-21 15:03:11 -07:00
msm_submitqueue.c drm/msm: Add a way to override processes comm/cmdline 2022-04-21 15:01:09 -07:00
NOTES