File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646#define PCI_DEVICE_ID_LOONGSON_DC2 0x7a36
4747
4848bool hw_cursor = false;
49+ bool poll_connector = false;
50+ int loongson_modeset = -1 ;
51+
4952module_param_named (cursor , hw_cursor , bool , 0600 );
5053
51- bool poll_connector = false;
5254module_param_named (poll , poll_connector , bool , 0600 );
5355
56+ MODULE_PARM_DESC (modeset , "Disable/Enable modesetting" );
57+ module_param_named (modeset , loongson_modeset , int , 0400 );
58+
5459DEFINE_SPINLOCK (loongson_reglock );
5560
5661static struct drm_driver loongson_drm_driver ;
@@ -611,6 +616,14 @@ static int __init loongson_drm_init(void)
611616 int ret ;
612617 struct pci_dev * pdev = NULL ;
613618
619+ if (drm_firmware_drivers_only () && loongson_modeset == -1 )
620+ loongson_modeset = 0 ;
621+
622+ if (loongson_modeset == 0 )
623+ return - EINVAL ;
624+
625+ DRM_INFO ("loongson kernel modesetting enabled.\n" );
626+
614627 /* If external graphics card exist, use it as default */
615628 while ((pdev = pci_get_class (PCI_CLASS_DISPLAY_VGA << 8 , pdev ))) {
616629 if (pdev -> vendor == PCI_VENDOR_ID_ATI )
You can’t perform that action at this time.
0 commit comments