[PATCH 2/8] drm/atmel-hlcdc: add support for the nomodeset kernel parameter

From: Ludovic Desroches

Date: Fri Nov 21 2025 - 10:06:28 EST


According to Documentation/admin-guide/kernel-parameters.txt, this
parameter can be used to disable kernel modesetting.

Signed-off-by: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>
Reviewed-by: Dharma Balasubiramani <dharma.b@xxxxxxxxxxxxx>
Reviewed-by: Manikandan Muralidharan <manikandan.m@xxxxxxxxxxxxx>
---
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index 8ed029381c555db10d596efc8d52753c47767633..8ff582a394794aacf84f9e23fd59f123445926a3 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -858,6 +858,9 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
struct drm_device *ddev;
int ret;

+ if (drm_firmware_drivers_only())
+ return -ENODEV;
+
dc = devm_drm_dev_alloc(&pdev->dev, &atmel_hlcdc_dc_driver, struct atmel_hlcdc_dc, dev);
if (IS_ERR(dc))
return PTR_ERR(dc);

--
2.51.0