linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Limit AMD Radeon rebar hack to a single revision
@ 2021-10-26 20:46 Robin McCorkell
  2021-10-26 21:28 ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: Robin McCorkell @ 2021-10-26 20:46 UTC (permalink / raw)
  To: linux-pci

A particular RX 5600 device requires a hack in the rebar logic, but the
current branch is too general and catches other devices too, breaking
them. This patch changes the branch to be more selective on the
particular revision.

See also: https://gitlab.freedesktop.org/drm/amd/-/issues/1707

This patch fixes intermittent freezes on other RX 5600 devices where the
hack is unnecessary. Credit to all contributors in the linked issue on
the AMD bug tracker.
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index ce2ab62b64cf..1fe75243019e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3647,7 +3647,7 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
 
 	/* Sapphire RX 5600 XT Pulse has an invalid cap dword for BAR 0 */
 	if (pdev->vendor == PCI_VENDOR_ID_ATI && pdev->device == 0x731f &&
-	    bar == 0 && cap == 0x7000)
+	    pdev->revision == 0xC1 && bar == 0 && cap == 0x7000)
 		cap = 0x3f000;
 
 	return cap >> 4;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-02 12:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 20:46 [PATCH] Limit AMD Radeon rebar hack to a single revision Robin McCorkell
2021-10-26 21:28 ` Bjorn Helgaas
2021-10-26 21:44   ` [PATCH v2] PCI: Limit REBAR quirk to just Sapphire RX 5600 XT Pulse Robin McCorkell
2021-10-27  9:47     ` Krzysztof Wilczyński
2021-11-01 21:55     ` Bjorn Helgaas
2021-11-02 12:27       ` Christian König
2021-10-26 21:49   ` [PATCH] Limit AMD Radeon rebar hack to a single revision Robin McCorkell
2021-10-27  6:38     ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).