regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] fbdev/offb: Update expected device name
       [not found] ` <20230412095509.2196162-2-cyril@debamax.com>
@ 2023-04-16 12:34   ` Salvatore Bonaccorso
  2023-06-15 13:03     ` Linux regression tracking (Thorsten Leemhuis)
  0 siblings, 1 reply; 10+ messages in thread
From: Salvatore Bonaccorso @ 2023-04-16 12:34 UTC (permalink / raw)
  To: Cyril Brulebois, regressions
  Cc: linux-fbdev, dri-devel, Thomas Zimmermann, Rob Herring,
	Michal Suchanek, linux-kernel, stable

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] 10+ messages in thread

* Re: [PATCH 2/2] drm/ofdrm: Update expected device name
       [not found]       ` <10077a22-3055-75dd-2168-310468618f99@gmx.de>
@ 2023-05-22  9:37         ` Linux regression tracking (Thorsten Leemhuis)
  0 siblings, 0 replies; 10+ 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, dri-devel, Rob Herring, Michal Suchanek,
	linux-kernel, stable,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux kernel regressions list

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] 10+ messages in thread

* Re: [PATCH 1/2] fbdev/offb: Update expected device name
  2023-04-16 12:34   ` [PATCH 1/2] fbdev/offb: Update expected device name 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; 10+ 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, dri-devel, Thomas Zimmermann, Rob Herring,
	Michal Suchanek, linux-kernel, stable

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] 10+ 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; 10+ messages in thread
From: Thomas Zimmermann @ 2023-06-15 13:06 UTC (permalink / raw)
  To: Linux regressions mailing list, Salvatore Bonaccorso, Cyril Brulebois
  Cc: linux-fbdev, linux-kernel, dri-devel, stable, Michal Suchanek


[-- 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] 10+ 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; 10+ messages in thread
From: Cyril Brulebois @ 2023-06-15 13:12 UTC (permalink / raw)
  To: Linux regressions mailing list
  Cc: Salvatore Bonaccorso, linux-fbdev, dri-devel, Thomas Zimmermann,
	Rob Herring, Michal Suchanek, linux-kernel, stable

[-- 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] 10+ 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; 10+ messages in thread
From: Michal Suchánek @ 2023-06-15 13:21 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: Linux regressions mailing list, Salvatore Bonaccorso,
	Cyril Brulebois, linux-fbdev, linux-kernel, dri-devel, stable

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] 10+ 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; 10+ messages in thread
From: Rob Herring @ 2023-06-15 20:09 UTC (permalink / raw)
  To: Michal Suchánek
  Cc: Thomas Zimmermann, Linux regressions mailing list,
	Salvatore Bonaccorso, Cyril Brulebois, linux-fbdev, linux-kernel,
	dri-devel, stable

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] 10+ 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; 10+ messages in thread
From: Cyril Brulebois @ 2023-06-15 21:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: Michal Suchánek, Thomas Zimmermann,
	Linux regressions mailing list, Salvatore Bonaccorso,
	linux-fbdev, linux-kernel, dri-devel, stable

[-- 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] 10+ 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; 10+ messages in thread
From: Helge Deller @ 2023-06-20  6:24 UTC (permalink / raw)
  To: Cyril Brulebois, Rob Herring
  Cc: Michal Suchánek, Thomas Zimmermann,
	Linux regressions mailing list, Salvatore Bonaccorso,
	linux-fbdev, linux-kernel, dri-devel, stable

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] 10+ 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; 10+ messages in thread
From: Michal Suchánek @ 2023-06-20  8:04 UTC (permalink / raw)
  To: Helge Deller
  Cc: Cyril Brulebois, Rob Herring, Thomas Zimmermann,
	Linux regressions mailing list, Salvatore Bonaccorso,
	linux-fbdev, linux-kernel, dri-devel, stable

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] 10+ messages in thread

end of thread, other threads:[~2023-06-20  8:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230412095509.2196162-1-cyril@debamax.com>
     [not found] ` <20230412095509.2196162-2-cyril@debamax.com>
2023-04-16 12:34   ` [PATCH 1/2] fbdev/offb: Update expected device name 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
     [not found] ` <20230412095509.2196162-3-cyril@debamax.com>
     [not found]   ` <CAMuHMdW4rZn4p=gQZRWQQSEbQPmzZUd5eN+kP_Yr7bLgTHyvig@mail.gmail.com>
     [not found]     ` <5694a9ab-d474-c101-9398-eea55aab29df@suse.de>
     [not found]       ` <10077a22-3055-75dd-2168-310468618f99@gmx.de>
2023-05-22  9:37         ` [PATCH 2/2] drm/ofdrm: " Linux regression tracking (Thorsten Leemhuis)

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