From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 8AAA2411A12 for ; Mon, 17 Aug 2026 12:28:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786969693; cv=none; b=ZJksqj9QdMW08OOB04wn8+9+e4j5INWK4nNQ1bJ3YQwCJw4W+w1IRbhogX+4V3av2B5ZQpzhy/Pq809SbO1ePpKV8g8rGQMh05peYYIrdkbS1WIwMiDemAzXs9ovl1zSZwjPvRs4lV8aBMBFoppg7cbxBQq51XvNok/LFzfM7R4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786969693; c=relaxed/simple; bh=cCTDlHZqiN5aP0yWwq8+3caUUPT3PGN28VZ1JJWw7xI=; h=Content-Type:Date:Message-Id:To:From:Subject:Cc:Mime-Version: References:In-Reply-To; b=iadfEW4rK9O5aakL+Q1fMGeiXQnAZd3ziAVYqZvl7n+6ebfC476WqbKX2xf9qoQYgyzF2F9S5NFqSJXZsslo1YJl3CvH5WYh4GHnudpwkqOlQf5KMzGlQdpifkaPTku0LYecj/bzmPxleR0KteV0n4+oc03Z3PENrjngrS4CFus= 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=r1nF2FtB; arc=none smtp.client-ip=185.246.84.56 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="r1nF2FtB" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 987E01A16D0; Mon, 17 Aug 2026 12:28:06 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4D51760352; Mon, 17 Aug 2026 12:28:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 13ABE11C723F4; Mon, 17 Aug 2026 14:27:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786969684; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Zo0FIoAv//5JsQywcLuHcbJ3nZRRce8imVX9S9Mgkg8=; b=r1nF2FtBb4lHdJsdpYRIL6M5jE36wrkh9yBYIVU2tccRYGAUWq+VZ2rPXN7yrfTSJHuOcf mYSqIKA088RquW9ipsNnJmmSsQ6dB7LpYxcSBMTf11Ek21twydWyleMjWrUhpbWjxqST4O uUS1hcMJtkh939lp+f8hkt2q6EGkQdDxAng+flZR3j560tQ8MKDV6cs9f9w4fYQP8/Waa5 jBv5fK9IKL0QfOP1TmtIoz8Hgo+AC6fYXyuaLUMSaTq2opFarTkvFDalOW7XncCau7I7yt mAWtvidecpiAVYeJ0zOXfT73xuBux9Xmpl8JwwVheDnFKS1S92585My1bppOPw== Content-Type: text/plain; charset=UTF-8 Date: Mon, 17 Aug 2026 14:27:58 +0200 Message-Id: To: "Maxime Ripard" , "Luca Ceresoli" From: "Luca Ceresoli" Subject: Re: [PATCH 04/11] drm/panel: merge the drm_kms_helper module into the drm module Cc: "Maarten Lankhorst" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Jessica Zhang" , "Linus Walleij" , "Inki Dae" , "Jagan Teki" , "Marek Szyprowski" , "Dmitry Baryshkov" , "Hui Pu" , "Ian Ray" , "Thomas Petazzoni" , , 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 X-Mailer: aerc 0.22.0 References: <20260814-drm-bridge-every-panel-v1-0-19cd5277cc8d@bootlin.com> <20260814-drm-bridge-every-panel-v1-4-19cd5277cc8d@bootlin.com> <20260817-lumpy-wooden-bird-4bdfb4@houat> In-Reply-To: <20260817-lumpy-wooden-bird-4bdfb4@houat> X-Last-TLS-Session-Version: TLSv1.3 Hi Maxime, On Mon Aug 17, 2026 at 10:31 AM CEST, Maxime Ripard wrote: > On Fri, Aug 14, 2026 at 04:05:52PM +0200, Luca Ceresoli wrote: >> Work is in progress to make every drm_panel automatically create a >> panel_bridge [0][1]. >> >> This requires the panel code to call the drm_panel_bridge APIs. However >> this would create a circular dependency loop on modular builds: >> >> __devm_drm_panel_alloc() [drm] >> -> drm_panel_bridge_add() [drm_kms_helper] >> -> drm_bridge.c APIs [drm] >> >> Moving just the panel_brige.o file from [drm_kms_helper] to [drm] does n= ot >> work because the panel bridge code uses the drm_atomic_helper and >> drm_probe_helper which add further dependencies on symbols in the >> [drm_kms_helper] module. >> >> So take a simple approach, and move the entire drm_kms_helper into the >> [drm] module. >> >> Link: https://lore.kernel.org/all/emuj2innmp6zmzd7pyakqzjqpdzhly6qfhakya= 3ydwmd63pl26@5jwxaidpikjw/ [0] >> Link: https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-8-9d6f= 2c9c3058@bootlin.com/ [1] >> Signed-off-by: Luca Ceresoli > > So, that's not an option. However, why do we need drm_panel_bridge_add() > after this work is done? If we want to create a bridge for every panel, > then the bridge implementation can live in drm_panel.c, which is part of > the drm module. > > And we'd essentially move drm_panel_bridge into drm_panel.c, and make it > private. Yes in theory, but the panel_bridge code uses other parts of the drm_kms_helper module: drm_atomic_helper and drm_probe_helper, maybe more, so we'd have to move them into the drm module too. Is it worth trying to identify only the closure of files in drm_kms_helpers that are actually used by the panel_bridg, and move only them? That'd mean having some *_helper.c files in the drm module and other *_helper.c files in the drm module. There's a licensing aspect too: drm_panel.c is MIT-licensed, bridge/panel.c is GPL-2.0-or-later. However my understanding is that we can merge the two into a single file and the result would all be GPL-2.0-or-later, so that is an option. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com