Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp246698rwb; Tue, 25 Jul 2023 15:17:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHfGLX0OOt6ux2cDKtIBLoJzV5AJXGVe2GdOG6Y0CJ6s8stc/w1NEDXCaajxMgwWbfjCh5 X-Received: by 2002:a19:8c0b:0:b0:4fd:fabf:b6ee with SMTP id o11-20020a198c0b000000b004fdfabfb6eemr136399lfd.9.1690323460388; Tue, 25 Jul 2023 15:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690323460; cv=none; d=google.com; s=arc-20160816; b=g8AwpvU+FK0yRUJICWnwOPwKtxIDO14WgRiDO0SVRZgR86Zg+j1qU5rdTFi2IamX5I n1xv+Nk3xhjzjZV3JrUF52vfaHehHk0KVPKv+02eIq5apWTnP8RBA1dnUdG7Mejh2TXy rv4wUJyp7Z1U3xWGK9t6A+o7soJxlVk+o84PJPMuv03ATh28HEG+HVRTGG2+e2XcCDJz JS8/T7tlGJ2HbkOzB+5/7kNG80lKbsLyyRl5YWD2dyvjjlsmP1M280CbEYoQLqLjC1h3 fbdPLjsj8ZwNhl6u9/qvjAuIAsUOT9iCNvJ9VTgdjf6GwSaujrGSUcEOSRkoF7ZXP3Nu vWyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=hbcyOOHsCWT5X+XXNlqy/L9QaQDB2MGy6lINC+VxK2o=; fh=UXschkoePrTd8iQrIoVf93puzqVvn8SK+KlpcgqFG2M=; b=HEcvywGs1SQarHNvf2dX4P/t1vNAJjLg+H2gfRr7hnN3UxZd9irgCwHjPHuKuVqxM6 tV60OQ4MneOa+ugYYTMO0GpcRhzTUbeJJb5FGJtZsKetZ4/ixFTd91ropog8LY0fu4dN CGaJluYdjrsnJz3nnqNKO5mdYcbmkH05JODe6WT0bDC3y0zBtOpA5JCNOpblo/xuFS9/ P+VFd5wk0Oh9sw/j5wViQa14MFdUdg1nMNiFQph2EnlKzTgxeq0ouhVJI4Cnadh8CHwY 7pcv3LFDTu115atYLLfcuET0EIIJ9o9IBCsGplP2MGGBjxi6ptjSyAa9YBIPHWhu9GH2 4ZNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dw0O1jwf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by15-20020a0564021b0f00b005223a54229fsi2868949edb.176.2023.07.25.15.17.13; Tue, 25 Jul 2023 15:17:40 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dw0O1jwf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231362AbjGYVte (ORCPT + 99 others); Tue, 25 Jul 2023 17:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231308AbjGYVtc (ORCPT ); Tue, 25 Jul 2023 17:49:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BE171FEB; Tue, 25 Jul 2023 14:49:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EE9276186A; Tue, 25 Jul 2023 21:49:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E68EC433C8; Tue, 25 Jul 2023 21:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690321770; bh=wvQn3+vfatEE94wZppEmqQCo2ZDZzADNKAHxArXYbSU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=dw0O1jwfdcV80JDUixD/4nRJSXX4YLfrhuGxPJa9nZqH9t+z6UEj7NN4pRrMW4Iv7 mjuaWYuta9YHhVQWIShdc/lTRNU2W4e4Bg3zoND+Wi2ZXiwdklh8jgm5Fuhxufplq2 W/zGiPx7WlHT40tloHpIWfkyHSeESwNBbZNSci0Lpb5oWvAYE1YNIqzAJWnil0lYrS lMi/wvHtNQwuXU/2bxwaU0pmSosoSHH3FzsbFpHyAYxk1TrGv/inMpZ2dkh2wSYJLq i54xcrt+bhRWI9MwqcAzwxMcvCLq2GOih2S3T0IfCQH9Sta23DWT1ea2QVFUfpmWuc eJjcPF9Rcqbag== Date: Tue, 25 Jul 2023 16:49:28 -0500 From: Bjorn Helgaas To: suijingfeng Cc: Sui Jingfeng , Thomas Zimmermann , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , loongson-kernel@lists.loongnix.cn, dri-devel@lists.freedesktop.org, Bjorn Helgaas , Mario Limonciello Subject: Re: [PATCH 2/6] PCI/VGA: Deal with PCI VGA compatible devices only Message-ID: <20230725214928.GA666846@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Sat, Jul 22, 2023 at 04:11:07PM +0800, suijingfeng wrote: > ... > In the future, we may want to expand VGAARB to deal all PCI display class > devices, with another patch. > > if (pdev->class >> 16 == PCI_BASE_CLASS_DISPLAY) > > ???????? // accept > > else > > ????? // return immediately. > > > Then, we will have a more good chance to clarify the programmer interface. I would prefer not to expand vgaarb to deal with all display devices unless they actually need the legacy resources like [pci 0xa0000-0xbffff]. But maybe the consumer of these interfaces relies on vgaarb even for devices that don't need those resources? If so, please mention examples of where they depend on vgaarb. I expect the vgaarb interfaces are used by things that need to emulate the option ROM to initialize the device. If the device has a programming interface other than 0000 0000b, the option ROM should not be using the [pci 0xa0000-0xbffff] resource, so vgaarb should not be needed. Bjorn