1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Copyright (C) 2023 Loongson Technology Corporation Limited 4 */ 5 6 #include <linux/pci.h> 7 8 #include <video/nomodeset.h> 9 10 #include "loongson_module.h" 11 12 static int loongson_modeset = -1; 13 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); 14 module_param_named(modeset, loongson_modeset, int, 0400); 15 16 int loongson_vblank = 1; 17 MODULE_PARM_DESC(vblank, "Disable/Enable hw vblank support"); 18 module_param_named(vblank, loongson_vblank, int, 0400); 19 20 static int __init loongson_module_init(void) 21 { 22 if (!loongson_modeset || video_firmware_drivers_only()) 23 return -ENODEV; 24 25 return pci_register_driver(&lsdc_pci_driver); 26 } 27 module_init(loongson_module_init); 28 29 static void __exit loongson_module_exit(void) 30 { 31 pci_unregister_driver(&lsdc_pci_driver); 32 } 33 module_exit(loongson_module_exit); 34