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 0B903C5DF86 for ; Thu, 20 Aug 2026 08:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2Yxj3ohkMJjpanp6Udhh9M8xaJVYbHsH0MHehkOZf8M=; b=swYxgKgEhM/LQ5xR6w1wsmLABK DeKL/yimf4LCyobPDsW6MUsivg4rDBvEQKMijJR9Bo4e6Ja/DvVWZPpzWG5nEaML2IUoBD8UqEzFx v7+PL+5Yvx5y6iREtQIJHf5gGdtmAOPqMSHADgNPJ5a93+1KdPNTltHH0OkcuiSzgoDotB/y/bZcK RibcAMMGix8Cqo7xlo1ey33pgHlTXXDjROS6+J/L8+wnnqe+SPaRT6CL9eIoznAIh1tnBsxtdgFhG pDv8Bo1Dki7nYNzQU1MOTt7G3RSumXFzaOa4Ynf0swJAc4PqCnZR5O2Uh9pA8JsDwBXzXHzwyhDds kC/b3ptQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wwyYL-0000000BCWr-1kfQ; Thu, 20 Aug 2026 08:55:13 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wwyYK-0000000BCWQ-1Hl3; Thu, 20 Aug 2026 08:55:12 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id BAD7543783; Thu, 20 Aug 2026 08:55:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B6FB1F000E9; Thu, 20 Aug 2026 08:55:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787216111; bh=l3rPSY8/H1j5rwG0ZinkqkOyB7YrD7s/UlfIdkhJ1Ss=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=oETed9BXxV63wuse+XXarKPoAQ3KSpOTyKnyE7NwwDW3L+GqR6KhcBNOifSEIvzfN sY7w26iUwAfWzk+FIA2DtXNEcUOOdiQ4DrervBhLHeXyVAA1cKsxNbfW5bm9bnwS7J r+mTKm/eXeanGOwL6ASPhcNCr/3wvvTZk+QbzSPxEhh+ESK+xBBVh4q2HJ0chhSbpQ JG0Id8T6ephZcPzHH0lAWDF9p2WVUvwbUYKVSWMSmY0d5JbuVqyZLBnSIaAdVYebgl yf5/DX1OnarTxQ+YNvY7eqOvwarVqg1OtqgpyBa7tjgYsFUxaB1wf7Yx69A+TNSV/t QRflykiZOcP5Q== Date: Thu, 20 Aug 2026 10:55:09 +0200 From: Maxime Ripard To: Cristian Ciocaltea Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Chen-Yu Tsai , Samuel Holland , Dave Stevenson , =?utf-8?B?TWHDrXJh?= Canal , Raspberry Pi Kernel Maintenance , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Andy Yan , Algea Cao , Daniel Stone , Liu Ying , Phong LE , kernel@collabora.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v10 43/69] drm/vc4: hdmi: Propagate -EDEADLK to the top level Message-ID: <20260820-sceptical-friendly-panther-6cdfd4@houat> References: <20260731-dw-hdmi-qp-scramb-v10-0-294364b2cf15@collabora.com> <20260731-dw-hdmi-qp-scramb-v10-43-294364b2cf15@collabora.com> MIME-Version: 1.0 In-Reply-To: <20260731-dw-hdmi-qp-scramb-v10-43-294364b2cf15@collabora.com> X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1888438854714587016==" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org --===============1888438854714587016== Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="jheie2hl6uizzjqu" Content-Disposition: inline --jheie2hl6uizzjqu Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v10 43/69] drm/vc4: hdmi: Propagate -EDEADLK to the top level MIME-Version: 1.0 On Fri, Jul 31, 2026 at 07:19:50PM +0300, Cristian Ciocaltea wrote: > drm_connector_helper_funcs.detect_ctx() is expected to propagate > -EDEADLK so that context owners, e.g. drm_helper_probe_detect_ctx(), can > perform the required backoff and retry. >=20 > vc4_hdmi_handle_hotplug() instead runs its own retry loop and calls > drm_modeset_backoff() on an acquire context it does not own. This drops > all locks in the context, including connection_mutex held by the core. >=20 > Drop the local retry logic and propagate -EDEADLK to the caller instead. > This aligns VC4 with the expected detect_ctx() semantics. >=20 > Signed-off-by: Cristian Ciocaltea > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 23 +++++++---------------- > 1 file changed, 7 insertions(+), 16 deletions(-) >=20 > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdm= i.c > index ba16e7944cf3..72042fad04c5 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -344,12 +344,11 @@ static int vc4_hdmi_reset_link(struct drm_connector= *connector, > return drm_atomic_helper_reset_crtc(crtc, ctx); > } > =20 > -static void vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi, > - struct drm_modeset_acquire_ctx *ctx, > - enum drm_connector_status status) > +static int vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi, > + struct drm_modeset_acquire_ctx *ctx, > + enum drm_connector_status status) > { > struct drm_connector *connector =3D &vc4_hdmi->connector; > - int ret; > =20 > /* > * NOTE: This function should really be called with vc4_hdmi->mutex > @@ -368,17 +367,9 @@ static void vc4_hdmi_handle_hotplug(struct vc4_hdmi = *vc4_hdmi, > drm_atomic_helper_connector_hdmi_hotplug(connector, ctx, status); > =20 > if (status !=3D connector_status_connected) > - return; > + return 0; > =20 > - for (;;) { > - ret =3D vc4_hdmi_reset_link(connector, ctx); > - if (ret =3D=3D -EDEADLK) { > - drm_modeset_backoff(ctx); > - continue; > - } > - > - break; > - } > + return vc4_hdmi_reset_link(connector, ctx); > } > =20 > static int vc4_hdmi_connector_detect_ctx(struct drm_connector *connector, > @@ -416,10 +407,10 @@ static int vc4_hdmi_connector_detect_ctx(struct drm= _connector *connector, > status =3D connector_status_connected; > } > =20 > - vc4_hdmi_handle_hotplug(vc4_hdmi, ctx, status); > + ret =3D vc4_hdmi_handle_hotplug(vc4_hdmi, ctx, status); > pm_runtime_put(&vc4_hdmi->pdev->dev); > =20 > - return status; > + return ret =3D=3D -EDEADLK ? ret : status; Don't we mask any error that isn't EDEADLK here? Maxime --jheie2hl6uizzjqu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCaobA7QAKCRAnX84Zoj2+ di3CAX9taIN5wWfjabsZQCOc93N9yDXa9ZGCjkYY2vFUSE/fV+whVEefexpHg4/R F3pHcVEBgJ20yb1ebjodb2eVDBUxXUD4NaTMlRksgE23J/oyYEmSCvMSew5M3fNh 7EuqooG5SA== =WNEd -----END PGP SIGNATURE----- --jheie2hl6uizzjqu-- --===============1888438854714587016== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip --===============1888438854714587016==--