dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Updating hardcoded "of-display" devices
@ 2023-04-12  9:55 Cyril Brulebois
  2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
  2023-04-12  9:55 ` [PATCH 2/2] drm/ofdrm: " Cyril Brulebois
  0 siblings, 2 replies; 21+ messages in thread
From: Cyril Brulebois @ 2023-04-12  9:55 UTC (permalink / raw)
  To: linux-fbdev, dri-devel; +Cc: Michal Suchanek, linux-kernel, Thomas Zimmermann

Hi,

We've spotted a regression with the Debian Installer on ppc64el, and
I've confirmed that the first patch fixes fbdev/offb as expected (or at
least works around the regression, see last part of the commit message):
 - [PATCH 1/2] fbdev/offb: Update expected device name

Since I've spotted that drm/ofdrm is affected as well, I'm submitting a
similar patch for it, but I can't really test it. I suppose Thomas who
introduced this new driver during the v6.2 release cycle will be able
to take it from there if needed:
 - [PATCH 2/2] drm/ofdrm: Update expected device name


Cheers,
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/


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

* [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-12  9:55 Updating hardcoded "of-display" devices Cyril Brulebois
@ 2023-04-12  9:55 ` Cyril Brulebois
  2023-04-16 12:34   ` Salvatore Bonaccorso
                     ` (3 more replies)
  2023-04-12  9:55 ` [PATCH 2/2] drm/ofdrm: " Cyril Brulebois
  1 sibling, 4 replies; 21+ messages in thread
From: Cyril Brulebois @ 2023-04-12  9:55 UTC (permalink / raw)
  To: linux-fbdev, dri-devel
  Cc: linux-kernel, stable, Cyril Brulebois, Thomas Zimmermann,
	Michal Suchanek

Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
as spotted by Frédéric Bonnard, the historical "of-display" device is
gone: the updated logic creates "of-display.0" instead, then as many
"of-display.N" as required.

This means that offb no longer finds the expected device, which prevents
the Debian Installer from setting up its interface, at least on ppc64el.

It might be better to iterate on all possible nodes, but updating the
hardcoded device from "of-display" to "of-display.0" is confirmed to fix
the Debian Installer at the very least.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
Link: https://bugs.debian.org/1033058
Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
Cc: stable@vger.kernel.org
Signed-off-by: Cyril Brulebois <cyril@debamax.com>
---
 drivers/video/fbdev/offb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index b97d251d894b..6264c7184457 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(of, offb_of_match_display);
 
 static struct platform_driver offb_driver_display = {
 	.driver = {
-		.name = "of-display",
+		.name = "of-display.0",
 		.of_match_table = offb_of_match_display,
 	},
 	.probe = offb_probe_display,
-- 
2.30.2


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

* [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-12  9:55 Updating hardcoded "of-display" devices Cyril Brulebois
  2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
@ 2023-04-12  9:55 ` Cyril Brulebois
  2023-04-24  7:33   ` Geert Uytterhoeven
  2023-07-10 16:36   ` Michal Suchánek
  1 sibling, 2 replies; 21+ messages in thread
From: Cyril Brulebois @ 2023-04-12  9:55 UTC (permalink / raw)
  To: linux-fbdev, dri-devel
  Cc: linux-kernel, stable, Cyril Brulebois, Thomas Zimmermann,
	Michal Suchanek

Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
as spotted by Frédéric Bonnard, the historical "of-display" device is
gone: the updated logic creates "of-display.0" instead, then as many
"of-display.N" as required.

This means that offb no longer finds the expected device, which prevents
the Debian Installer from setting up its interface, at least on ppc64el.

Given the code similarity it is likely to affect ofdrm in the same way.

It might be better to iterate on all possible nodes, but updating the
hardcoded device from "of-display" to "of-display.0" is likely to help
as a first step.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
Link: https://bugs.debian.org/1033058
Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Cyril Brulebois <cyril@debamax.com>
---
 drivers/gpu/drm/tiny/ofdrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c
index 6e349ca42485..92df021d71df 100644
--- a/drivers/gpu/drm/tiny/ofdrm.c
+++ b/drivers/gpu/drm/tiny/ofdrm.c
@@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
 
 static struct platform_driver ofdrm_platform_driver = {
 	.driver = {
-		.name = "of-display",
+		.name = "of-display.0",
 		.of_match_table = ofdrm_of_match_display,
 	},
 	.probe = ofdrm_probe,
-- 
2.30.2


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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
@ 2023-04-16 12:34   ` Salvatore Bonaccorso
  2023-06-15 13:03     ` Linux regression tracking (Thorsten Leemhuis)
  2023-04-22  9:50   ` Helge Deller
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 21+ messages in thread
From: Salvatore Bonaccorso @ 2023-04-16 12:34 UTC (permalink / raw)
  To: Cyril Brulebois, regressions
  Cc: linux-fbdev, linux-kernel, dri-devel, stable, Thomas Zimmermann,
	Michal Suchanek

Hi

looping in as well the regressions list (hoping not doing any mistake
with the regzbot commands):

On Wed, Apr 12, 2023 at 11:55:08AM +0200, Cyril Brulebois wrote:
> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> as spotted by Frédéric Bonnard, the historical "of-display" device is
> gone: the updated logic creates "of-display.0" instead, then as many
> "of-display.N" as required.
> 
> This means that offb no longer finds the expected device, which prevents
> the Debian Installer from setting up its interface, at least on ppc64el.
> 
> It might be better to iterate on all possible nodes, but updating the
> hardcoded device from "of-display" to "of-display.0" is confirmed to fix
> the Debian Installer at the very least.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> Link: https://bugs.debian.org/1033058
> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cyril Brulebois <cyril@debamax.com>
> ---
>  drivers/video/fbdev/offb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index b97d251d894b..6264c7184457 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(of, offb_of_match_display);
>  
>  static struct platform_driver offb_driver_display = {
>  	.driver = {
> -		.name = "of-display",
> +		.name = "of-display.0",
>  		.of_match_table = offb_of_match_display,
>  	},
>  	.probe = offb_probe_display,

#regzbot ^introduced 241d2fb56a18
#regzbot title: Open Firmware framebuffer cannot find of-display
#regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
#regzbot link: https://lore.kernel.org/all/20230412095509.2196162-1-cyril@debamax.com/T/#m34493480243a2cad2ae359abfd9db5e755f41add
#regzbot link: https://bugs.debian.org/1033058

Regards,
Salvatore

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
  2023-04-16 12:34   ` Salvatore Bonaccorso
@ 2023-04-22  9:50   ` Helge Deller
  2023-04-24  7:31   ` Geert Uytterhoeven
  2023-07-10 16:36   ` Michal Suchánek
  3 siblings, 0 replies; 21+ messages in thread
From: Helge Deller @ 2023-04-22  9:50 UTC (permalink / raw)
  To: Cyril Brulebois, linux-fbdev, dri-devel
  Cc: stable, Michal Suchanek, linux-kernel, Thomas Zimmermann

On 4/12/23 11:55, Cyril Brulebois wrote:
> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> as spotted by Frédéric Bonnard, the historical "of-display" device is
> gone: the updated logic creates "of-display.0" instead, then as many
> "of-display.N" as required.
>
> This means that offb no longer finds the expected device, which prevents
> the Debian Installer from setting up its interface, at least on ppc64el.
>
> It might be better to iterate on all possible nodes, but updating the
> hardcoded device from "of-display" to "of-display.0" is confirmed to fix
> the Debian Installer at the very least.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> Link: https://bugs.debian.org/1033058
> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cyril Brulebois <cyril@debamax.com>

I've applied the series (2 patches, one of them in drm) to the fbdev git tree.

Thanks!
Helge

> ---
>   drivers/video/fbdev/offb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index b97d251d894b..6264c7184457 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(of, offb_of_match_display);
>
>   static struct platform_driver offb_driver_display = {
>   	.driver = {
> -		.name = "of-display",
> +		.name = "of-display.0",
>   		.of_match_table = offb_of_match_display,
>   	},
>   	.probe = offb_probe_display,


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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
  2023-04-16 12:34   ` Salvatore Bonaccorso
  2023-04-22  9:50   ` Helge Deller
@ 2023-04-24  7:31   ` Geert Uytterhoeven
  2023-07-10 16:36   ` Michal Suchánek
  3 siblings, 0 replies; 21+ messages in thread
From: Geert Uytterhoeven @ 2023-04-24  7:31 UTC (permalink / raw)
  To: Cyril Brulebois
  Cc: linux-fbdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, dri-devel, stable, Thomas Zimmermann,
	Michal Suchanek

Hi Cyril,

CC DT

On Wed, Apr 12, 2023 at 12:05 PM Cyril Brulebois <cyril@debamax.com> wrote:
> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> as spotted by Frédéric Bonnard, the historical "of-display" device is
> gone: the updated logic creates "of-display.0" instead, then as many
> "of-display.N" as required.
>
> This means that offb no longer finds the expected device, which prevents
> the Debian Installer from setting up its interface, at least on ppc64el.
>
> It might be better to iterate on all possible nodes, but updating the
> hardcoded device from "of-display" to "of-display.0" is confirmed to fix
> the Debian Installer at the very least.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> Link: https://bugs.debian.org/1033058
> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cyril Brulebois <cyril@debamax.com>

Thanks for your patch, which is now commit 27c74ea74be805cc
("fbdev/offb: Update expected device name") in fbdev/for-next

> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(of, offb_of_match_display);
>
>  static struct platform_driver offb_driver_display = {
>         .driver = {
> -               .name = "of-display",
> +               .name = "of-display.0",
>                 .of_match_table = offb_of_match_display,
>         },
>         .probe = offb_probe_display,

This looks like the wrong fix for me: platform drivers' names must
not contain the device index, and DT-based devices are probed using
the compatible value (which is "display") instead of the node name.

I think the problem is with the of_platform_default_populate_init()
function, which should create proper name@unit-address device nodes,
with unique unit addresses, and with the correct compatible value.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-12  9:55 ` [PATCH 2/2] drm/ofdrm: " Cyril Brulebois
@ 2023-04-24  7:33   ` Geert Uytterhoeven
  2023-04-24  9:07     ` Thomas Zimmermann
  2023-07-10 16:36   ` Michal Suchánek
  1 sibling, 1 reply; 21+ messages in thread
From: Geert Uytterhoeven @ 2023-04-24  7:33 UTC (permalink / raw)
  To: Cyril Brulebois
  Cc: linux-fbdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, dri-devel, stable, Thomas Zimmermann,
	Michal Suchanek

Hi Cyril,

CC DT

On Wed, Apr 12, 2023 at 12:05 PM Cyril Brulebois <cyril@debamax.com> wrote:
> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> as spotted by Frédéric Bonnard, the historical "of-display" device is
> gone: the updated logic creates "of-display.0" instead, then as many
> "of-display.N" as required.
>
> This means that offb no longer finds the expected device, which prevents
> the Debian Installer from setting up its interface, at least on ppc64el.
>
> Given the code similarity it is likely to affect ofdrm in the same way.
>
> It might be better to iterate on all possible nodes, but updating the
> hardcoded device from "of-display" to "of-display.0" is likely to help
> as a first step.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> Link: https://bugs.debian.org/1033058
> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> Cc: stable@vger.kernel.org # v6.2+
> Signed-off-by: Cyril Brulebois <cyril@debamax.com>

Thanks for your patch, which is now commit 3a9d8ea2539ebebd
("drm/ofdrm: Update expected device name") in fbdev/for-next.

> --- a/drivers/gpu/drm/tiny/ofdrm.c
> +++ b/drivers/gpu/drm/tiny/ofdrm.c
> @@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
>
>  static struct platform_driver ofdrm_platform_driver = {
>         .driver = {
> -               .name = "of-display",
> +               .name = "of-display.0",
>                 .of_match_table = ofdrm_of_match_display,
>         },
>         .probe = ofdrm_probe,

Same comment as for "[PATCH 1/2] fbdev/offb: Update expected device
name".

https://lore.kernel.org/r/CAMuHMdVGEeAsmb4tAuuqqGJ-4+BBETwEwYJA+M9NyJv0BJ_hNg@mail.gmail.com

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-24  7:33   ` Geert Uytterhoeven
@ 2023-04-24  9:07     ` Thomas Zimmermann
  2023-04-24  9:35       ` Helge Deller
  2023-05-22 11:44       ` Michal Suchánek
  0 siblings, 2 replies; 21+ messages in thread
From: Thomas Zimmermann @ 2023-04-24  9:07 UTC (permalink / raw)
  To: Geert Uytterhoeven, Cyril Brulebois
  Cc: linux-fbdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, stable, dri-devel, Michal Suchanek


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

Hi

Am 24.04.23 um 09:33 schrieb Geert Uytterhoeven:
> Hi Cyril,
> 
> CC DT
> 
> On Wed, Apr 12, 2023 at 12:05 PM Cyril Brulebois <cyril@debamax.com> wrote:
>> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
>> as spotted by Frédéric Bonnard, the historical "of-display" device is
>> gone: the updated logic creates "of-display.0" instead, then as many
>> "of-display.N" as required.
>>
>> This means that offb no longer finds the expected device, which prevents
>> the Debian Installer from setting up its interface, at least on ppc64el.
>>
>> Given the code similarity it is likely to affect ofdrm in the same way.
>>
>> It might be better to iterate on all possible nodes, but updating the
>> hardcoded device from "of-display" to "of-display.0" is likely to help
>> as a first step.
>>
>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
>> Link: https://bugs.debian.org/1033058
>> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
>> Cc: stable@vger.kernel.org # v6.2+
>> Signed-off-by: Cyril Brulebois <cyril@debamax.com>
> 
> Thanks for your patch, which is now commit 3a9d8ea2539ebebd
> ("drm/ofdrm: Update expected device name") in fbdev/for-next.
> 
>> --- a/drivers/gpu/drm/tiny/ofdrm.c
>> +++ b/drivers/gpu/drm/tiny/ofdrm.c
>> @@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
>>
>>   static struct platform_driver ofdrm_platform_driver = {
>>          .driver = {
>> -               .name = "of-display",
>> +               .name = "of-display.0",
>>                  .of_match_table = ofdrm_of_match_display,
>>          },
>>          .probe = ofdrm_probe,
> 
> Same comment as for "[PATCH 1/2] fbdev/offb: Update expected device
> name".
> 
> https://lore.kernel.org/r/CAMuHMdVGEeAsmb4tAuuqqGJ-4+BBETwEwYJA+M9NyJv0BJ_hNg@mail.gmail.com

Sorry that I missed this patch. I agree that it's probably not correct. 
At least in ofdrm, we want to be able to use multiple framebuffers at 
the same time; a feature that has been broken by this change.

Best regards
Thomas

> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

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

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

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-24  9:07     ` Thomas Zimmermann
@ 2023-04-24  9:35       ` Helge Deller
  2023-05-22  9:37         ` Linux regression tracking (Thorsten Leemhuis)
  2023-05-22 11:44       ` Michal Suchánek
  1 sibling, 1 reply; 21+ messages in thread
From: Helge Deller @ 2023-04-24  9:35 UTC (permalink / raw)
  To: Thomas Zimmermann, Geert Uytterhoeven, Cyril Brulebois
  Cc: linux-fbdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, stable, dri-devel, Michal Suchanek

On 4/24/23 11:07, Thomas Zimmermann wrote:
> Hi
>
> Am 24.04.23 um 09:33 schrieb Geert Uytterhoeven:
>> Hi Cyril,
>>
>> CC DT
>>
>> On Wed, Apr 12, 2023 at 12:05 PM Cyril Brulebois <cyril@debamax.com> wrote:
>>> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
>>> as spotted by Frédéric Bonnard, the historical "of-display" device is
>>> gone: the updated logic creates "of-display.0" instead, then as many
>>> "of-display.N" as required.
>>>
>>> This means that offb no longer finds the expected device, which prevents
>>> the Debian Installer from setting up its interface, at least on ppc64el.
>>>
>>> Given the code similarity it is likely to affect ofdrm in the same way.
>>>
>>> It might be better to iterate on all possible nodes, but updating the
>>> hardcoded device from "of-display" to "of-display.0" is likely to help
>>> as a first step.
>>>
>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
>>> Link: https://bugs.debian.org/1033058
>>> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
>>> Cc: stable@vger.kernel.org # v6.2+
>>> Signed-off-by: Cyril Brulebois <cyril@debamax.com>
>>
>> Thanks for your patch, which is now commit 3a9d8ea2539ebebd
>> ("drm/ofdrm: Update expected device name") in fbdev/for-next.
>>
>>> --- a/drivers/gpu/drm/tiny/ofdrm.c
>>> +++ b/drivers/gpu/drm/tiny/ofdrm.c
>>> @@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
>>>
>>>   static struct platform_driver ofdrm_platform_driver = {
>>>          .driver = {
>>> -               .name = "of-display",
>>> +               .name = "of-display.0",
>>>                  .of_match_table = ofdrm_of_match_display,
>>>          },
>>>          .probe = ofdrm_probe,
>>
>> Same comment as for "[PATCH 1/2] fbdev/offb: Update expected device
>> name".
>>
>> https://lore.kernel.org/r/CAMuHMdVGEeAsmb4tAuuqqGJ-4+BBETwEwYJA+M9NyJv0BJ_hNg@mail.gmail.com
>
> Sorry that I missed this patch. I agree that it's probably not
> correct. At least in ofdrm, we want to be able to use multiple
> framebuffers at the same time; a feature that has been broken by this
> change.

Geert & Thomas, thanks for the review!

I've dropped both patches from fbdev tree for now.
Would be great to find another good solution though, as it breaks the debian
installer.

Helge

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

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-24  9:35       ` Helge Deller
@ 2023-05-22  9:37         ` Linux regression tracking (Thorsten Leemhuis)
  0 siblings, 0 replies; 21+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-05-22  9:37 UTC (permalink / raw)
  To: Helge Deller, Thomas Zimmermann, Geert Uytterhoeven, Cyril Brulebois
  Cc: linux-fbdev, Linux kernel regressions list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, stable, dri-devel, Michal Suchanek

Hi, Thorsten here, the Linux kernel's regression tracker. Top-posting
for once, to make this easily accessible to everyone.

Was a proper solution for the regression the initial mail in this thread
is about ever found? Doesn't look like it for here, but maybe I'm
missing something.

Reminder, the problem afaik is caused by 241d2fb56a ("of: Make OF
framebuffer device names unique") [merged for v6.2-rc8, authored by
Michal Suchanek; committed by Rob Herring].

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

#regzbot poke

On 24.04.23 11:35, Helge Deller wrote:
> On 4/24/23 11:07, Thomas Zimmermann wrote:
>> Am 24.04.23 um 09:33 schrieb Geert Uytterhoeven:
>>> On Wed, Apr 12, 2023 at 12:05 PM Cyril Brulebois <cyril@debamax.com>
>>> wrote:
>>>> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names
>>>> unique"),
>>>> as spotted by Frédéric Bonnard, the historical "of-display" device is
>>>> gone: the updated logic creates "of-display.0" instead, then as many
>>>> "of-display.N" as required.
>>>>
>>>> This means that offb no longer finds the expected device, which
>>>> prevents
>>>> the Debian Installer from setting up its interface, at least on
>>>> ppc64el.
>>>>
>>>> Given the code similarity it is likely to affect ofdrm in the same way.
>>>>
>>>> It might be better to iterate on all possible nodes, but updating the
>>>> hardcoded device from "of-display" to "of-display.0" is likely to help
>>>> as a first step.
>>>>
>>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
>>>> Link: https://bugs.debian.org/1033058
>>>> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
>>>> Cc: stable@vger.kernel.org # v6.2+
>>>> Signed-off-by: Cyril Brulebois <cyril@debamax.com>
>>>
>>> Thanks for your patch, which is now commit 3a9d8ea2539ebebd
>>> ("drm/ofdrm: Update expected device name") in fbdev/for-next.
>>>
>>>> --- a/drivers/gpu/drm/tiny/ofdrm.c
>>>> +++ b/drivers/gpu/drm/tiny/ofdrm.c
>>>> @@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
>>>>
>>>>   static struct platform_driver ofdrm_platform_driver = {
>>>>          .driver = {
>>>> -               .name = "of-display",
>>>> +               .name = "of-display.0",
>>>>                  .of_match_table = ofdrm_of_match_display,
>>>>          },
>>>>          .probe = ofdrm_probe,
>>>
>>> Same comment as for "[PATCH 1/2] fbdev/offb: Update expected device
>>> name".
>>>
>>> https://lore.kernel.org/r/CAMuHMdVGEeAsmb4tAuuqqGJ-4+BBETwEwYJA+M9NyJv0BJ_hNg@mail.gmail.com
>>
>> Sorry that I missed this patch. I agree that it's probably not
>> correct. At least in ofdrm, we want to be able to use multiple
>> framebuffers at the same time; a feature that has been broken by this
>> change.
> 
> Geert & Thomas, thanks for the review!
> 
> I've dropped both patches from fbdev tree for now.
> Would be great to find another good solution though, as it breaks the
> debian
> installer.
> 
> Helge

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

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-24  9:07     ` Thomas Zimmermann
  2023-04-24  9:35       ` Helge Deller
@ 2023-05-22 11:44       ` Michal Suchánek
  1 sibling, 0 replies; 21+ messages in thread
From: Michal Suchánek @ 2023-05-22 11:44 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: linux-fbdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, dri-devel, Cyril Brulebois, Geert Uytterhoeven,
	stable

On Mon, Apr 24, 2023 at 11:07:45AM +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 24.04.23 um 09:33 schrieb Geert Uytterhoeven:
> > Hi Cyril,
> > 
> > CC DT
> > 
> > On Wed, Apr 12, 2023 at 12:05 PM Cyril Brulebois <cyril@debamax.com> wrote:
> > > Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> > > as spotted by Frédéric Bonnard, the historical "of-display" device is
> > > gone: the updated logic creates "of-display.0" instead, then as many
> > > "of-display.N" as required.
> > > 
> > > This means that offb no longer finds the expected device, which prevents
> > > the Debian Installer from setting up its interface, at least on ppc64el.
> > > 
> > > Given the code similarity it is likely to affect ofdrm in the same way.
> > > 
> > > It might be better to iterate on all possible nodes, but updating the
> > > hardcoded device from "of-display" to "of-display.0" is likely to help
> > > as a first step.
> > > 
> > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> > > Link: https://bugs.debian.org/1033058
> > > Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> > > Cc: stable@vger.kernel.org # v6.2+
> > > Signed-off-by: Cyril Brulebois <cyril@debamax.com>
> > 
> > Thanks for your patch, which is now commit 3a9d8ea2539ebebd
> > ("drm/ofdrm: Update expected device name") in fbdev/for-next.
> > 
> > > --- a/drivers/gpu/drm/tiny/ofdrm.c
> > > +++ b/drivers/gpu/drm/tiny/ofdrm.c
> > > @@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
> > > 
> > >   static struct platform_driver ofdrm_platform_driver = {
> > >          .driver = {
> > > -               .name = "of-display",
> > > +               .name = "of-display.0",
> > >                  .of_match_table = ofdrm_of_match_display,
> > >          },
> > >          .probe = ofdrm_probe,
> > 
> > Same comment as for "[PATCH 1/2] fbdev/offb: Update expected device
> > name".
> > 
> > https://lore.kernel.org/r/CAMuHMdVGEeAsmb4tAuuqqGJ-4+BBETwEwYJA+M9NyJv0BJ_hNg@mail.gmail.com
> 
> Sorry that I missed this patch. I agree that it's probably not correct. At
> least in ofdrm, we want to be able to use multiple framebuffers at the same
> time; a feature that has been broken by this change.

How did it work before, though?

We did not have this device name clash, then we did, and it was solved
by renaming the devices to numnered.

Now matching the first device should restore the previously available
functionality, mathing any of the numbered devices would potentially
allow to use multiple devices.

Or am I missing something?

Thanks

Michal

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-16 12:34   ` Salvatore Bonaccorso
@ 2023-06-15 13:03     ` Linux regression tracking (Thorsten Leemhuis)
  2023-06-15 13:06       ` Thomas Zimmermann
  2023-06-15 13:12       ` Cyril Brulebois
  0 siblings, 2 replies; 21+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-06-15 13:03 UTC (permalink / raw)
  To: Salvatore Bonaccorso, Cyril Brulebois, regressions
  Cc: linux-fbdev, linux-kernel, dri-devel, stable, Thomas Zimmermann,
	Michal Suchanek

On 16.04.23 14:34, Salvatore Bonaccorso wrote:
> 
> On Wed, Apr 12, 2023 at 11:55:08AM +0200, Cyril Brulebois wrote:
>> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
>> as spotted by Frédéric Bonnard, the historical "of-display" device is
>> gone: the updated logic creates "of-display.0" instead, then as many
>> "of-display.N" as required.
>>
>> This means that offb no longer finds the expected device, which prevents
>> the Debian Installer from setting up its interface, at least on ppc64el.
>>
>> It might be better to iterate on all possible nodes, but updating the
>> hardcoded device from "of-display" to "of-display.0" is confirmed to fix
>> the Debian Installer at the very least.
> [...]
> #regzbot ^introduced 241d2fb56a18
> #regzbot title: Open Firmware framebuffer cannot find of-display
> #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> #regzbot link: https://lore.kernel.org/all/20230412095509.2196162-1-cyril@debamax.com/T/#m34493480243a2cad2ae359abfd9db5e755f41add
> #regzbot link: https://bugs.debian.org/1033058

No reply to my status inquiry[1] a few weeks ago, so I have to assume
nobody cares anymore. If somebody still cares, holler!

#regzbot inconclusive: no answer to a status inquiry
#regzbot ignore-activity

[1]
https://lore.kernel.org/lkml/d1aee7d3-05f6-0920-b8e1-4ed5cf3f9f70@leemhuis.info/

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-15 13:03     ` Linux regression tracking (Thorsten Leemhuis)
@ 2023-06-15 13:06       ` Thomas Zimmermann
  2023-06-15 13:21         ` Michal Suchánek
  2023-06-15 13:12       ` Cyril Brulebois
  1 sibling, 1 reply; 21+ messages in thread
From: Thomas Zimmermann @ 2023-06-15 13:06 UTC (permalink / raw)
  To: Linux regressions mailing list, Salvatore Bonaccorso, Cyril Brulebois
  Cc: stable, linux-fbdev, Michal Suchanek, linux-kernel, dri-devel


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

Hi

Am 15.06.23 um 15:03 schrieb Linux regression tracking (Thorsten Leemhuis):
> On 16.04.23 14:34, Salvatore Bonaccorso wrote:
>>
>> On Wed, Apr 12, 2023 at 11:55:08AM +0200, Cyril Brulebois wrote:
>>> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
>>> as spotted by Frédéric Bonnard, the historical "of-display" device is
>>> gone: the updated logic creates "of-display.0" instead, then as many
>>> "of-display.N" as required.
>>>
>>> This means that offb no longer finds the expected device, which prevents
>>> the Debian Installer from setting up its interface, at least on ppc64el.
>>>
>>> It might be better to iterate on all possible nodes, but updating the
>>> hardcoded device from "of-display" to "of-display.0" is confirmed to fix
>>> the Debian Installer at the very least.
>> [...]
>> #regzbot ^introduced 241d2fb56a18
>> #regzbot title: Open Firmware framebuffer cannot find of-display
>> #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
>> #regzbot link: https://lore.kernel.org/all/20230412095509.2196162-1-cyril@debamax.com/T/#m34493480243a2cad2ae359abfd9db5e755f41add
>> #regzbot link: https://bugs.debian.org/1033058
> 
> No reply to my status inquiry[1] a few weeks ago, so I have to assume
> nobody cares anymore. If somebody still cares, holler!

I'd take a look if anyone can point me to an example of Geert's proposal.

Best regards
Thomas

> 
> #regzbot inconclusive: no answer to a status inquiry
> #regzbot ignore-activity
> 
> [1]
> https://lore.kernel.org/lkml/d1aee7d3-05f6-0920-b8e1-4ed5cf3f9f70@leemhuis.info/
> 
> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
> --
> Everything you wanna know about Linux kernel regression tracking:
> https://linux-regtracking.leemhuis.info/about/#tldr
> If I did something stupid, please tell me, as explained on that page.

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

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

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-15 13:03     ` Linux regression tracking (Thorsten Leemhuis)
  2023-06-15 13:06       ` Thomas Zimmermann
@ 2023-06-15 13:12       ` Cyril Brulebois
  1 sibling, 0 replies; 21+ messages in thread
From: Cyril Brulebois @ 2023-06-15 13:12 UTC (permalink / raw)
  To: Linux regressions mailing list
  Cc: linux-fbdev, linux-kernel, dri-devel, stable, Thomas Zimmermann,
	Michal Suchanek, Salvatore Bonaccorso

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

Linux regression tracking (Thorsten Leemhuis) <regressions@leemhuis.info> (2023-06-15):
> No reply to my status inquiry[1] a few weeks ago, so I have to assume
> nobody cares anymore. If somebody still cares, holler!

I still care about a proper bugfix, for upstream and for the Debian
distribution, and so does Salvatore. But fixing kernel regressions isn't
my day job, so I haven't got around to working on it.


Cheers,
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-15 13:06       ` Thomas Zimmermann
@ 2023-06-15 13:21         ` Michal Suchánek
  2023-06-15 20:09           ` Rob Herring
  0 siblings, 1 reply; 21+ messages in thread
From: Michal Suchánek @ 2023-06-15 13:21 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: linux-fbdev, Linux regressions mailing list, linux-kernel,
	dri-devel, Cyril Brulebois, stable, Salvatore Bonaccorso

Hello,

On Thu, Jun 15, 2023 at 03:06:28PM +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 15.06.23 um 15:03 schrieb Linux regression tracking (Thorsten Leemhuis):
> > On 16.04.23 14:34, Salvatore Bonaccorso wrote:
> > > 
> > > On Wed, Apr 12, 2023 at 11:55:08AM +0200, Cyril Brulebois wrote:
> > > > Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> > > > as spotted by Frédéric Bonnard, the historical "of-display" device is
> > > > gone: the updated logic creates "of-display.0" instead, then as many
> > > > "of-display.N" as required.
> > > > 
> > > > This means that offb no longer finds the expected device, which prevents
> > > > the Debian Installer from setting up its interface, at least on ppc64el.
> > > > 
> > > > It might be better to iterate on all possible nodes, but updating the
> > > > hardcoded device from "of-display" to "of-display.0" is confirmed to fix
> > > > the Debian Installer at the very least.

At the time this was proposed it was said that "of-display", is wrong,
and that "of-display.0" must be used for the first device instead, and
if something breaks an alias can be provided.

So how does one provide an alias so that offb can find "of-display.0" as
"of-display"?

Thanks

Michal

> > > [...]
> > > #regzbot ^introduced 241d2fb56a18
> > > #regzbot title: Open Firmware framebuffer cannot find of-display
> > > #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> > > #regzbot link: https://lore.kernel.org/all/20230412095509.2196162-1-cyril@debamax.com/T/#m34493480243a2cad2ae359abfd9db5e755f41add
> > > #regzbot link: https://bugs.debian.org/1033058
> > 
> > No reply to my status inquiry[1] a few weeks ago, so I have to assume
> > nobody cares anymore. If somebody still cares, holler!
> 
> I'd take a look if anyone can point me to an example of Geert's proposal.
> 
> Best regards
> Thomas
> 
> > 
> > #regzbot inconclusive: no answer to a status inquiry
> > #regzbot ignore-activity
> > 
> > [1]
> > https://lore.kernel.org/lkml/d1aee7d3-05f6-0920-b8e1-4ed5cf3f9f70@leemhuis.info/
> > 
> > Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
> > --
> > Everything you wanna know about Linux kernel regression tracking:
> > https://linux-regtracking.leemhuis.info/about/#tldr
> > If I did something stupid, please tell me, as explained on that page.
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstrasse 146, 90461 Nuernberg, Germany
> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
> HRB 36809 (AG Nuernberg)




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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-15 13:21         ` Michal Suchánek
@ 2023-06-15 20:09           ` Rob Herring
  2023-06-15 21:19             ` Cyril Brulebois
  0 siblings, 1 reply; 21+ messages in thread
From: Rob Herring @ 2023-06-15 20:09 UTC (permalink / raw)
  To: Michal Suchánek
  Cc: linux-fbdev, Linux regressions mailing list, linux-kernel,
	dri-devel, Cyril Brulebois, stable, Thomas Zimmermann,
	Salvatore Bonaccorso

On Thu, Jun 15, 2023 at 03:21:07PM +0200, Michal Suchánek wrote:
> Hello,
> 
> On Thu, Jun 15, 2023 at 03:06:28PM +0200, Thomas Zimmermann wrote:
> > Hi
> > 
> > Am 15.06.23 um 15:03 schrieb Linux regression tracking (Thorsten Leemhuis):
> > > On 16.04.23 14:34, Salvatore Bonaccorso wrote:
> > > > 
> > > > On Wed, Apr 12, 2023 at 11:55:08AM +0200, Cyril Brulebois wrote:
> > > > > Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> > > > > as spotted by Frédéric Bonnard, the historical "of-display" device is
> > > > > gone: the updated logic creates "of-display.0" instead, then as many
> > > > > "of-display.N" as required.
> > > > > 
> > > > > This means that offb no longer finds the expected device, which prevents
> > > > > the Debian Installer from setting up its interface, at least on ppc64el.
> > > > > 
> > > > > It might be better to iterate on all possible nodes, but updating the
> > > > > hardcoded device from "of-display" to "of-display.0" is confirmed to fix
> > > > > the Debian Installer at the very least.
> 
> At the time this was proposed it was said that "of-display", is wrong,
> and that "of-display.0" must be used for the first device instead, and
> if something breaks an alias can be provided.
> 
> So how does one provide an alias so that offb can find "of-display.0" as
> "of-display"?

I'm not aware of any way. There isn't because device names and paths are 
not considered ABI. There are mechanisms for getting stable class device 
indices (e.g. i2c0, mmcblk0, fb0, fb1, etc.) though not implemented for 
fbN (and please don't add it). 

In any case, this should be an easy fix. Though if "linux,opened" or 
"linux,boot-display" is not set, then you'd still get "of-display.0":

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 78ae84187449..e46482cef9c7 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -553,7 +553,7 @@ static int __init of_platform_default_populate_init(void)
                        if (!of_get_property(node, "linux,opened", NULL) ||
                            !of_get_property(node, "linux,boot-display", NULL))
                                continue;
-                       dev = of_platform_device_create(node, "of-display.0", NULL);
+                       dev = of_platform_device_create(node, "of-display", NULL);
                        of_node_put(node);
                        if (WARN_ON(!dev))
                                return -ENOMEM;

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-15 20:09           ` Rob Herring
@ 2023-06-15 21:19             ` Cyril Brulebois
  2023-06-20  6:24               ` Helge Deller
  0 siblings, 1 reply; 21+ messages in thread
From: Cyril Brulebois @ 2023-06-15 21:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-fbdev, Linux regressions mailing list, linux-kernel,
	dri-devel, stable, Thomas Zimmermann, Michal Suchánek,
	Salvatore Bonaccorso

[-- Attachment #1: Type: text/plain, Size: 2614 bytes --]

Hi Rob,

Rob Herring <robh@kernel.org> (2023-06-15):
> On Thu, Jun 15, 2023 at 03:21:07PM +0200, Michal Suchánek wrote:
> > At the time this was proposed it was said that "of-display", is wrong,
> > and that "of-display.0" must be used for the first device instead, and
> > if something breaks an alias can be provided.
> > 
> > So how does one provide an alias so that offb can find "of-display.0"
> > as "of-display"?
> 
> I'm not aware of any way. There isn't because device names and paths are 
> not considered ABI. There are mechanisms for getting stable class device 
> indices (e.g. i2c0, mmcblk0, fb0, fb1, etc.) though not implemented for 
> fbN (and please don't add it). 
> 
> In any case, this should be an easy fix. Though if "linux,opened" or 
> "linux,boot-display" is not set, then you'd still get "of-display.0":
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 78ae84187449..e46482cef9c7 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -553,7 +553,7 @@ static int __init of_platform_default_populate_init(void)
>                         if (!of_get_property(node, "linux,opened", NULL) ||
>                             !of_get_property(node, "linux,boot-display", NULL))
>                                 continue;
> -                       dev = of_platform_device_create(node, "of-display.0", NULL);
> +                       dev = of_platform_device_create(node, "of-display", NULL);
>                         of_node_put(node);
>                         if (WARN_ON(!dev))
>                                 return -ENOMEM;

I've just replaced my clueless workaround with this patch on top of the
kernel found in Debian 12 (Bookworm), i.e. 6.1.27 at this point, and it
indeed fixes the black screen problem in the installer's context.

I didn't run a full installation to check whether this kernel is also fine
after rebooting into the installed system, but as far as I understood for
the original bug report[1], it wasn't affected in the first place.

 1. https://bugs.debian.org/1033058

Will somebody else pick up the torch from here, and submit that for
inclusion in master? Or should I re-submit the above patch on my own?

I see my Debian colleagues have already pushed an updated v6.4-rc6 in
experimental, so it should be rather easy to combine checking latest
master with the distribution's packaging. Once that's done, I'm quite
familiar with building an updated installer image on top of it…


Thanks,
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-15 21:19             ` Cyril Brulebois
@ 2023-06-20  6:24               ` Helge Deller
  2023-06-20  8:04                 ` Michal Suchánek
  0 siblings, 1 reply; 21+ messages in thread
From: Helge Deller @ 2023-06-20  6:24 UTC (permalink / raw)
  To: Cyril Brulebois, Rob Herring
  Cc: linux-fbdev, Linux regressions mailing list, linux-kernel,
	dri-devel, stable, Thomas Zimmermann, Michal Suchánek,
	Salvatore Bonaccorso

On 6/15/23 23:19, Cyril Brulebois wrote:
> Hi Rob,
>
> Rob Herring <robh@kernel.org> (2023-06-15):
>> On Thu, Jun 15, 2023 at 03:21:07PM +0200, Michal Suchánek wrote:
>>> At the time this was proposed it was said that "of-display", is wrong,
>>> and that "of-display.0" must be used for the first device instead, and
>>> if something breaks an alias can be provided.
>>>
>>> So how does one provide an alias so that offb can find "of-display.0"
>>> as "of-display"?
>>
>> I'm not aware of any way. There isn't because device names and paths are
>> not considered ABI. There are mechanisms for getting stable class device
>> indices (e.g. i2c0, mmcblk0, fb0, fb1, etc.) though not implemented for
>> fbN (and please don't add it).
>>
>> In any case, this should be an easy fix. Though if "linux,opened" or
>> "linux,boot-display" is not set, then you'd still get "of-display.0":
>>
>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>> index 78ae84187449..e46482cef9c7 100644
>> --- a/drivers/of/platform.c
>> +++ b/drivers/of/platform.c
>> @@ -553,7 +553,7 @@ static int __init of_platform_default_populate_init(void)
>>                          if (!of_get_property(node, "linux,opened", NULL) ||
>>                              !of_get_property(node, "linux,boot-display", NULL))
>>                                  continue;
>> -                       dev = of_platform_device_create(node, "of-display.0", NULL);
>> +                       dev = of_platform_device_create(node, "of-display", NULL);
>>                          of_node_put(node);
>>                          if (WARN_ON(!dev))
>>                                  return -ENOMEM;

Michal, does that patch look correct?
I don't have that hardware, but that way the boot-display gets named
"of-display" while all others get "of-display.x"....

> I've just replaced my clueless workaround with this patch on top of the
> kernel found in Debian 12 (Bookworm), i.e. 6.1.27 at this point, and it
> indeed fixes the black screen problem in the installer's context.

... at least it fixes the issue.

> I didn't run a full installation to check whether this kernel is also fine
> after rebooting into the installed system, but as far as I understood for
> the original bug report[1], it wasn't affected in the first place.
>
>   1. https://bugs.debian.org/1033058
>
> Will somebody else pick up the torch from here, and submit that for
> inclusion in master? Or should I re-submit the above patch on my own?

It would be good to get some more feedback, but in general if you
or Rob send me a patch I can include it in the fbdev git tree for futher
testing (and if nobody else disagrees).

Helge

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-06-20  6:24               ` Helge Deller
@ 2023-06-20  8:04                 ` Michal Suchánek
  0 siblings, 0 replies; 21+ messages in thread
From: Michal Suchánek @ 2023-06-20  8:04 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-fbdev, Linux regressions mailing list, linux-kernel,
	dri-devel, Cyril Brulebois, stable, Thomas Zimmermann,
	Salvatore Bonaccorso

On Tue, Jun 20, 2023 at 08:24:34AM +0200, Helge Deller wrote:
> On 6/15/23 23:19, Cyril Brulebois wrote:
> > Hi Rob,
> > 
> > Rob Herring <robh@kernel.org> (2023-06-15):
> > > On Thu, Jun 15, 2023 at 03:21:07PM +0200, Michal Suchánek wrote:
> > > > At the time this was proposed it was said that "of-display", is wrong,
> > > > and that "of-display.0" must be used for the first device instead, and
> > > > if something breaks an alias can be provided.
> > > > 
> > > > So how does one provide an alias so that offb can find "of-display.0"
> > > > as "of-display"?
> > > 
> > > I'm not aware of any way. There isn't because device names and paths are
> > > not considered ABI. There are mechanisms for getting stable class device
> > > indices (e.g. i2c0, mmcblk0, fb0, fb1, etc.) though not implemented for
> > > fbN (and please don't add it).
> > > 
> > > In any case, this should be an easy fix. Though if "linux,opened" or
> > > "linux,boot-display" is not set, then you'd still get "of-display.0":
> > > 
> > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> > > index 78ae84187449..e46482cef9c7 100644
> > > --- a/drivers/of/platform.c
> > > +++ b/drivers/of/platform.c
> > > @@ -553,7 +553,7 @@ static int __init of_platform_default_populate_init(void)
> > >                          if (!of_get_property(node, "linux,opened", NULL) ||
> > >                              !of_get_property(node, "linux,boot-display", NULL))
> > >                                  continue;
> > > -                       dev = of_platform_device_create(node, "of-display.0", NULL);
> > > +                       dev = of_platform_device_create(node, "of-display", NULL);
> > >                          of_node_put(node);
> > >                          if (WARN_ON(!dev))
> > >                                  return -ENOMEM;
> 
> Michal, does that patch look correct?
> I don't have that hardware, but that way the boot-display gets named
> "of-display" while all others get "of-display.x"....

Yes, that's inconsistent, and IIRC it's what I originally proposed to
preserve compatibility as much as possible.

The patch went through multiple iteration by me and Rob and the final
version that was merged uses the consistent but incompatible naming.

The other option would be to adapt the offb driver, presumably.

I don't understand how the device name figures in attaching the driver
to the device, the only other occurence of of-display is the name of the
offb and ofdrm drivers.

> > I've just replaced my clueless workaround with this patch on top of the
> > kernel found in Debian 12 (Bookworm), i.e. 6.1.27 at this point, and it
> > indeed fixes the black screen problem in the installer's context.
> 
> ... at least it fixes the issue.

I would expect as much. I don't have the hardware either but keeping
what was there before, and only adding on top is kind of the least
disruptive way of adding new stuff.

Thanks

Michal

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

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
                     ` (2 preceding siblings ...)
  2023-04-24  7:31   ` Geert Uytterhoeven
@ 2023-07-10 16:36   ` Michal Suchánek
  3 siblings, 0 replies; 21+ messages in thread
From: Michal Suchánek @ 2023-07-10 16:36 UTC (permalink / raw)
  To: Cyril Brulebois
  Cc: linux-fbdev, linux-kernel, stable, dri-devel, Thomas Zimmermann

On Wed, Apr 12, 2023 at 11:55:08AM +0200, Cyril Brulebois wrote:
> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> as spotted by Frédéric Bonnard, the historical "of-display" device is
> gone: the updated logic creates "of-display.0" instead, then as many
> "of-display.N" as required.
> 
> This means that offb no longer finds the expected device, which prevents
> the Debian Installer from setting up its interface, at least on ppc64el.
> 
> It might be better to iterate on all possible nodes, but updating the
> hardcoded device from "of-display" to "of-display.0" is confirmed to fix
> the Debian Installer at the very least.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> Link: https://bugs.debian.org/1033058
> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cyril Brulebois <cyril@debamax.com>
Reviewed-by: Michal Suchánek <msuchanek@suse.de>

Thanks

Michal
> ---
>  drivers/video/fbdev/offb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index b97d251d894b..6264c7184457 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(of, offb_of_match_display);
>  
>  static struct platform_driver offb_driver_display = {
>  	.driver = {
> -		.name = "of-display",
> +		.name = "of-display.0",
>  		.of_match_table = offb_of_match_display,
>  	},
>  	.probe = offb_probe_display,
> -- 
> 2.30.2
> 

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

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
  2023-04-12  9:55 ` [PATCH 2/2] drm/ofdrm: " Cyril Brulebois
  2023-04-24  7:33   ` Geert Uytterhoeven
@ 2023-07-10 16:36   ` Michal Suchánek
  1 sibling, 0 replies; 21+ messages in thread
From: Michal Suchánek @ 2023-07-10 16:36 UTC (permalink / raw)
  To: Cyril Brulebois
  Cc: linux-fbdev, linux-kernel, stable, dri-devel, Thomas Zimmermann

On Wed, Apr 12, 2023 at 11:55:09AM +0200, Cyril Brulebois wrote:
> Since commit 241d2fb56a18 ("of: Make OF framebuffer device names unique"),
> as spotted by Frédéric Bonnard, the historical "of-display" device is
> gone: the updated logic creates "of-display.0" instead, then as many
> "of-display.N" as required.
> 
> This means that offb no longer finds the expected device, which prevents
> the Debian Installer from setting up its interface, at least on ppc64el.
> 
> Given the code similarity it is likely to affect ofdrm in the same way.
> 
> It might be better to iterate on all possible nodes, but updating the
> hardcoded device from "of-display" to "of-display.0" is likely to help
> as a first step.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217328
> Link: https://bugs.debian.org/1033058
> Fixes: 241d2fb56a18 ("of: Make OF framebuffer device names unique")
> Cc: stable@vger.kernel.org # v6.2+
> Signed-off-by: Cyril Brulebois <cyril@debamax.com>
Reviewed-by: Michal Suchánek <msuchanek@suse.de>
> ---
>  drivers/gpu/drm/tiny/ofdrm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c
> index 6e349ca42485..92df021d71df 100644
> --- a/drivers/gpu/drm/tiny/ofdrm.c
> +++ b/drivers/gpu/drm/tiny/ofdrm.c
> @@ -1390,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, ofdrm_of_match_display);
>  
>  static struct platform_driver ofdrm_platform_driver = {
>  	.driver = {
> -		.name = "of-display",
> +		.name = "of-display.0",
>  		.of_match_table = ofdrm_of_match_display,
>  	},
>  	.probe = ofdrm_probe,
> -- 
> 2.30.2
> 

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

end of thread, other threads:[~2023-07-10 16:36 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12  9:55 Updating hardcoded "of-display" devices Cyril Brulebois
2023-04-12  9:55 ` [PATCH 1/2] fbdev/offb: Update expected device name Cyril Brulebois
2023-04-16 12:34   ` Salvatore Bonaccorso
2023-06-15 13:03     ` Linux regression tracking (Thorsten Leemhuis)
2023-06-15 13:06       ` Thomas Zimmermann
2023-06-15 13:21         ` Michal Suchánek
2023-06-15 20:09           ` Rob Herring
2023-06-15 21:19             ` Cyril Brulebois
2023-06-20  6:24               ` Helge Deller
2023-06-20  8:04                 ` Michal Suchánek
2023-06-15 13:12       ` Cyril Brulebois
2023-04-22  9:50   ` Helge Deller
2023-04-24  7:31   ` Geert Uytterhoeven
2023-07-10 16:36   ` Michal Suchánek
2023-04-12  9:55 ` [PATCH 2/2] drm/ofdrm: " Cyril Brulebois
2023-04-24  7:33   ` Geert Uytterhoeven
2023-04-24  9:07     ` Thomas Zimmermann
2023-04-24  9:35       ` Helge Deller
2023-05-22  9:37         ` Linux regression tracking (Thorsten Leemhuis)
2023-05-22 11:44       ` Michal Suchánek
2023-07-10 16:36   ` Michal Suchánek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).