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 5F44E71B32; Mon, 15 Apr 2024 14:26:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713191160; cv=none; b=QZ+VR9bmGCuGRUW3wPzKR/tWnKKjNCGIrjeT8nNEVKdZJvIBTHyYUYqYgVKdjKbidVEWoUTa18CStUsOcQS8wxUCVB5xeeNW9K8Qx5AMay2iwX7yZnPHqAZ4ZRhNDG2StQC/kqAl6swI5S/zA4TXxVncVmRC9Pb/Q7gatp0FQi0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713191160; c=relaxed/simple; bh=pJBo+NftW1P4ZmXLMRHvoHQhglxYyr0NndghdAfUNV4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TVegyFFS5fKSzvy6tNN7uvKDLfFYYv4AIgtByq6ZPEQ2VpxP8r8qHYzXaef05uU8kcb3oHRL0b7oZ8SpBWonfnb/TDd3dU5jnK9ng9jQgObmKmy2sF8KqWi17HHFyebduCiQhrZWwtcJXpjA63/scQ12tCKkAFK8ACMd9TnjroE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XLj/pQki; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XLj/pQki" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE4E3C113CC; Mon, 15 Apr 2024 14:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713191160; bh=pJBo+NftW1P4ZmXLMRHvoHQhglxYyr0NndghdAfUNV4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLj/pQkiRX3Yvqj4kG/N2r4u/yYW2xnUrsqnxFnbia4/rQ43nh3Pl2iA+vbYKpfP1 GnwaAbz9OZ7d/2pLdo4gb25VkFK30+hXk0y5tYOXTKVkh2YyJUfYADUsFZBiq5bmoq XVqxAG4QUHH5LLi3xT4EdXU+GEFHV8EwpBrlTO5I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tim Huang , Alex Deucher , Mario Limonciello Subject: [PATCH 6.8 014/172] drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11 Date: Mon, 15 Apr 2024 16:18:33 +0200 Message-ID: <20240415142000.415254778@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240415141959.976094777@linuxfoundation.org> References: <20240415141959.976094777@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 6.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tim Huang commit 31729e8c21ecfd671458e02b6511eb68c2225113 upstream. While doing multiple S4 stress tests, GC/RLC/PMFW get into an invalid state resulting into hard hangs. Adding a GFX reset as workaround just before sending the MP1_UNLOAD message avoids this failure. Signed-off-by: Tim Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: Mario Limonciello Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c @@ -226,8 +226,18 @@ static int smu_v13_0_4_system_features_c struct amdgpu_device *adev = smu->adev; int ret = 0; - if (!en && !adev->in_s0ix) + if (!en && !adev->in_s0ix) { + /* Adds a GFX reset as workaround just before sending the + * MP1_UNLOAD message to prevent GC/RLC/PMFW from entering + * an invalid state. + */ + ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset, + SMU_RESET_MODE_2, NULL); + if (ret) + return ret; + ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PrepareMp1ForUnload, NULL); + } return ret; }