drm/vc4: Support nomodeset
authorMaxime Ripard <maxime@cerno.tech>
Wed, 15 Dec 2021 09:51:15 +0000 (10:51 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 11 Jan 2022 12:16:11 +0000 (13:16 +0100)
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.

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

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20211215095117.176435-3-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_drv.c

index 16abc3a3d601ba9c514c333e04065891f3d827b7..d3cae84a4c4e519c76d34ee73b4a2d7c5fa7ef14 100644 (file)
@@ -357,6 +357,9 @@ static int __init vc4_drm_register(void)
 {
        int ret;
 
+       if (drm_firmware_drivers_only())
+               return -ENODEV;
+
        ret = platform_register_drivers(component_drivers,
                                        ARRAY_SIZE(component_drivers));
        if (ret)