drm/msm/dp: cleared DP_DOWNSPREAD_CTRL register before start link training
authorKuogee Hsieh <quic_khsieh@quicinc.com>
Mon, 12 Sep 2022 16:23:48 +0000 (09:23 -0700)
committerAbhinav Kumar <quic_abhinavk@quicinc.com>
Fri, 30 Sep 2022 16:57:53 +0000 (16:57 +0000)
commit70445dee1b4cf44c9fecc580dfa08079011866f1
treefe956b8afea7bd3ef82064a038ef8d76364740f8
parent152d394842bb564148e68b92486a87db0bf54859
drm/msm/dp: cleared DP_DOWNSPREAD_CTRL register before start link training

DOWNSPREAD_CTRL (0x107) shall be cleared to 0 upon power-on reset or an
upstream device disconnect. This patch will enforce this rule by always
cleared DOWNSPREAD_CTRL register to 0 before start link training. At rare
case that DP MSA timing parameters may be mis-interpreted by the sink
which causes audio sampling rate be calculated wrongly and cause audio
did not work at sink if DOWNSPREAD_CTRL register is not cleared to 0.

Changes in v2:
1) fix spelling at commit text
2) merge ssc variable into encoding[0]

Changes in v3:
-- correct spelling of DOWNSPREAD_CTRL
-- replace err with len of ssize_t

Changes in v4:
-- split into 2 patches

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support")
Patchwork: https://patchwork.freedesktop.org/patch/502532/
Link: https://lore.kernel.org/r/1662999830-13916-2-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
drivers/gpu/drm/msm/dp/dp_ctrl.c