From: Sui Jingfeng <sui.jingfeng@linux.dev>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge instances automatically
Date: Mon, 27 May 2024 10:01:35 +0800 [thread overview]
Message-ID: <03701609-86b7-47a3-85af-db47035695fb@linux.dev> (raw)
In-Reply-To: <lfgb24qv22sohgizlmt7kq3ymnshjeawlkwwcndivbeiloip55@x3qnu4ss3x4y>
Hi,
On 5/27/24 05:19, Dmitry Baryshkov wrote:
> On Mon, May 27, 2024 at 04:21:07AM +0800, Sui Jingfeng wrote:
>> Normally, the drm_bridge::of_node won't be used by bridge driver instances
>> themselves. Rather, it is mainly used by other modules to find associated
>> drm bridge drvier. Therefore, adding a drm bridge to the global bridge list
>> and setting 'of_node' field of a drm bridge share the same goal. Both are
>> for finding purpose, therefore better to group them to one function.
>>
>> Update the drm_bridge_add() interface and implementation to achieve such
>> goal atomically, new implementation will fetch the device node from the
>> backing device of the drm bridge driver automatically. For the majority
>> cases, which is one device backing one drm bridge driver, this model works
>> well. Drivers still can set it manually by passing NULL if this model
>> doesn't fit.
>>
>> While at it, Add a 'struct device *' pointer to the drm_bridge structure.
>> As it already being passed in by both of drm_bridge_add() and
>> devm_drm_bridge_add(). A lot of driver instances has already added it into
>> their derived structure, promote it into drm_bridge core helps to reduce
>> a batch of boilerplates.
>>
>> Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
>> ---
>
> [trimmed]
>
>> @@ -231,7 +243,7 @@ static void drm_bridge_remove_void(void *bridge)
>> */
>> int devm_drm_bridge_add(struct device *dev, struct drm_bridge *bridge)
>> {
>> - drm_bridge_add(bridge);
>> + drm_bridge_add(bridge, dev);
>> return devm_add_action_or_reset(dev, drm_bridge_remove_void, bridge);
>
> This breaks aux-hpd-bridge, which gets of_node as an external pointer
> rather than dev->of_node.
>
Yes, you are right. I forget to modify that driver.
My bad, will be fixed at the next version.
--
Best regards
Sui
next prev parent reply other threads:[~2024-05-27 2:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 20:21 [PATCH v6 00/10] drm/bridge: Allow using fwnode API to get the next bridge Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 01/10] drm/bridge: Allow using fwnode APIs " Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge instances automatically Sui Jingfeng
2024-05-26 21:19 ` Dmitry Baryshkov
2024-05-27 2:01 ` Sui Jingfeng [this message]
2024-05-26 23:33 ` kernel test robot
2024-05-27 2:06 ` Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 03/10] drm/bridge: Implement of_drm_find_bridge() on the top of drm_bridge_find_by_fwnode() Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 04/10] drm/bridge: simple-bridge: Use fwnode APIs to acquire device properties Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 05/10] drm/bridge: display-connector: " Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 06/10] drm/bridge: sii902x: Switch to use " Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 07/10] drm-bridge: it66121: Use " Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 08/10] drm/bridge: tfp410: " Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 09/10] drm/bridge: sii9234: Use fwnode APIs to abstract DT dependent API away Sui Jingfeng
2024-05-26 20:21 ` [PATCH v6 10/10] drm/bridge: ch7033: Switch to use fwnode based APIs Sui Jingfeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03701609-86b7-47a3-85af-db47035695fb@linux.dev \
--to=sui.jingfeng@linux.dev \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rfoss@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.