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: 129448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2882904vqg; Tue, 1 Aug 2023 12:21:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHMZoKlvF9NY4xv0oIooHgXpPKgMK0fAL8OeYur9M2y3x80DNHnYLarsDyM7AvHFXQRUL/y X-Received: by 2002:a05:6a20:8f21:b0:13d:ac08:6b79 with SMTP id b33-20020a056a208f2100b0013dac086b79mr8049040pzk.60.1690917695777; Tue, 01 Aug 2023 12:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690917695; cv=none; d=google.com; s=arc-20160816; b=FMiR4H2GlWTo/3zFdJCi/Rm9nZ5TLCFc+4usTlgfNJfWmNlCSAnxdatLCRSWotsVuc XY0fHmvDU5i6zGkNiCoOgHu5R5wzujIeMfJUGE8QSXqJkoNpP8+gR1BYIOy7wTkP3FN8 yoxS3TamXIQskOTifE/Vtm8BBMBhMTfa3lVK4lsxaKfS+4TR57QbCIsy95bT//8HENvt Obke4+iRJ6Xiz4QZ+tAoSYo9kmXL6Y8k25QnxDP8UyifsYB3MAkaPA4VW+3Y86NPNBEa HJgXJpcljIDCdUSmY9i52+cfwz+yjE3+F2aTK2480aUPvF9et5NRnytA5xLmmU66kMCK 2ScQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JyEFZZxbPw4nfe4yUQm59ciUAEH0bMNAll4vUDmMelE=; fh=yT3LSRoTyXhYddx3arAw16nOs4uUphTw6BpsBN3feHI=; b=RC4Cai8smi/m8F0P9OeqlYm7m58BDKVq9UInh+kx2wI7WzuCBMWAvrY3lhX9dwbvYi 5+YzVen43oOfBoQhX4ZEZUdSW7lAzl9mSDO0m2I88EQZ/zn0/gIkr+y48//WOqIBsseE HQsRm7bU7PKOUzsvdss+/WV0fdCi1ci5qDTc8jsO/TfCLJojR8MCUwQqoo88U6zSqh0+ SZROp0JNQ5itVsmF4N9MGS2Z5C5iOQg1uGqS5YkIfwFXYj5GlUx8v+eo5xsbrgJ2RWqj HlOzR/iVeRZjIlHLess/b9lOZqeZnE0gs4Ihofqii77X3JhSMbhoz9KYIXFXWmC21xqN XXgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y128-20020a636486000000b00543c84bf588si8278113pgb.473.2023.08.01.12.21.22; Tue, 01 Aug 2023 12:21:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbjHAS4W (ORCPT + 99 others); Tue, 1 Aug 2023 14:56:22 -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-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8CxF81JVclkyWREAA--.44250S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj93XoW7CFy5Xr13GrWUtrWUAw4xuFX_yoW8CF13pF nI9Fs7KrWfGr18GwnIyr17WryDZ3ZrA347uFWaka40kr13Zw1Fq393Ar93Xr4fJa9rXFWx ZFs8Cw48KF4DtabCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkjb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j1YL9UUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773055713602854638 X-GMAIL-MSGID: 1773055713602854638 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);