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

Signed-off-by: Ludovic Desroches <[email protected]>
Reviewed-by: Dharma Balasubiramani <[email protected]>
Reviewed-by: Manikandan Muralidharan <[email protected]>
---
 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

Reply via email to