From mboxrd@z Thu Jan 1 00:00:00 1970 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 7B9E9C44536 for ; Wed, 22 Jul 2026 12:57:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC69E10E2CF; Wed, 22 Jul 2026 12:57:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=deq.rocks header.i=@deq.rocks header.b="JuzsrEZm"; dkim-atps=neutral Received: from mx5.mail-out.lima-city.de (mx5.mail-out.lima-city.de [91.216.248.207]) by gabe.freedesktop.org (Postfix) with ESMTPS id E151110E2CF for ; Wed, 22 Jul 2026 12:57:38 +0000 (UTC) From: Andre Eikmeyer X-Lima-ML-UUID: 9ef01408-ef45-422b-b52c-d7fe4755c05b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=deq.rocks; s=securedbylima-20251205; t=1784725056; bh=VeUZjxn7WyogGHiYtS5M2Fn8omQS8kn+4hN6551NdGc=; h=From:To:Cc:Subject:Date:From; b=JuzsrEZmfzWFfj3MU5W0CnVJenv0FLaYQ37I7m7tMdk5IOvGLXnvT7tXXx0voyBA8 sAQzCkrKL27wAtYwxA8ez0mWzbkrkentzNqm6EyJ7swN28UITkSyC03Mp0FEGzEZeK BFbdWMAzwHDtSWzqszjQUal23MJhTXXGn7Oir9xJLCNEI75Mv418A+Xa9A73mSYgjm FN6CxpdhnoS0MPeXYKjurTwRTOD6XQg0nmB6CSE6Y4i0kE4UsL8qqDY4dRVuRFuPnt kwOq/mGTM4m3wrzj8P27798O/gq0Ajpl8czXRTAFZQ74x55VG0XhwjTutxQ/fWXYCl XM3g0/UUdflXQ== To: amd-gfx@lists.freedesktop.org Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Frederick Morlock , Andre Eikmeyer Subject: [PATCH RESEND] drm/amdgpu: reset VI ASIC on MacBookPro15,1 Date: Wed, 22 Jul 2026 14:57:34 +0200 Message-ID: <20260722125734.6541-1-dev@deq.rocks> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" After S3, reloading amdgpu on MacBookPro15,1 systems with a Radeon Pro 555X or 560X fails while loading the SMU firmware. The existing SMC register check does not request a reset because the registers do not reliably reflect the stale SMU state on these machines. Frederick Morlock found that forcing a VI ASIC reset allows the driver to initialize again. This patch limits his workaround to the exact PCI device, Apple subsystem device and revision combinations used by these two GPUs, leaving other VI hardware unchanged. Suggested-by: Frederick Morlock Signed-off-by: Andre Eikmeyer --- drivers/gpu/drm/amd/amdgpu/vi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index a256320b92f3..320c43143e5d 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -1407,10 +1407,30 @@ static uint64_t vi_get_pcie_replay_count(struct amdgpu_device *adev) return (nak_r + nak_g); } +struct vi_reset_quirk { + u16 device; + u16 subsystem_vendor; + u16 subsystem_device; + u8 revision; +}; + +static const struct vi_reset_quirk vi_reset_quirks[] = { + { 0x67ef, PCI_VENDOR_ID_APPLE, 0x0190, 0xe3 }, /* Radeon Pro 555X */ + { 0x67ef, PCI_VENDOR_ID_APPLE, 0x018f, 0xc2 }, /* Radeon Pro 560X */ +}; + static bool vi_need_reset_on_init(struct amdgpu_device *adev) { + unsigned int i; u32 clock_cntl, pc; + for (i = 0; i < ARRAY_SIZE(vi_reset_quirks); i++) + if (adev->pdev->device == vi_reset_quirks[i].device && + adev->pdev->subsystem_vendor == vi_reset_quirks[i].subsystem_vendor && + adev->pdev->subsystem_device == vi_reset_quirks[i].subsystem_device && + adev->pdev->revision == vi_reset_quirks[i].revision) + return true; + if (adev->flags & AMD_IS_APU) return false; -- 2.55.0