From: Javier Martinez Canillas <javierm@redhat.com>
To: Andrew Worsley <amworsley@gmail.com>,
Thomas Zimmermann <tzimmermann@suse.de>
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
Sima Vetter <daniel.vetter@ffwll.ch>,
Rob Herring <robh@kernel.org>,
dri-devel@lists.freedesktop.org, Hector Martin <marcan@marcan.st>,
Sergio Lopez <slp@redhat.com>,
Frank Rowand <frowand.list@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [RFC PATCH] of/platform: Disable sysfb if a simple-framebuffer node is found
Date: Mon, 13 Nov 2023 13:57:16 +0100 [thread overview]
Message-ID: <8734x9steb.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <CA+Y=x3khfKx_oQYABMSCAPOEuDWyZ+MyTHK=JufH8fC-m6z7Xw@mail.gmail.com>
Andrew Worsley <amworsley@gmail.com> writes:
Hello Andrew,
> On Mon, 13 Nov 2023 at 20:18, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Am 13.11.23 um 09:51 schrieb Javier Martinez Canillas:
>> > Some DT platforms use EFI to boot and in this case the EFI Boot Services
>> > may register a EFI_GRAPHICS_OUTPUT_PROTOCOL handle, that will later be
>> > queried by the Linux EFI stub to fill the global struct screen_info data.
>> >
[...]
>
> I applied the patch and just the simpledrm driver is probed (the efifb is not):
>
> grep -i -E 'drm|efifb' --color -C3 dmesg-6.5.0-asahi-00780-gf5aadc85a34d.txt
> [ 2.621433] systemd-journald[276]: varlink-21: Changing state
> idle-server \xe2\x86\x92 pending-disconnect
> [ 2.621437] systemd-journald[276]: varlink-21: Changing state
> pending-disconnect \xe2\x86\x92 processing-disconnect
> [ 2.621439] systemd-journald[276]: varlink-21: Changing state
> processing-disconnect \xe2\x86\x92 disconnected
> [ 2.878828] [drm] Initialized simpledrm 1.0.0 20200625 for
> bd58dc000.framebuffer on minor 0
> [ 2.909764] Console: switching to colour frame buffer device 160x50
Great, thanks for testing. The patch works then as expected. Can I get
your Tested-by then ?
>
> I am wondering if the drm_aperture_remove_framebuffers() shouldn't be
> called in the probe function anyway
> as it ends up overriding the efifb one as wanted and handles the case
> the simpledrm (CONFIG_DRM_SIMPLEDRM)
> is not present.
> Perhaps there is an accepted principle that such kernels *should* fail
> to set up a FB?
>
We were talking with Thomas that the sysfb design seems to be reaching its
limits and need some rework but currently you either need some driver that
matches the "simple-framebuffer" device that is registered by OF or won't
get an early framebuffer in the system.
That could be either simpledrm or simplefb. But if a DT has a device node
for "simple-framebuffer", how can the OF core know if there is a driver to
match that device? And same for any other device defined in the DTB.
It's similar on platforms that use sysfb to register the device (e.g: x86)
since either "simple-framebuffer" is registered (if CONFIG_SYSFB_SIMPLEFB
is enabled) or "efi-framebuffer" (if CONFIG_SYSFB_SIMPLEFB is disabled).
That means CONFIG_SYSFB_SIMPLEFB=y and CONFIG_DRM_SIMPLEDRM disabled won't
work either, even if CONFIG_FB_EFI=y which is the case you are mentioning.
What I think that doesn't make sense is to remove conflicting framebuffers
from drivers that can only handle firmware provided framebuffers. As said
in the other thread, drm_aperture_remove_framebuffers() is only meant for
native DRM drivers.
> Andrew
>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2023-11-13 12:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 8:51 [RFC PATCH] of/platform: Disable sysfb if a simple-framebuffer node is found Javier Martinez Canillas
2023-11-13 9:18 ` Thomas Zimmermann
2023-11-13 12:35 ` Andrew Worsley
2023-11-13 12:57 ` Javier Martinez Canillas [this message]
2023-11-13 13:19 ` Andrew Worsley
2023-11-15 20:34 ` Rob Herring
2023-11-16 9:36 ` Javier Martinez Canillas
2023-11-16 14:09 ` Rob Herring
2023-11-16 14:30 ` Ard Biesheuvel
2023-11-18 11:10 ` Javier Martinez Canillas
2023-11-23 8:49 ` Thomas Zimmermann
2023-12-01 10:21 ` Javier Martinez Canillas
2023-12-01 14:16 ` Rob Herring
2023-12-04 9:39 ` Javier Martinez Canillas
2023-12-04 14:05 ` Rob Herring
2023-12-04 16:05 ` Javier Martinez Canillas
2023-12-07 17:30 ` Rob Herring
2023-12-07 23:39 ` Javier Martinez Canillas
2023-11-16 14:40 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734x9steb.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=amworsley@gmail.com \
--cc=ardb@kernel.org \
--cc=daniel.vetter@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=slp@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).