From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55A7AC9830E for ; Thu, 24 Sep 2026 18:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AFxM8VI0hJ2T/CsxDm4LsNC9DcVp8EjI2j3u7Y3lSss=; b=EKe8SK7a7AieVaoeUxs3JrVL2/ qVZXPXTbPbhPbQtfG+XfQwN3De98Mw1fu2MQv6G+upLR8MPVRadLlhxaDwIxJEyMXomDM2gDEV51g EFU+rzG3/1g9zjNVoXvKSetbe4UYRmAJaWvGnhTzHCqTwrDuVwa1t7LX9RFVaAJEUPQm9entyXqwy 02dgQCaa0AAn+c6XA2FKtmIv94rlhtH49rekcxG9pCRtq86m1qiWJ8yGezDj6G+p03Fhf0lqCptiD oQccReZBc77ltyvDrCM2OENZ+vvKLTqg38BJmw3s3P+0GaIx2nMJSiALwaW/4YtNuv8bEhnqsZsEA YDLmcViw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9oN6-0000000BvZM-0d0T; Thu, 24 Sep 2026 18:40:40 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9oMp-0000000BvPy-3288; Thu, 24 Sep 2026 18:40:24 +0000 Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256:X25519MLKEM768) (Exim 4.100) (envelope-from ) id 1x9oMh-000000007H4-2r8Z; Thu, 24 Sep 2026 18:40:15 +0000 Date: Thu, 24 Sep 2026 19:40:12 +0100 From: Daniel Golle To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , Allen Chen , Hermes Wu , Pin-yen Lin , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v7 02/14] drm/bridge: it6505: quiesce work items before powering off Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260924_114023_764614_67BFBB9A X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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") Assisted-by: LLM Signed-off-by: Daniel Golle --- v7: new patch --- 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 e980cc6d5760..52d7d818a5ea 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.55.0