Skip to content

Commit

Permalink
LoongArch: fix ls2k500 bmc not work when installing iso
Browse files Browse the repository at this point in the history
Signed-off-by: Chong Qiao <[email protected]>
Signed-off-by: Hongchen Zhang <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
  • Loading branch information
Yanteng Si committed May 16, 2024
1 parent fd225ea commit a7a407a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/gpu/drm/loongson/loongson_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a7a407a

Please sign in to comment.