All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-06 13:47 ` Yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Fertre @ 2021-12-06 13:47 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

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..9f441aadf2d5 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>
@@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
 
 	DRM_DEBUG("%s\n", __func__);
 
+	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
+	if (ret)
+		return ret;
+
 	dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
 
 	ddev = drm_dev_alloc(&drv_driver, dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-06 13:47 ` Yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Fertre @ 2021-12-06 13:47 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

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..9f441aadf2d5 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>
@@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
 
 	DRM_DEBUG("%s\n", __func__);
 
+	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
+	if (ret)
+		return ret;
+
 	dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
 
 	ddev = drm_dev_alloc(&drv_driver, dev);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
  2021-12-06 13:47 ` Yannick Fertre
@ 2021-12-06 14:23   ` Thomas Zimmermann
  -1 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2021-12-06 14:23 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel


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

Hi

Am 06.12.21 um 14:47 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>

The patch should have contained a note that this is version 2 of the 
change with a short changelog. Anyway

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Best regards
Thomas

> ---
>   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..9f441aadf2d5 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>
> @@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
>   
>   	DRM_DEBUG("%s\n", __func__);
>   
> +	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
> +	if (ret)
> +		return ret;
> +
>   	dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
>   
>   	ddev = drm_dev_alloc(&drv_driver, dev);
> 

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-06 14:23   ` Thomas Zimmermann
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2021-12-06 14:23 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 1489 bytes --]

Hi

Am 06.12.21 um 14:47 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>

The patch should have contained a note that this is version 2 of the 
change with a short changelog. Anyway

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Best regards
Thomas

> ---
>   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..9f441aadf2d5 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>
> @@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
>   
>   	DRM_DEBUG("%s\n", __func__);
>   
> +	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
> +	if (ret)
> +		return ret;
> +
>   	dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
>   
>   	ddev = drm_dev_alloc(&drv_driver, dev);
> 

-- 
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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
  2021-12-06 14:23   ` Thomas Zimmermann
@ 2021-12-14 10:15     ` Philippe CORNU
  -1 siblings, 0 replies; 14+ messages in thread
From: Philippe CORNU @ 2021-12-14 10:15 UTC (permalink / raw)
  To: Thomas Zimmermann, Yannick Fertre, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel



On 12/6/21 3:23 PM, Thomas Zimmermann wrote:
> Hi
> 
> Am 06.12.21 um 14:47 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>
> 
> The patch should have contained a note that this is version 2 of the 
> change with a short changelog. Anyway
> 
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> 
> Best regards
> Thomas
> 
>> ---
>>   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..9f441aadf2d5 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>
>> @@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct 
>> platform_device *pdev)
>>       DRM_DEBUG("%s\n", __func__);
>> +    ret = drm_aperture_remove_framebuffers(false, &drv_driver);
>> +    if (ret)
>> +        return ret;
>> +

Hi Yannick,
and many thanks for your patch.
Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
Philippe :-)


>>       dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
>>       ddev = drm_dev_alloc(&drv_driver, dev);
>>
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-14 10:15     ` Philippe CORNU
  0 siblings, 0 replies; 14+ messages in thread
From: Philippe CORNU @ 2021-12-14 10:15 UTC (permalink / raw)
  To: Thomas Zimmermann, Yannick Fertre, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel



On 12/6/21 3:23 PM, Thomas Zimmermann wrote:
> Hi
> 
> Am 06.12.21 um 14:47 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>
> 
> The patch should have contained a note that this is version 2 of the 
> change with a short changelog. Anyway
> 
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> 
> Best regards
> Thomas
> 
>> ---
>>   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..9f441aadf2d5 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>
>> @@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct 
>> platform_device *pdev)
>>       DRM_DEBUG("%s\n", __func__);
>> +    ret = drm_aperture_remove_framebuffers(false, &drv_driver);
>> +    if (ret)
>> +        return ret;
>> +

Hi Yannick,
and many thanks for your patch.
Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
Philippe :-)


>>       dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
>>       ddev = drm_dev_alloc(&drv_driver, dev);
>>
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
  2021-12-14 10:15     ` Philippe CORNU
@ 2022-01-04 13:52       ` Philippe CORNU
  -1 siblings, 0 replies; 14+ messages in thread
From: Philippe CORNU @ 2022-01-04 13:52 UTC (permalink / raw)
  To: Thomas Zimmermann, Yannick Fertre, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel



On 12/14/21 11:15 AM, Philippe CORNU wrote:
> 
> 
> On 12/6/21 3:23 PM, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 06.12.21 um 14:47 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>
>>
>> The patch should have contained a note that this is version 2 of the 
>> change with a short changelog. Anyway
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>
>> Best regards
>> Thomas
>>
>>> ---
>>>   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..9f441aadf2d5 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>
>>> @@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct 
>>> platform_device *pdev)
>>>       DRM_DEBUG("%s\n", __func__);
>>> +    ret = drm_aperture_remove_framebuffers(false, &drv_driver);
>>> +    if (ret)
>>> +        return ret;
>>> +
> 
> Hi Yannick,
> and many thanks for your patch.
> Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
> Philippe :-)
> 
> 
>>>       dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
>>>       ddev = drm_dev_alloc(&drv_driver, dev);
>>>
>>

Applied on drm-misc-next.
Many thanks for your patch,
Philippe :-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
@ 2022-01-04 13:52       ` Philippe CORNU
  0 siblings, 0 replies; 14+ messages in thread
From: Philippe CORNU @ 2022-01-04 13:52 UTC (permalink / raw)
  To: Thomas Zimmermann, Yannick Fertre, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel



On 12/14/21 11:15 AM, Philippe CORNU wrote:
> 
> 
> On 12/6/21 3:23 PM, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 06.12.21 um 14:47 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>
>>
>> The patch should have contained a note that this is version 2 of the 
>> change with a short changelog. Anyway
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>
>> Best regards
>> Thomas
>>
>>> ---
>>>   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..9f441aadf2d5 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>
>>> @@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct 
>>> platform_device *pdev)
>>>       DRM_DEBUG("%s\n", __func__);
>>> +    ret = drm_aperture_remove_framebuffers(false, &drv_driver);
>>> +    if (ret)
>>> +        return ret;
>>> +
> 
> Hi Yannick,
> and many thanks for your patch.
> Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
> Philippe :-)
> 
> 
>>>       dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
>>>       ddev = drm_dev_alloc(&drv_driver, dev);
>>>
>>

Applied on drm-misc-next.
Many thanks for your patch,
Philippe :-)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
  2021-12-03  9:35   ` Thomas Zimmermann
@ 2021-12-06 13:42     ` yannick Fertre
  -1 siblings, 0 replies; 14+ messages in thread
From: yannick Fertre @ 2021-12-06 13:42 UTC (permalink / raw)
  To: Thomas Zimmermann, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

Hi Thomas,


On 12/3/21 10:35 AM, Thomas Zimmermann wrote:
> 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;
>>
> 
Thanks for reviewing the patch.
I will follow your advice and push a new patch.

Yannick

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-06 13:42     ` yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: yannick Fertre @ 2021-12-06 13:42 UTC (permalink / raw)
  To: Thomas Zimmermann, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

Hi Thomas,


On 12/3/21 10:35 AM, Thomas Zimmermann wrote:
> 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;
>>
> 
Thanks for reviewing the patch.
I will follow your advice and push a new patch.

Yannick

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
  2021-12-03  8:55 ` Yannick Fertre
@ 2021-12-03  9:35   ` Thomas Zimmermann
  -1 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2021-12-03  9:35 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel


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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-03  9:35   ` Thomas Zimmermann
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2021-12-03  9:35 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel


[-- Attachment #1.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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-03  8:55 ` Yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Fertre @ 2021-12-03  8:55 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

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;
+
 	ret = drm_dev_register(ddev, 0);
 	if (ret)
 		goto err_put;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-03  8:55 ` Yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Fertre @ 2021-12-03  8:55 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

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;
+
 	ret = drm_dev_register(ddev, 0);
 	if (ret)
 		goto err_put;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-01-04 13:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 13:47 [PATCH] drm/stm: remove conflicting framebuffers Yannick Fertre
2021-12-06 13:47 ` Yannick Fertre
2021-12-06 14:23 ` Thomas Zimmermann
2021-12-06 14:23   ` Thomas Zimmermann
2021-12-14 10:15   ` Philippe CORNU
2021-12-14 10:15     ` Philippe CORNU
2022-01-04 13:52     ` Philippe CORNU
2022-01-04 13:52       ` Philippe CORNU
  -- strict thread matches above, loose matches on Subject: below --
2021-12-03  8:55 Yannick Fertre
2021-12-03  8:55 ` Yannick Fertre
2021-12-03  9:35 ` Thomas Zimmermann
2021-12-03  9:35   ` Thomas Zimmermann
2021-12-06 13:42   ` yannick Fertre
2021-12-06 13:42     ` yannick Fertre

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.