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: <7469e918-b2bf-00a9-1bbc-2f3514ec0816@suse.de>
Date:   Fri, 3 Dec 2021 10:35:04 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Yannick Fertre <yannick.fertre@...s.st.com>,
        Philippe Cornu <philippe.cornu@...s.st.com>,
        Raphael Gallais-Pou <raphael.gallais-pou@...s.st.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        dri-devel@...ts.freedesktop.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/stm: remove conflicting framebuffers

Hi

Am 03.12.21 um 09:55 schrieb Yannick Fertre:
> In case of using simplefb or another conflicting framebuffer,
> call drm_aperture_remove_framebuffers() to remove memory allocated.
> 
> Signed-off-by: Yannick Fertre <yannick.fertre@...s.st.com>
> ---
>   drivers/gpu/drm/stm/drv.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
> index 222869b232ae..5ba46f70f081 100644
> --- a/drivers/gpu/drm/stm/drv.c
> +++ b/drivers/gpu/drm/stm/drv.c
> @@ -14,6 +14,7 @@
>   #include <linux/of_platform.h>
>   #include <linux/pm_runtime.h>
>   
> +#include <drm/drm_aperture.h>
>   #include <drm/drm_atomic.h>
>   #include <drm/drm_atomic_helper.h>
>   #include <drm/drm_drv.h>
> @@ -193,6 +194,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
>   	if (ret)
>   		goto err_put;
>   
> +	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
> +	if (ret)
> +		goto err_put;
> +

This has to be done at the very top of the probe function, before 
anything that touches the device. Otherwise both drivers interfere with 
each other while probing and setup's going on.

Best regards
Thomas

>   	ret = drm_dev_register(ddev, 0);
>   	if (ret)
>   		goto err_put;
> 

-- 
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