drm/msm/dp: Restore aux retry tuning logic
PATCH 1/1 drm/msm/dp: Restore aux retry tuning logic
In commit 9fc418430c65 ("drm/msm/dp: unplug interrupt missed after irq_hpd handler") we dropped a reset of the aux phy during aux transfers because resetting the phy during active communication caused us to miss an hpd irq in some cases. Unfortunately, we also dropped the part of the code that changes the aux phy tuning when an aux transfer fails due to a timeout. That part of the code was calling into the phy driver to reconfigure the aux TX swing controls, working around poor channel quality. Let's restore this phy setting code so that aux channel communication is more reliable.
---
Noticed by code inspection and based on bug reports where the aux channel stops working once the commit this is fixing is applied.
drivers/gpu/drm/msm/dp/dp_aux.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/msm/dp/dp_aux.c +7 -0
@@ -32,6 +32,8 @@ struct dp_aux_private {struct drm_dp_aux dp_aux; }; +#define MAX_AUX_RETRIES 5 +static const char *dp_aux_get_error (u32 aux_error) {switch (aux_error) {
@@ -377,6 +379,11 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *dp_aux, ret =dp_aux_cmd_fifo_tx (aux, msg);if (ret <0 ) { +if (aux->native) { + aux->retry_cnt++; +if (!(aux->retry_cnt %MAX_AUX_RETRIES )) +dp_catalog_aux_update_cfg (aux->catalog); + }usleep_range (400 ,500 );/* at least 400us to next try */ goto unlock_exit; }
base-commit: 8b83369ddcb3fb9cab5c1088987ce477565bb630
Signature · 6 lines
https://chromeos.dev _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
This patch was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
Quoted 11 lines · On Fri, 26 Feb 2021 13:08:21 -0800 you wrote:
In commit
9fc418430c65("drm/msm/dp: unplug interrupt missed afterirq_hpdhandler") we dropped a reset of the aux phy during aux transfers because resetting the phy during active communication caused us to miss an hpd irq in some cases. Unfortunately, we also dropped the part of the code that changes the aux phy tuning when an aux transfer fails due to a timeout. That part of the code was calling into the phy driver to reconfigure the aux TX swing controls, working around poor channel quality. Let's restore this phy setting code so that aux channel communication is more reliable.[...]
Here is the summary with links:
- drm/msm/dp: Restore aux retry tuning logic
https://git.kernel.org/qcom/c/413b7a320e23
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html