Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3730211pxb; Mon, 24 Jan 2022 16:33:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzreGMXMcbH1An689lwcsx3TSEkotX7kWidYbmltc7Hf4TtqcNiTMJf64QltqjzijKdAHRM X-Received: by 2002:a17:902:9893:b0:14a:c958:2c19 with SMTP id s19-20020a170902989300b0014ac9582c19mr16223230plp.39.1643070714705; Mon, 24 Jan 2022 16:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070714; cv=none; d=google.com; s=arc-20160816; b=yG5E5QEiZi4jk5i1CY/J2T8ZQ/9SYO075JFp9OqmdsUFAhEiqU0XMqj1+R5Oue8pgB YWpAJ88AyW1bxnCnQXEz1D8gBInKm+bH/fNK924kCfLW6vJ29K1Q00xxqKymGKcVUA13 spXZlx3NY3ntmZNhr5nxU/9+1AimBNQ3zozH9mXUnEsEyDcO3E3rS8F8YOYPtPSBlEpF 4eNEMKtQScgaj3ViIj4upCEX4d9nvO/M9RFmKA7WYcCq30m1JJW4VfMsxkwLS16J2Y3u uLYKiwOzeFFxabW7t5AcuT8zNRMqdIL93iT+GfIu0wVRB1nQQMVKhQ/ts8s9jQMKQFOl qDmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TwwrwryZ10AB1RPQ1SV8CXqZA6l2bH4SjekCFyYciGI=; b=GzPLGgr7AVkp3aAgDsU2dCFSoCLDuUr+EfZyGgNmS8Lep5GWQaIaSK4KKVLpsszSWH FivEK5imL8y//Mmruss4sy8pVZks9d3yLbPtGWVcnlaTQE8gxrZGPK5e5QYS2NeJvKKd Z9tnI3eI+wT6jkPFhNrTbDvS1w2bFEG6F0/wMvPm5qOaBLEI1hTej5eEtcZxT8gck5O0 7ycqyYqDUaO8iVqwd1LvhDg7cLlhj7hHjXQGDPesmK4hz9yuI+0WZloAHeYHqBlREP2N xxGzU+gjiukr4XEx2dxiNfNOeF1QVSiOhy9rWJtOzDT/i7KBNGCgBiG/mI5F6XqiasTK ICBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nYopirBY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 43si748054pjz.148.2022.01.24.16.31.42; Mon, 24 Jan 2022 16:31:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nYopirBY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3410155AbiAYA2j (ORCPT + 99 others); Mon, 24 Jan 2022 19:28:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2360821AbiAXXiL (ORCPT ); Mon, 24 Jan 2022 18:38:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F558C05A199; Mon, 24 Jan 2022 13:37:58 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4243BB812A5; Mon, 24 Jan 2022 21:37:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 622F1C340E4; Mon, 24 Jan 2022 21:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060277; bh=d1hkeXXrifR0cTOtk0pASdzSQrHKudV+b+y9Amq7KG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nYopirBY1FuWjXxqbDes6b47X2T9foAntB9PGTtB8Vgzm9qVwxFO+LaKzFj9riYgp BwNH+qz0FcJtypPZQwvulZ4MZEv8BIzMoGdo2NBMoaC8t/3yDR22xYEOYzW2BAKq4d OU3lNiOHiVdYKeadiWGP+FOuFu8b1g+F8lNfqkbA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Deucher Subject: [PATCH 5.16 0869/1039] drm/amdgpu: dont do resets on APUs which dont support it Date: Mon, 24 Jan 2022 19:44:18 +0100 Message-Id: <20220124184154.513082811@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher commit e8309d50e97851ff135c4e33325d37b032666b94 upstream. It can cause a hang. This is normally not enabled for GPU hangs on these asics, but was recently enabled for handling aborted suspends. This causes hangs on some platforms on suspend. Fixes: daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)") Cc: stable@vger.kernel.org Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1858 Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/cik.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/vi.c | 4 ++++ 2 files changed, 8 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/cik.c +++ b/drivers/gpu/drm/amd/amdgpu/cik.c @@ -1428,6 +1428,10 @@ static int cik_asic_reset(struct amdgpu_ { int r; + /* APUs don't have full asic reset */ + if (adev->flags & AMD_IS_APU) + return 0; + if (cik_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) { dev_info(adev->dev, "BACO reset\n"); r = amdgpu_dpm_baco_reset(adev); --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -956,6 +956,10 @@ static int vi_asic_reset(struct amdgpu_d { int r; + /* APUs don't have full asic reset */ + if (adev->flags & AMD_IS_APU) + return 0; + if (vi_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) { dev_info(adev->dev, "BACO reset\n"); r = amdgpu_dpm_baco_reset(adev);