Re: [PATCH RESEND v4 v4 2/4] drm/vc4: Support nomodeset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Am 14.12.21 um 09:30 schrieb Javier Martinez Canillas:
Hello Maxime

On Mon, Dec 13, 2021 at 5:26 PM Maxime Ripard <maxime@xxxxxxxxxx> wrote:

If we have nomodeset on the kernel command line we should have the
firmware framebuffer driver kept as is and not try to load the
full-blown KMS driver.


Patch looks good to me. I just have a question, but I'm OK with either way.

Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>

In this case, let's just register the v3d driver.


I wonder if the v3d driver should be registered if nomodeset is
present. Most (if not all?) drivers that currently check for this
parameter disable both KMS and DRM. So even when it seems to imply
that's about kernel mode settings, it is also used to disable DRM.

This semantic was never documented and I attempted to do that in
commit b22a15a5aca3 ("Documentation/admin-guide: Document nomodeset
kernel parameter"). After feedback from folks in the list, the text
ended as follows:

```
Disable kernel modesetting. DRM drivers will not perform
display-mode changes or accelerated rendering. Only the
system framebuffer will be available for use if this was
set-up by the firmware or boot loader.

Useful as fallback, or for testing and debugging.
```

So maybe vc4_drm_register() should just return -EINVAL if
(drm_firmware_drivers_only()) like the other drivers do?

I second this comment. The intention of this test is to disable HW-native drivers if something goes wrong with the display.

The function's name drm_firmware_drivers_only() reflects that. The parameter is called nomodeset for historical reasons and it's probably a terrible name.

So I think the code should call drm_firmware_drivers_only() at the top and return an error is it's true. That's what we will do for other drivers as well. Maybe rather return -ENODEV; EINVAL mean 'invalid argument'.

Best regards
Thomas



Best regards,
Javier


--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux