mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Yannick Fertre <yannick.fertre@foss.st.com>,
	Philippe Cornu <philippe.cornu@foss.st.com>,
	Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	dri-devel@lists.freedesktop.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/stm: remove conflicting framebuffers
Date: Fri, 3 Dec 2021 10:35:04 +0100	[thread overview]
Message-ID: <7469e918-b2bf-00a9-1bbc-2f3514ec0816@suse.de> (raw)
In-Reply-To: <20211203085512.11127-1-yannick.fertre@foss.st.com>


[-- Attachment #1.1: Type: text/plain, Size: 1481 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2021-12-03  9:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  8:55 Yannick Fertre
2021-12-03  9:35 ` Thomas Zimmermann [this message]
2021-12-06 13:42   ` yannick Fertre
2021-12-06 13:47 Yannick Fertre
2021-12-06 14:23 ` Thomas Zimmermann
2021-12-14 10:15   ` Philippe CORNU
2022-01-04 13:52     ` Philippe CORNU

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=7469e918-b2bf-00a9-1bbc-2f3514ec0816@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@foss.st.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=philippe.cornu@foss.st.com \
    --cc=raphael.gallais-pou@foss.st.com \
    --cc=yannick.fertre@foss.st.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®