From: Javier Martinez Canillas <javierm@redhat.com>
To: Andrew Worsley <amworsley@gmail.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
"open list:DRM DRIVER FOR FIRMWARE FRAMEBUFFERS"
<dri-devel@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix failure of simpledrm probe when trying to grab FB from the EFI-based Framebuffer
Date: Sat, 11 Nov 2023 10:10:44 +0100 [thread overview]
Message-ID: <87cywgac4r.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <CA+Y=x3mF4jFX7PiJQ-1Gk9zyBE1mwZaF_GLYjSspT+mxtMn4GQ@mail.gmail.com>
Andrew Worsley <amworsley@gmail.com> writes:
> It's inline - part of the email - not an attachment?
>
> I can see it in the copy that went to me...
>
> Andrew
>
> On Sat, 11 Nov 2023 at 15:30, Andrew Worsley <amworsley@gmail.com> wrote:
>>
>> The simpledrm.c does not call aperture_remove_conflicting_devices() in it's probe
>> function as the drivers/video/aperture.c documentation says it should. Consequently
>> it's request for the FB memory fails.
>>
The current behaviour is correct since aperture_remove_conflicting_devices()
is for native drivers to remove simple framebuffer devices such as simpledrm,
simplefb, efifb, etc.
>> ...
>> [ 3.085302] simple-framebuffer bd58dc000.framebuffer: [drm] *ERROR* could not acquire memory range [??? 0xffff6e1d8629d580-0x2a5000001a7 flags 0x0]: -16
>> [ 3.086433] simple-framebuffer: probe of bd58dc000.framebuffer failed with error -16
>> ...
>>
This is -EBUSY. What is your kernel configuration? Can you share it please.
>> In my case no driver provided /dev/dri/card0 device is available on boot up and X
>> fails to start as per this from X start up log.
>>
>> ...
>> [ 5.616] (WW) Falling back to old probe method for modesetting
>> [ 5.616] (EE) open /dev/dri/card0: No such file or directory
>> ...
>>
>> Fault confirmed and fixed on Asahi 6.5.0 kernel with both CONFIG_FB_EFI and
>> CONFIG_DRM_SIMPLEDRM config options set.
>>
>> Signed-off-by: Andrew Worsley <amworsley@gmail.com>
>> ---
I wonder if this is anothe side effect of commit 60aebc955949
("drivers/firmware: Move sysfb_init() from device_initcall to
subsys_initcall_sync").
Can you try reverting that one and see if it helps?
>> drivers/gpu/drm/tiny/simpledrm.c | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
>> index 5fefc895bca2..e55a536b04cf 100644
>> --- a/drivers/gpu/drm/tiny/simpledrm.c
>> +++ b/drivers/gpu/drm/tiny/simpledrm.c
>> @@ -8,6 +8,7 @@
>> #include <linux/platform_device.h>
>> #include <linux/pm_domain.h>
>> #include <linux/regulator/consumer.h>
>> +#include <linux/aperture.h>
>>
>> #include <drm/drm_aperture.h>
>> #include <drm/drm_atomic.h>
>> @@ -828,6 +829,13 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
>> if (mem) {
>> void *screen_base;
>>
>> + ret = aperture_remove_conflicting_devices(mem->start, resource_size(mem),
>> + DRIVER_NAME);
>> + if (ret) {
DRM drivers should use drm_aperture_remove_framebuffers() instead. But
this shouldn't be needed for the simpledrm driver as mentioned, since
there shouldn't be another device grabbing this aperture at this point.
I would rather try to understand what is going on in your setup and why
the acquire is returning -EBUSY.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2023-11-11 9:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 4:21 Andrew Worsley
2023-11-11 4:21 ` [PATCH] Fix failure of simpledrm probe when trying to grab FB from the EFI-based Framebuffer Andrew Worsley
2023-11-11 8:31 ` Andrew Worsley
2023-11-11 8:46 ` Javier Martinez Canillas
2023-11-11 9:10 ` Javier Martinez Canillas [this message]
2023-11-11 10:21 ` Andrew Worsley
2023-11-12 10:35 ` Javier Martinez Canillas
2023-11-12 13:27 ` [PATCH] of/platform: Disable sysfb if a simple-framebuffer node is kernel test robot
2023-11-12 14:41 ` kernel test robot
2023-11-12 15:49 ` [PATCH] Fix failure of simpledrm probe when trying to grab FB from the EFI-based Framebuffer Javier Martinez Canillas
2023-11-13 8:39 ` Thomas Zimmermann
2023-11-11 8:22 ` 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=87cywgac4r.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=amworsley@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--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).