From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 7D57539D6EC for ; Tue, 21 Apr 2026 11:08:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776769720; cv=none; b=Nw9hbeEiSFBtqlkIJrG5QlgN3jvMS+0NEG9QplnH1e4OXdopJFv6FywPfxQLTTBOQfVHRJ4rzFHnTxmht6720XDjyrgbVJlcC3u1bfCztyOGqSIEB1SEO/u19w+SpQf1JxzieazCspWBg5BOLoM5HljhNDbBtdEXmcc5PJxqwbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776769720; c=relaxed/simple; bh=11nuPz6PWrWSBmF3D6Vp32i3D7CrHPnfbNoKa3yDXY0=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=S14phzmkANwh0WhNmD3QLXsu23cpsF1vEES8NFDo6jcf7k80xwvfbPwlxZ/d/3663uM0n5XoSEvtW7CnEJSzBdlma+FO/KiieYcZhZmLiQE/AxyIV6ScUmLZGT4mDRoJCH59b8Ecfqf2R/UhEeRms3rAuXZEG5Q0+0lnmDr2gbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Ezc5Kdbc; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Ezc5Kdbc" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 5DD3CC5C9AE; Tue, 21 Apr 2026 11:09:09 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id DA4E1600D2; Tue, 21 Apr 2026 11:08:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7C80C10460828; Tue, 21 Apr 2026 13:08:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776769707; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ME++Jq8nnXhvqwNXblHdT9mduGrDUb+KHqBm+OQJIYw=; b=Ezc5Kdbcy1BZWalj71NCEM5UOwI1fcwzgLQBhUJOQXBEzy0qwaxFjYqqPfk9OZxXVIQnJD 6D9Wjh5WUMlUhmTXB+jA+hOmUhwLM4LN/ZPFoNqRsctg/gQBIXpQiC5C5eXrXoMniod5Ql 9OP0fMk9LfpC24W3ZNrqlPYfTGpogk0cad+Nusz0eqgWnv8cID8GN8m4AQKfv9NpWWA6cS o0njiJmLyfnDysUtS+d5uDDzXzvzpJKa7KhVxdQzQS3YolO4TMBmEap0tbHvFKDoS3zMho HDfrMNm7CVF9Fn+YCnZwAvBS4uR2Fn28WI6xq5Um0EmI/MSAlBZ5kSjteDuAUw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 21 Apr 2026 13:08:20 +0200 Message-Id: Subject: Re: [PATCH 01/41] drm/display: bridge-connector: attach the encoder to the created connector Cc: "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Hui Pu" , "Ian Ray" , "Thomas Petazzoni" , , To: "Dmitry Baryshkov" From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20260417-drm-bridge-connector-attach_encoder-v1-0-67b8b8fb872a@bootlin.com> <20260417-drm-bridge-connector-attach_encoder-v1-1-67b8b8fb872a@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 Hi Dmitry, On Sat Apr 18, 2026 at 1:18 AM CEST, Dmitry Baryshkov wrote: > On Fri, Apr 17, 2026 at 11:57:49AM +0200, Luca Ceresoli wrote: >> Currently all users of the bridge-connector must call >> drm_connector_attach_encoder() immediately after a successful >> drm_bridge_connector_init(). >> >> This is an unnecessary burden for users. Move the call to the end of >> drm_bridge_connector_init() so all callers can be simplified. >> >> Signed-off-by: Luca Ceresoli >> --- >> drivers/gpu/drm/display/drm_bridge_connector.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gp= u/drm/display/drm_bridge_connector.c >> index 39cc18f78eda..bba8327fe3f7 100644 >> --- a/drivers/gpu/drm/display/drm_bridge_connector.c >> +++ b/drivers/gpu/drm/display/drm_bridge_connector.c >> @@ -1055,6 +1055,10 @@ struct drm_connector *drm_bridge_connector_init(s= truct drm_device *drm, >> IS_ENABLED(CONFIG_DRM_DISPLAY_HDCP_HELPER)) >> drm_connector_attach_content_protection_property(connector, true); >> >> + ret =3D drm_connector_attach_encoder(connector, encoder); > > I'd explicitly document that the connector is created and attached. Sure! I'd reword a bit the description, as I can't find a way to append the new info without making it all become awkward: /** * drm_bridge_connector_init - Initialise a connector for a chain of bridg= es * @drm: the DRM device * @encoder: the encoder where the bridge chain starts * - * Allocate, initialise and register a &drm_bridge_connector with the @drm - * device. The connector is associated with a chain of bridges that starts= at + * Create a new &drm_bridge_connector for the @drm device. The connector i= s + * allocated, initialised, registered with the @drm device and and attache= d + * to @encoder. + * + * The connector is associated with a chain of bridges that starts at * the @encoder. All bridges in the chain shall report bridge operation fl= ags * (&drm_bridge->ops) and bridge output type (&drm_bridge->type), and none= of * them may create a DRM connector directly. * * Returns a pointer to the new connector on success, or a negative error * pointer otherwise. */ Does it look fine? > With that in place: > > > Reviewed-by: Dmitry Baryshkov Thanks! Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com