lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lfgb24qv22sohgizlmt7kq3ymnshjeawlkwwcndivbeiloip55@x3qnu4ss3x4y>
Date: Mon, 27 May 2024 00:19:06 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Sui Jingfeng <sui.jingfeng@...ux.dev>
Cc: Robert Foss <rfoss@...nel.org>, 
	Laurent Pinchart <Laurent.pinchart@...asonboard.com>, dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge
 instances automatically

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@...ux.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.


-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ