From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C30366FB1; Tue, 5 Dec 2023 03:39:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XDT4Dic/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AF81C433C8; Tue, 5 Dec 2023 03:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1701747552; bh=BtvYX5YfIum5A4cr2xU6+oyDV2xsWyY5ixbfNWj1W1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XDT4Dic/4NzS56MuC0u1TKFItrtJapPBYAqZV76Cg0O0e+p1muROpkjqKBMKwV08i mYJp3ifA2yfMMeWZYILBJf22vrXEOR7Ah8f6esCq6uE7Gp7hrNq8HnHJU2QM9+528p LWhDpt11Z67Qg7sOTdDXUUWFWiVoX7KfhQb2eLqM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mario Limonciello , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 118/135] drm/amdgpu: dont use ATRM for external devices Date: Tue, 5 Dec 2023 12:17:19 +0900 Message-ID: <20231205031538.287865773@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231205031530.557782248@linuxfoundation.org> References: <20231205031530.557782248@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Deucher [ Upstream commit 432e664e7c98c243fab4c3c95bd463bea3aeed28 ] The ATRM ACPI method is for fetching the dGPU vbios rom image on laptops and all-in-one systems. It should not be used for external add in cards. If the dGPU is thunderbolt connected, don't try ATRM. v2: pci_is_thunderbolt_attached only works for Intel. Use pdev->external_facing instead. v3: dev_is_removable() seems to be what we want Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c index 4b568ee932435..02a73b9e08d7d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c @@ -29,6 +29,7 @@ #include "amdgpu.h" #include "atom.h" +#include #include #include #include @@ -285,6 +286,10 @@ static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev) if (adev->flags & AMD_IS_APU) return false; + /* ATRM is for on-platform devices only */ + if (dev_is_removable(&adev->pdev->dev)) + return false; + while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) { dhandle = ACPI_HANDLE(&pdev->dev); if (!dhandle) -- 2.42.0