From patchwork Thu Jul 13 10:29:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Paoloni X-Patchwork-Id: 787649 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3x7XCP13zPz9s2s for ; Thu, 13 Jul 2017 20:30:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751835AbdGMKaj convert rfc822-to-8bit (ORCPT ); Thu, 13 Jul 2017 06:30:39 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9849 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267AbdGMKaj (ORCPT ); Thu, 13 Jul 2017 06:30:39 -0400 Received: from 172.30.72.54 (EHLO nkgeml412-hub.china.huawei.com) ([172.30.72.54]) by dggrg02-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AQZ08824; Thu, 13 Jul 2017 18:29:41 +0800 (CST) Received: from FRAEML703-CAH.china.huawei.com (10.206.14.34) by nkgeml412-hub.china.huawei.com (10.98.56.73) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 13 Jul 2017 18:29:39 +0800 Received: from FRAEML521-MBX.china.huawei.com ([169.254.1.122]) by fraeml703-cah.china.huawei.com ([10.206.14.34]) with mapi id 14.03.0301.000; Thu, 13 Jul 2017 12:29:26 +0200 From: Gabriele Paoloni To: Bjorn Helgaas , Daniel Axtens CC: "linux-pci@vger.kernel.org" , "Liuxinliang (Matthew Liu)" , Rongrong Zou , Catalin Marinas , "Will Deacon" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge Thread-Topic: [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge Thread-Index: AQHS+s1b+EtR4rKf6ku/WSkA/VN5laJQfQIAgAEKviA= Date: Thu, 13 Jul 2017 10:29:25 +0000 Message-ID: References: <20170712050811.3620-1-dja@axtens.net> <20170712200430.GI14614@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20170712200430.GI14614@bhelgaas-glaptop.roam.corp.google.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.220.132.21] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.59674B95.0070, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.1.122, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a796ca2302bbbc3420bdb35793612657 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi Bjorn, Daniel [...] > > Is this quirk useful on any arch other than arm64? Per > drivers/pci/dwc/Kconfig, CONFIG_PCI_HISI depends on CONFIG_ARM64. > > Would it make sense to put this quirk in arch/arm64/kernel/pci.c? Indeed our host controller depends on ARM64 so maybe it would make sense to move the quirk arch/arm64/kernel/pci.c; however regardless why is it strictly required for a VGA device to be legacy one in order to make it the default boot device? i.e. couldn't we have: ? Thanks Gab diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 0f5b2dd..a6b606c 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c @@ -667,8 +667,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) /* Deal with VGA default device. Use first enabled one * by default if arch doesn't have it's own hook */ - if (vga_default == NULL && - ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) { + if (vga_default == NULL) { vgaarb_info(&pdev->dev, "setting as boot VGA device\n"); vga_set_default_device(pdev); }