Re: [PATCH v12 06/23] drm/bridge: synopsys: dw-dp: Fix AUX transfer timeout race condition
From: Laurent Pinchart
Date: Sun Nov 22 2026 - 04:41:01 EST
On Sun, Nov 22, 2026 at 09:31:43AM -0000, Arun Iyengar wrote:
> On Sat, Nov 14, 2026 at 06:00:39AM +0100, Sebastian Reichel wrote:
> > @@ -1491,6 +1493,12 @@ static ssize_t dw_dp_aux_transfer(struct drm_dp_aux *aux,
> > status = wait_for_completion_timeout(&dp->complete, timeout);
> > if (!status) {
> > dev_err(dp->dev, "timeout waiting for AUX reply\n");
>
> This still drops a reply the sink did send when the IRQ thread runs
> more than 10 ms late. On RK3588 (7.3, KASAN on, v11 of this series:
> same 06/23), with a SCHED_FIFO hog at the IRQ thread's priority on its
> CPU (busy 40 ms of every 200 ms), 1410 DPCD reads gave 183 timeouts.
> Checking for the reply once more before giving up gave 0 timeouts,
> with 127 late replies taken:
>
> --- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
> @@ -1493,2 +1493,6 @@ static ssize_t dw_dp_aux_transfer(struct drm_dp_aux *aux,
> status = wait_for_completion_timeout(&dp->complete, timeout);
> + if (!status) {
> + synchronize_irq(dp->irq);
> + status = try_wait_for_completion(&dp->complete);
> + }
> if (!status) {
>
> Feel free to fold it in.
>
> Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>
>
> Claude (Anthropic) wrote this change; I reviewed and tested it.
There's something missing here. You may have reviewed (whatever that
means) and tested it (probably), it doesn't seem you've understood it.
All of this screams of a big hack.
--
Regards,
Laurent Pinchart