diff mbox series

[RESEND,v4,v5,2/4] drm/vc4: Support nomodeset

Message ID 20211215095117.176435-3-maxime@cerno.tech (mailing list archive)
State New, archived
Headers show
Series drm/vc4: Use the firmware to stop the display pipeline | expand

Commit Message

Maxime Ripard Dec. 15, 2021, 9:51 a.m. UTC
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>
---
 drivers/gpu/drm/vc4/vc4_drv.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thomas Zimmermann Dec. 15, 2021, 10:08 a.m. UTC | #1
Hi

Am 15.12.21 um 10:51 schrieb Maxime Ripard:
> 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>
> ---
>   drivers/gpu/drm/vc4/vc4_drv.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
> index 16abc3a3d601..d3cae84a4c4e 100644
> --- a/drivers/gpu/drm/vc4/vc4_drv.c
> +++ b/drivers/gpu/drm/vc4/vc4_drv.c
> @@ -357,6 +357,9 @@ static int __init vc4_drm_register(void)
>   {
>   	int ret;
>   
> +	if (drm_firmware_drivers_only())
> +		return -ENODEV;
> +

Just now that you've updated it, Lucas Stach had a similar concern about 
etnaviv, which doesn't do modesetting either. So we probably want to 
discuss what to do about drivers that have no modesetting separately.

If you want to land the patch, for either version of the code, with or 
without vc3:

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Best regard
Thomas

>   	ret = platform_register_drivers(component_drivers,
>   					ARRAY_SIZE(component_drivers));
>   	if (ret)
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 16abc3a3d601..d3cae84a4c4e 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -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)