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]
Date:   Thu, 18 Nov 2021 10:19:27 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Hector Martin <marcan@...can.st>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     dri-devel@...ts.freedesktop.org,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] drm/simpledrm: Bind to OF framebuffers in /chosen

Hi

Am 17.11.21 um 15:58 schrieb Hector Martin:
> This matches the simplefb behavior; these nodes are not matched by the
> standard OF machinery. This fixes a regression when simpledrm replaces
> simeplefb.
> 
> Signed-off-by: Hector Martin <marcan@...can.st>
> ---
>   drivers/gpu/drm/tiny/simpledrm.c | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
> index 481b48bde047..2c84f2ea1fa2 100644
> --- a/drivers/gpu/drm/tiny/simpledrm.c
> +++ b/drivers/gpu/drm/tiny/simpledrm.c
> @@ -2,6 +2,7 @@
>   
>   #include <linux/clk.h>
>   #include <linux/of_clk.h>
> +#include <linux/of_platform.h>
>   #include <linux/platform_data/simplefb.h>
>   #include <linux/platform_device.h>
>   #include <linux/regulator/consumer.h>
> @@ -897,5 +898,21 @@ static struct platform_driver simpledrm_platform_driver = {
>   
>   module_platform_driver(simpledrm_platform_driver);
>   
> +static int __init simpledrm_init(void)
> +{
> +	struct device_node *np;
> +
> +	if (IS_ENABLED(CONFIG_OF_ADDRESS) && of_chosen) {
> +		for_each_child_of_node(of_chosen, np) {
> +			if (of_device_is_compatible(np, "simple-framebuffer"))
> +				of_platform_device_create(np, NULL, NULL);
> +		}
> +	}
> +
> +	return 0;
> +}
> +
> +fs_initcall(simpledrm_init);
> +

Simpledrm is just a driver, but this is platform setup code. Why is this 
code located here and not under arch/ or drivers/firmware/?

I know that other drivers do similar things, it doesn't seem to belong here.

Best regards
Thomas

>   MODULE_DESCRIPTION(DRIVER_DESC);
>   MODULE_LICENSE("GPL v2");
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ