From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2F0E485505 for ; Thu, 24 Sep 2026 18:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790275232; cv=none; b=ls5LsxNDmr87aRxyzwsKrzC1UjQdfnDf8+OX4IxBD1xxk4I1I8tlidvPg2nMbQ4pJ9HmNZas3dJXcCF0pEaAY274+v3hnp24sfC6Hvs03KFaQHd83/1GbSHsxYyN85eo10sUl1uXJzBV9ib52vjfxAeUJm5pcMe9fmXER3sZZ30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790275232; c=relaxed/simple; bh=fcmerqSThyC0IXNIuWyObAqxPCiMPSfzIA/SM6NzkNg=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K5cBgI4zMbuuFH+bByJ5Ro1ClZ43C+hvR73iTOOX4oSDIZ4NI91FYJid7mvJ6JiZ3csyW+MQNOnFc6uLlnv3nO5zNx0PNB1unQyPrq5nlqobLPUDqEWBWnMIKtVhxwgJGM2N1MfR7tIiOWMHogrTijRsmASnnvI6Zd50VafyvXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 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) (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: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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") 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