From patchwork Mon Oct 14 15:25:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13835245 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55450D18127 for ; Mon, 14 Oct 2024 15:25:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADE0610E477; Mon, 14 Oct 2024 15:25:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="t1zaARpt"; dkim-atps=neutral Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62A9310E477 for ; Mon, 14 Oct 2024 15:25:17 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 96CDFA41A81; Mon, 14 Oct 2024 15:25:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FC87C4CEC3; Mon, 14 Oct 2024 15:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728919516; bh=hS0sb+6oNOgPc3WYv1Lobl2azHFyEHVXBQuVnWLPR4Q=; h=From:To:Cc:Subject:Date:From; b=t1zaARptC5NRLY/+fKGIXj9iAHaQQz/c4v/7SJqxoqub1Zgp1RR+kTOafxwsQ0xHU yCL4yR9N/zz4snk7z6MZETr/0kSCfiTj5Rorh9XKifRNcE8CahiRnp1W9EJUMg2z3m 7+XCDjifVXzyLI6fuYxBT3bCbf/GaqyGCPf2gcMrUhfAoX5f0IgRSo+0Ee+F4XJJHt 7PoUcRgzUNiBZESfOPCcMq8bpxvSzKBcYzinE0/Nbod8AYA5GT1NylZ+hlenHiscku /DldY+fZYSyfIzdawFiHHgMIc0jBY2AZJfWLkwMms87F07s6do6lYeCrkY66BdClJ3 DA/FeU0W/0SgA== From: Mario Limonciello To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), linux-kernel@vger.kernel.org (open list), dri-devel@lists.freedesktop.org, Mario Limonciello , Alex Deucher , "Luke D . Jones" Subject: [PATCH] PCI/VGA: Don't assume only VGA device found is the boot VGA device Date: Mon, 14 Oct 2024 10:25:02 -0500 Message-ID: <20241014152502.1477809-1-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Mario Limonciello The ASUS GA605W has a NVIDIA PCI VGA device and an AMD PCI display device. ``` 65:00.0 VGA compatible controller: NVIDIA Corporation AD106M [GeForce RTX 4070 Max-Q / Mobile] (rev a1) 66:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Strix [Radeon 880M / 890M] (rev c1) ``` The fallback logic in vga_is_boot_device() flags the NVIDIA dGPU as the boot VGA device, but really the eDP is connected to the AMD PCI display device. Drop this case to avoid marking the NVIDIA dGPU as the boot VGA device. Suggested-by: Alex Deucher Reported-by: Luke D. Jones Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3673 Signed-off-by: Mario Limonciello Tested-by: Luke D. Jones --- drivers/pci/vgaarb.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index 78748e8d2dba..05ac2b672d4b 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -675,13 +675,6 @@ static bool vga_is_boot_device(struct vga_device *vgadev) return true; } - /* - * Vgadev has neither IO nor MEM enabled. If we haven't found any - * other VGA devices, it is the best candidate so far. - */ - if (!boot_vga) - return true; - return false; }