From: Javier Martinez Canillas <javierm@redhat.com>
To: "Michel Dänzer" <michel@daenzer.net>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>,
Peter Robinson <pbrobinson@gmail.com>,
Neal Gompa <ngompa13@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
David Airlie <airlied@linux.ie>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH] drm/aperture: Add param to disable conflicting framebuffers removal
Date: Mon, 25 Oct 2021 14:28:54 +0200 [thread overview]
Message-ID: <f3c9f2e5-73f7-e7c9-dc97-8bfa7b294b0b@redhat.com> (raw)
In-Reply-To: <931230b4-1e73-948d-abaf-f1d62ea58239@daenzer.net>
Hello Michel,
On 10/25/21 12:45, Michel Dänzer wrote:
> On 2021-10-24 22:32, Javier Martinez Canillas wrote:
>> Hello Ville,
>>
>> On 10/22/21 21:12, Ville Syrjälä wrote:
>>> On Fri, Oct 22, 2021 at 04:40:40PM +0200, Javier Martinez Canillas wrote:
>>>> The simpledrm driver allows to use the frame buffer that was set-up by the
>>>> firmware. This gives early video output before the platform DRM driver is
>>>> probed and takes over.
>>>>
>>>> But it would be useful to have a way to disable this take over by the real
>>>> DRM drivers. For example, there may be bugs in the DRM drivers that could
>>>> cause the display output to not work correctly.
>>>>
>>>> For those cases, it would be good to keep the simpledrm driver instead and
>>>> at least get a working display as set-up by the firmware.
>>>>
>>>> Let's add a drm.remove_fb boolean kernel command line parameter, that when
>>>> set to false will prevent the conflicting framebuffers to being removed.
>>>>
>>>> Since the drivers call drm_aperture_remove_conflicting_framebuffers() very
>>>> early in their probe callback, this will cause the drivers' probe to fail.
>>>
>>> Why is that better than just modprobe.blacklisting those drivers?
>>
>> Because would allow to deny list all native (as Thomas called it) DRM drivers
>> and only allow the simpledrm driver to be probed. This is useful for distros,
>> since could add a "Basic graphics mode" to the boot menu entries, that could
>> boot the kernel passing a "drm.disable_native_drivers=1" cmdline option.
>>
>> That way, if there's any problem with a given DRM driver, the distro may be
>> installed and booted using the simpledrm driver and troubleshoot why a native
>> DRM driver is not working. Or try updating the kernel package, etc.
>
> For troubleshooting, it'll be helpful if this new parameter can be enabled for the boot via the kernel command line, then disabled again after boot-up. One simple possibility for this would be allowing the parameter to be changed via /sys/module
That's already the case with the current patch, i.e:
$ grep -o drm.* /proc/cmdline
drm.disable_native_drivers=1
$ cat /proc/fb
0 simpledrm
$ modprobe virtio_gpu
$ dmesg
[ 125.731549] [drm] pci: virtio-vga detected at 0000:00:01.0
[ 125.732410] virtio_gpu: probe of virtio0 failed with error -16
$ echo 0 > /sys/module/drm/parameters/disable_native_drivers
$ modprobe virtio_gpu
$ dmesg
[ 187.889136] [drm] pci: virtio-vga detected at 0000:00:01.0
[ 187.894578] Console: switching to colour dummy device 80x25
[ 187.897090] virtio-pci 0000:00:01.0: vgaarb: deactivate vga console
[ 187.899983] [drm] features: -virgl +edid -resource_blob -host_visible
[ 187.907176] [drm] number of scanouts: 1
[ 187.907714] [drm] number of cap sets: 0
[ 187.914108] [drm] Initialized virtio_gpu 0.1.0 0 for virtio0 on minor 1
[ 187.930807] Console: switching to colour frame buffer device 128x48
[ 187.938737] virtio_gpu virtio0: [drm] fb0: virtio_gpu frame buffer device
$ cat /proc/fb
0 virtio_gpu
/drm/parameters/<name>, which I suspect doesn't work with the patch as is (due to the 0600 permissions).
>
>
I followed the convention used by other drm module parameters, hence the
0600. Do you mean that for this parameter we should be less restrictive ?
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
next prev parent reply other threads:[~2021-10-25 12:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 14:40 [RFC PATCH] drm/aperture: Add param to disable conflicting framebuffers removal Javier Martinez Canillas
2021-10-22 14:56 ` Neal Gompa
2021-10-22 15:16 ` Javier Martinez Canillas
2021-10-22 15:18 ` Neal Gompa
2021-10-22 19:05 ` Thomas Zimmermann
2021-10-24 20:40 ` Javier Martinez Canillas
2021-10-24 20:43 ` Neal Gompa
2021-10-22 19:12 ` Ville Syrjälä
2021-10-24 20:32 ` Javier Martinez Canillas
2021-10-25 10:45 ` Michel Dänzer
2021-10-25 12:28 ` Javier Martinez Canillas [this message]
2021-10-25 12:36 ` Neal Gompa
2021-10-25 13:24 ` Michel Dänzer
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=f3c9f2e5-73f7-e7c9-dc97-8bfa7b294b0b@redhat.com \
--to=javierm@redhat.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=michel@daenzer.net \
--cc=mripard@kernel.org \
--cc=ngompa13@gmail.com \
--cc=pbrobinson@gmail.com \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@linux.intel.com \
/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