linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	daniel@ffwll.ch, javierm@redhat.com
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] fbdev: Add support for the nomodeset kernel parameter
Date: Mon, 7 Nov 2022 14:57:26 +0100	[thread overview]
Message-ID: <2e2d23f3-9c2d-e75e-f390-4651a4da730f@gmx.de> (raw)
In-Reply-To: <20221107104916.18733-3-tzimmermann@suse.de>

On 11/7/22 11:49, Thomas Zimmermann wrote:
> Support the kernel's nomodeset parameter for all PCI-based fbdev
> drivers that use aperture helpers to remove other, hardware-agnostic
> graphics drivers.
>
> The parameter is a simple way of using the firmware-provided scanout
> buffer if the hardware's native driver is broken.

Nah... it's probably not broken, but you want it disabled in order
to use the DRM driver instead?

> The same effect
> could be achieved with per-driver options, but the importance of the
> graphics output for many users makes a single, unified approach
> worthwhile.
>
> With nomodeset specified, the fbdev driver module will not load. This
> unifies behavior with similar DRM drivers. In DRM helpers, modules
> first check the nomodeset parameter before registering the PCI
> driver. As fbdev has no such module helpers, we have to modify each
> driver individually.

Ok.

> The name 'nomodeset' is slightly misleading, but has been chosen for
> historical reasons. Several drivers implemented it before it became a
> general option for DRM. So keeping the existing name was preferred over
> introducing a new one.

> diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
> index 57e398fe7a81c..1a26ac2865d65 100644
> --- a/drivers/video/fbdev/aty/aty128fb.c
> +++ b/drivers/video/fbdev/aty/aty128fb.c
> @@ -2503,7 +2504,12 @@ static int aty128fb_init(void)
>   {
>   #ifndef MODULE
>   	char *option = NULL;
> +#endif
> +
> +	if (video_firmware_drivers_only())
> +		return -ENODEV;

I think it makes sense to give at least some info, why a specific
driver wasn't loaded, e.g. something like this kernel message:
aty128fb: Driver disabled due to "nomodeset" kernel parameter.

If you e.g. change the function video_firmware_drivers_only()
to become video_firmware_drivers_only(const char *drivername)
then you could print such a message in video_firmware_drivers_only().

And I don't like very much the name of function video_firmware_drivers_only(),
but don't have any other better idea right now either...

Helge

  reply	other threads:[~2022-11-07 13:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 10:49 [PATCH 0/2] video/fbdev: Support 'nomodeset' in PCI drivers Thomas Zimmermann
2022-11-07 10:49 ` [PATCH 1/2] drm: Move nomodeset kernel parameter to drivers/video Thomas Zimmermann
2022-11-11  9:28   ` Javier Martinez Canillas
2022-11-11 12:37     ` Thomas Zimmermann
2022-11-11 13:06     ` Thomas Zimmermann
2022-11-07 10:49 ` [PATCH 2/2] fbdev: Add support for the nomodeset kernel parameter Thomas Zimmermann
2022-11-07 13:57   ` Helge Deller [this message]
2022-11-07 15:30     ` Thomas Zimmermann
2022-11-07 20:46       ` Helge Deller
2022-11-08  8:16         ` Thomas Zimmermann
2022-11-11  9:49           ` Javier Martinez Canillas
2022-11-11 10:49             ` Helge Deller
2022-11-11 11:42               ` Thomas Zimmermann
2022-11-11 13:27                 ` Helge Deller
2022-11-11  9:42   ` 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=2e2d23f3-9c2d-e75e-f390-4651a4da730f@gmx.de \
    --to=deller@gmx.de \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.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).