From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.251.105.195 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796216895; b=P1GvWvUPL9u1xK5ZV0+330DLrUkcqVCzMg+zkm1mh1P7lb7sb/arauQECFsrZqHL5FRX osRSgDxjRfNWqzJYGO5mXSYkvrZIIcvxZi2Qga/XCENn5MzhmsMpSCX4h5jiEXq/ROAVW 8+46P2Y+FhNad+Jh/+j6XX1sRccUHCfZmRCHON61U0qAI3WIyiy4NIh+p9o8omZhzGtWJ YLE9ZXfwqg4TQAQIoPNurD6cW6xEni19B7k9qURkCilsXFpLZ25eusdr0jAOjhnpt2Sbr 64qudBdV7O/p/HlI3C16QXfMH63mwwPwSCHEdXzVNObNcpe978h/5CB60u6TMRerWFw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796216895; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=mwp0kXxBIsBmEKkoCMFgbuBCwoSuZk+rsrerC3qtXMs=; b=LCYFkO3HAWrkDCoNeeQvxWg4fGJFErd4JOvYNAqP93P4zkyYK/8JWtLhB41XVIc0axGW jv6nMfEeYpMNXhmXxtAcdK5nUursQoQSMFecLd+jcMZmqsZ8XgStR6MG565BBlD/HBwdo KUdlHp13nOVCL7tVsoxRnykC2wMVOrPjzrUkgR7MU20dmJRvaCYBnHKRoOOEss8KaHGC/ WuFhnLtK8UGfmQBfel4j4Ng1m01s9EeQumVWTElWACXTweV00mcbbD2yhGmdHLFI2i2kx b8qUN/mXmZG4NnieIq2tuhlAbfqodMx9WlkjJsMaOcdSGBUSJGrOqO252jdbCAa4H9Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=LpUHmzcY; arc=none smtp.remote-ip=148.251.105.195 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27DEB606A331; Wed, 2 Dec 2026 13:08:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 27DEB606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=LpUHmzcY DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1796216892; bh=NkmmmHYWojbTWR/1Dxs04raowCTK+so7S9gSa2tLXII=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=LpUHmzcYI8bVDwS55QuKPxEcAxq5lFyyzM0+tB2ts9as25wfJs38OkaZdZqQJpAh4 M+7WyF8x90DC3Q2FTQ1+kqqiQVOwEWGJTkO5GYeL6coonJ5slhMXmdhBbxM7LTvjYW LbXtsJC1Tes2Q+PM1Sx41OAbHWP21BrceL/lQTunVvt8XGZM+7oejjm/ZFeVsDCA/V dI1BUhw/ReT6I8RVe4MTq6sdrPFVRuPbqclAELG9Z8HY9yklbkpMYxa9qhNkoc7LOu UYXtLySd0FVtzxyYSViWX5lhFt4NlEhJZ1bEKRny1u1c1ngLFi38uW6WYyMHJjZCj6 iN48+qn2Mq/2g== Received: from [100.64.0.241] (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id C5B5017E03D4; Wed, 02 Dec 2026 14:08:11 +0100 (CET) Message-ID: <3d4d1b07-9a8f-4f7b-aadd-d846b60683ca@collabora.com> Date: Wed, 2 Dec 2026 15:08:11 +0200 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7] drm/bridge: dw-hdmi-qp: serialize HDMI audio callbacks with PHY enable/disable To: Frank Zhang , hjc@rock-chips.com, heiko@sntech.de, andyshrk@163.com, andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, luca.ceresoli@bootlin.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, royalnet026@gmail.com, me@timsurber.de Cc: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20261112101155.47777-1-rmxpzlb@gmail.com> <93924e13-117a-4ba9-b243-42ae79e86c1d@collabora.com> Content-Language: en-US From: Cristian Ciocaltea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Frank, On 12/2/26 11:56 AM, Frank Zhang wrote: > Regarding `hdmi->mutex`, this mutex is not only used in atomic enable/disable, > but also used in dw_hdmi_qp_hpd_notify(). Although the lock scope is very > small, it still introduces lock condition for audio callbacks, or am I missing > something? > > To keep the lock scope cleaner, we can use a dedicated mutex (e.g., > `hdmi->audio_mutex`) for tmds_char_rate. Does this sound reasonable to you? I'd still prefer to reuse hdmi->mutex. In dw_hdmi_qp_hpd_notify() it only covers taking a reference on curr_conn, both read_hpd() and the hotplug event handling run outside of it. Any contention with the audio callbacks is therefore negligible, and those are slow-path operations anyway. Moreover, curr_conn and tmds_char_rate describe the same thing, i.e. the currently active output, and both are published by the atomic enable/disable hooks, so keeping them under a single lock ensures they're always seen in a consistent state. A second mutex adds unnecessary complexity and could potentially open a window where the two get out of sync. So please just update the comment above the mutex to mention it also guards tmds_char_rate. > This commit(247695b19afc) is on branch: drm-misc-next, right? I will rebase > onto this branch in the next version. Yes. Cristian