Commit af3db82a authored by Chong Qiao's avatar Chong Qiao Committed by Hongchen Zhang
Browse files

LoongArch: fix ls2k500 bmc not work when installing iso

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I76XQZ



--------------------------------

Signed-off-by: default avatarChong Qiao <qiaochong@loongson.cn>
Signed-off-by: default avatarHongchen Zhang <zhanghongchen@loongson.cn>
parent de03e517
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -19,6 +19,21 @@ module_param_named(vblank, loongson_vblank, int, 0400);

static int __init loongson_module_init(void)
{
	struct pci_dev *pdev = NULL;

	while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) {
		/*
		 * Multiple video card workaround
		 *
		 * This integrated video card will always be selected as
		 * default boot device by vgaarb subsystem.
		 */
		if (pdev->vendor != PCI_VENDOR_ID_LOONGSON || pdev->device == 0x1a05) {
			pr_info("Discrete graphic card detected, abort\n");
			return 0;
		}
	}

	if (!loongson_modeset || video_firmware_drivers_only())
		return -ENODEV;