From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.142.180.65 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795132762; b=CWkibBJzsqsRyjBEOzdVKR7D5OF68qDQLVbA00LSwd2lqrh3gdkm3ojJBpn8O97JFbC4 27zbXcbbkqLTwsDzMdHWEm674szdaUhvdHXECT4S3pH7ep6feafk+/9vNsSuwoJ+ocdla Fu1HYS9HPf5V/aJX5DMqAk+vgQLAse2TIjY+9rY5U9lsko5UGr0ZK5J4VQp0FYYCdUy+I ZqqKjTAJ2rU/RGjQoY8vO89CDBHhxPwVpI/Xo4gnuHfNZmLPAZmip9nwaiwcPUjRpQYX+ 6GIlyL9CVD9BaVqvi9EN2MNdt4SIHJPBIrdq0/cNsyKw4oDgVl8xyGP33CJMBjllwkg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795132762; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=zpfMYhL+eyZ/qZv5gwgw5vxgPEFhIrg1RxUKG4RrcLs=; b=UrKMro1vaRe0dRovgmFRyNTMynlHmBwyi/5soN4x5ngsGSdwFylbS+LFpt/OyMcL3/mZ 69P0MWdiFGC8xwf8x/LqHLpxgOEf3SGGMX149Z/5IBpdLzlyvJvZAmQ8voXFQF6bsSfNt smLjVU3GdN4ClC5G4WkV3GD+PVU+LXjsptNg3Y6wwe3nzKNVFwFrnCilHyNS3drvq+YaE Jj/aqpRuf7I5OF4CtHZIX+lCOgC/QZta1kxfgESGd2JzIfoHvT0DjnAz3N9Xvzn9Vlvpt I7H71tl55Kwufc2dgv2v0s5/2gZpV1laFWTFZUMiEH7L19214l7VMnPn3H4GgzGmqJA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.remote-ip=185.142.180.65 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92D64606A33B for ; Thu, 19 Nov 2026 23:59:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 92D64606A33B Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256:X25519MLKEM768) (Exim 4.100.1) (envelope-from ) id 1xUC2A-0000000021l-2ONf; Thu, 19 Nov 2026 23:59:18 +0000 Date: Thu, 19 Nov 2026 23:59:10 +0000 From: Daniel Golle To: Neil Armstrong , Dmitry Baryshkov , Robert Foss , Laurent Pinchart , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , Hermes Wu , Pin-yen Lin Cc: Chen-Yu Tsai , Jiaxin Yu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v9 02/14] drm/bridge: it6505: quiesce work items before powering off Message-ID: <4578349476dde314604b9b65670d7545a01ab3c9.1795132452.git.daniel@makrotopia.org> References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: it6505_poweroff() asserts the reset line and disables the regulators while link_works, hdcp_wait_ksv_list and hdcp_work may still be running. The work items and the register accessors only check it6505->powered, and the flag is cleared last, so a work item keeps driving link training or HDCP authentication into a chip that is already off until the flag catches up. Cancel the three work items before touching the power rails. None of them takes a runtime PM reference or extcon_lock, so the synchronous cancel is safe from every context that powers the chip off. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Daniel Golle Reviewed-by: Luca Ceresoli --- drivers/gpu/drm/bridge/ite-it6505.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index e980cc6d5760c..52d7d818a5ea3 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -2804,6 +2804,9 @@ static int it6505_poweroff(struct it6505 *it6505) } disable_irq_nosync(it6505->irq); + cancel_work_sync(&it6505->link_works); + cancel_work_sync(&it6505->hdcp_wait_ksv_list); + cancel_delayed_work_sync(&it6505->hdcp_work); if (pdata->gpiod_reset) gpiod_set_value_cansleep(pdata->gpiod_reset, 1); -- 2.56.1