Skip to content

Commit c48964b

Browse files
committed
drm: Add modeset parameter for LS7A Display-Controller driver
On the 7A2000 notebook, it is now possible to use the "nomodeset" parameter
1 parent 7a3907c commit c48964b

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

drivers/gpu/drm/loongson/loongson_drv.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,16 @@
4646
#define PCI_DEVICE_ID_LOONGSON_DC2 0x7a36
4747

4848
bool hw_cursor = false;
49+
bool poll_connector = false;
50+
int loongson_modeset = -1;
51+
4952
module_param_named(cursor, hw_cursor, bool, 0600);
5053

51-
bool poll_connector = false;
5254
module_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+
5459
DEFINE_SPINLOCK(loongson_reglock);
5560

5661
static 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)

0 commit comments

Comments
 (0)