diff options
author | Douglas Anderson <dianders@chromium.org> | 2020-05-08 16:33:29 -0700 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-05-18 20:01:14 +0200 |
commit | baef4d56195b6d6e0f681f6eac03d8c6db011d34 (patch) | |
tree | 06e6cd947897eb5b1ccd29b1f0e90f2b9086d29f /drivers | |
parent | 1dbc979172afcf5380932e8aa76429d6e564a69c (diff) | |
download | linux-baef4d56195b6d6e0f681f6eac03d8c6db011d34.tar.bz2 |
drm/bridge: ti-sn65dsi86: Clear old error bits before AUX transfers
The AUX channel transfer error bits in the status register are latched
and need to be cleared. Clear them before doing our transfer so we
don't see old bits and get confused.
Without this patch having a single failure would mean that all future
transfers would look like they failed.
Fixes: b814ec6d4535 ("drm/bridge: ti-sn65dsi86: Implement AUX channel")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200508163314.1.Idfa69d5d3fc9623083c0ff78572fea87dccb199c@changeid
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/bridge/ti-sn65dsi86.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 3b91fa0ebdf9..03a29c797784 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -869,6 +869,12 @@ static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux, buf[i]); } + /* Clear old status bits before start so we don't get confused */ + regmap_write(pdata->regmap, SN_AUX_CMD_STATUS_REG, + AUX_IRQ_STATUS_NAT_I2C_FAIL | + AUX_IRQ_STATUS_AUX_RPLY_TOUT | + AUX_IRQ_STATUS_AUX_SHORT); + regmap_write(pdata->regmap, SN_AUX_CMD_REG, request_val | AUX_CMD_SEND); ret = regmap_read_poll_timeout(pdata->regmap, SN_AUX_CMD_REG, val, |