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 56A763D75C1 for ; Wed, 15 Apr 2026 15:04: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=1776265470; cv=none; b=j8OunIXmrpVfTzTFjYjsTrqi1+M7gKwQr6rC3ZWzmIgAWqXCZT/iVpa6qOgfJK061vqTQdVEW5NyVQbkgcK6C5/bpjIrSSW1yEn4r3M0ZvLDZz8jygSVD2iFktxWMHE0ftlwIsPricBYWQX3Zt8nz+THOU4avcol70p0BrdCBzg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776265470; c=relaxed/simple; bh=BS/pjVXKyvdNRKu6F2txjdtEk+ZalX8/9O/dBfDHjQU=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GHJpKTYTHXznXtaCn1sTbCa+w3nxhvQeVkrzxraH6IhO+jSf6LYeCGxyOSw54fNUmCqceQB/x1iNFUcZ47TREA44JEF5JDDkNP4VHfEXyrAH3NGoVIRjASzT9Rw5WAf8QC7uAEtsmIHOJFd8dMTJL8uiTwVYDDFfp0fLxpzuIGs= 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) (Exim 4.99) (envelope-from ) id 1wD1ms-000000002Nq-3tYX; Wed, 15 Apr 2026 15:04:19 +0000 Date: Wed, 15 Apr 2026 16:04:16 +0100 From: Daniel Golle To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , Junzhi Zhao , Jie Qiu , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] drm/mediatek: hdmi: report jack plugged state from bridge enable/disable 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: Notify hdmi-codec of the current sink plugged state from mtk_hdmi_bridge_atomic_enable() and mtk_hdmi_bridge_atomic_disable() via mtk_hdmi_update_plugged_status(). This matches the pattern used by dw-hdmi, which invokes handle_plugged_change() from the bridge enable and disable paths so that ASoC jack state stays in sync with the actual sink presence across atomic commit cycles, and not only on CEC HPD transitions. Userspace audio daemons (e.g. pipewire) rely on the jack state to route streams, restore per-sink volume levels, and recover the last used device after a reconnect. Without this, those transitions are missed whenever the sink change is driven by a mode set rather than by a bare HPD event. Signed-off-by: Daniel Golle --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 9050d7785f109..565bb72c9b63a 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -1013,6 +1013,8 @@ static void mtk_hdmi_bridge_atomic_disable(struct drm_bridge *bridge, hdmi->curr_conn = NULL; hdmi->enabled = false; + + mtk_hdmi_update_plugged_status(hdmi); } static void mtk_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge, @@ -1082,6 +1084,8 @@ static void mtk_hdmi_bridge_atomic_enable(struct drm_bridge *bridge, mtk_hdmi_clk_enable_audio(hdmi); hdmi->enabled = true; + + mtk_hdmi_update_plugged_status(hdmi); } static const struct drm_bridge_funcs mtk_hdmi_bridge_funcs = { -- 2.53.0