[PATCH v7 04/18] drm/bridge: synopsys: dw-dp: Add missing reinit_completion
Sebastian Reichel <[email protected]>
| Newsgroups | org.infradead.lists.linux-rockchip,org.freedesktop.lists.dri-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260728-synopsys-dw-dp-improvements-v7-4-b7640fa8cf48@collabora.com> |
The DP AUX transfer method uses a completion triggered by an interrupt, which can timeout. If the function runs into the timeout and the interrupt fires afterwards, the following DP aux transfer completion would trigger immediately without waiting for the interrupt. This in turn means the next one would also be broken and so on. Fix this potential issue by re-initializing the completion before sending the AUX command. Reported-by: Sashiko <[email protected]> Fixes: 86eecc3a9c2e ("drm/bridge: synopsys: Add DW DPTX Controller support library") Signed-off-by: Sebastian Reichel <[email protected]> --- drivers/gpu/drm/bridge/synopsys/dw-dp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-dp.c b/drivers/gpu/drm/bridge/synopsys/dw-dp.c index ca7ff544d243..951f1e280e47 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c @@ -1465,6 +1465,8 @@ static ssize_t dw_dp_aux_transfer(struct drm_dp_aux *aux, if (WARN_ON(msg->size > 16)) return -E2BIG; + reinit_completion(&dp->complete); + switch (msg->request & ~DP_AUX_I2C_MOT) { case DP_AUX_NATIVE_WRITE: case DP_AUX_I2C_WRITE: -- 2.53.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip