From patchwork Tue Aug 1 18:56:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13337179 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3275C04A6A for ; Tue, 1 Aug 2023 18:56:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbjHAS4V (ORCPT ); Tue, 1 Aug 2023 14:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbjHAS4T (ORCPT ); Tue, 1 Aug 2023 14:56:19 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49F46268F; Tue, 1 Aug 2023 11:56:12 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8AxTetLVclk7UsOAA--.28292S3; Wed, 02 Aug 2023 02:56:11 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxF81JVclkyWREAA--.44250S2; Wed, 02 Aug 2023 02:56:09 +0800 (CST) From: Sui Jingfeng To: Huacai Chen , WANG Xuerui , Jianmin Lv , Sui Jingfeng Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas , Li Yi , linux-pci@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH] LoongArch: Remove vgaarb related workarounds Date: Wed, 2 Aug 2023 02:56:07 +0800 Message-Id: <20230801185607.703295-1-suijingfeng@loongson.cn> X-Mailer: git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E42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j1YL9UUUUU= Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org When we have a better approach[1] to handle multiple video cards problems on Loongarch, we want to drop the vgaarb related workaround. [1] https://patchwork.freedesktop.org/patch/550708/?series=121740&rev=1 Cc: Bjorn Helgaas Cc: Li Yi Cc: linux-pci@vger.kernel.org Cc: loongson-kernel@lists.loongnix.cn Signed-off-by: Sui Jingfeng --- arch/loongarch/pci/pci.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/loongarch/pci/pci.c b/arch/loongarch/pci/pci.c index 2726639150bc..4319b5d75872 100644 --- a/arch/loongarch/pci/pci.c +++ b/arch/loongarch/pci/pci.c @@ -8,13 +8,10 @@ #include #include #include -#include #include #include #define PCI_DEVICE_ID_LOONGSON_HOST 0x7a00 -#define PCI_DEVICE_ID_LOONGSON_DC1 0x7a06 -#define PCI_DEVICE_ID_LOONGSON_DC2 0x7a36 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val) @@ -82,19 +79,3 @@ int pcibios_alloc_irq(struct pci_dev *dev) return 0; return acpi_pci_irq_enable(dev); } - -static void pci_fixup_vgadev(struct pci_dev *pdev) -{ - struct pci_dev *devp = NULL; - - while ((devp = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, devp))) { - if (devp->vendor != PCI_VENDOR_ID_LOONGSON) { - vga_set_default_device(devp); - dev_info(&pdev->dev, - "Overriding boot device as %X:%X\n", - devp->vendor, devp->device); - } - } -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_DC1, pci_fixup_vgadev); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, PCI_DEVICE_ID_LOONGSON_DC2, pci_fixup_vgadev);