Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3983823pxb; Mon, 4 Oct 2021 14:24:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJrk4ChdgOekU0w2E9a2XYshRVo2eGe9vS41MuacuTtaV0b73jG4y8+UQn7iUc5ODczbKt X-Received: by 2002:a17:902:8f90:b0:13e:a44e:2d3c with SMTP id z16-20020a1709028f9000b0013ea44e2d3cmr1684136plo.85.1633382694683; Mon, 04 Oct 2021 14:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633382694; cv=none; d=google.com; s=arc-20160816; b=00KGe053fKInqOx+TnCKzUMgy09nHLKgEoqBLz7rt+WjmNQgjb7Hy51RW1avq5R2Rh nH/RimCkljiMhbgnH3mgF4Tq5fgk7D1xE6A5emyy0YOsLzCNCTlJTYnyfiSy4XBJrg6L mwi4go7f8kj51SVXusIEylARK9MhLO08WUEdSF4NkbwciJBvPKuyPdQE9xWaviFUI//t FxtGd9GWxQN+tElR8nK0d9caU2X54udYUBKS/N5nhDujal3tsvuLzo98HIxzoUT45zvJ IzozAY8YtSbbtPSXN+DshclONXk72u/InUQmIn8Xx/f5DnLxNMJphjrwq5RuVxtKDyEc Y8Zw== 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=sOdfoDGrJ5gb8uwcabU7bTCfQYMPoXRNoqwKO2g+iz0=; b=mwn0Jn3MiIxEa6H4tr7CuYe8OwynrXFWWgqhWyiwePmMthZGvJ9t3K9ZL9I60sCJKZ wcsVTJnl7L8+4D111fuofKQTIfROX9fGuAH/wHvAnoA5s7K0SLxu6uMjPBtuSLI+mPKI ghKKiKOF7rl4RWm1Kf8jvAHfWbG+uB0DMP4LwuMuIviCVMzRFARo0vFIJqKDtQDXj2cS t5DxzUYXn/glodVJOTnF6vQQ4XUha/RtZlmdJT7WJz4WQTxB8ksZpB7AR+d2Nd3oaeiR 0MktKjj2+Wvyek/RHlzZBEPNkFthIbNYQVsvqW2UXR9gSdVi2Kh+BxVOeREtSDTo2BPH 3BQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MmSotVol; 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 x4si17283434pju.103.2021.10.04.14.24.42; Mon, 04 Oct 2021 14:24:54 -0700 (PDT) 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=MmSotVol; 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 S236532AbhJDNex (ORCPT + 99 others); Mon, 4 Oct 2021 09:34:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:45186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236803AbhJDNdA (ORCPT ); Mon, 4 Oct 2021 09:33:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9101B63224; Mon, 4 Oct 2021 13:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353289; bh=G3j+9ax/3/NZ+Nih8oq2Uf9WUNcgQZUq9EjiImao3Fc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MmSotVol930Sr/bPIicmwlpm+ahApUxYzviSUdOUp4qjLT8nKhxnE0r0w8K5eJxrc +bf7FBw6aMS0kqnXdkds+/9TWQEcm2FoeWh8Ey33E/6rvYq3utMR6akvK8z/Qd3VD5 qiagI2w9QR9jOZU9hZ5JePFDhhlKGHy+6BkZB9U8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Prike Liang , Alex Deucher Subject: [PATCH 5.14 070/172] drm/amdgpu: force exit gfxoff on sdma resume for rmb s0ix Date: Mon, 4 Oct 2021 14:52:00 +0200 Message-Id: <20211004125047.249040654@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@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: Prike Liang commit 26db706a6d77b9e184feb11725e97e53b7a89519 upstream. In the s2idle stress test sdma resume fail occasionally,in the failed case GPU is in the gfxoff state.This issue may introduce by firmware miss handle doorbell S/R and now temporary fix the issue by forcing exit gfxoff for sdma resume. Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c @@ -883,6 +883,12 @@ static int sdma_v5_2_start(struct amdgpu msleep(1000); } + /* TODO: check whether can submit a doorbell request to raise + * a doorbell fence to exit gfxoff. + */ + if (adev->in_s0ix) + amdgpu_gfx_off_ctrl(adev, false); + sdma_v5_2_soft_reset(adev); /* unhalt the MEs */ sdma_v5_2_enable(adev, true); @@ -891,6 +897,8 @@ static int sdma_v5_2_start(struct amdgpu /* start the gfx rings and rlc compute queues */ r = sdma_v5_2_gfx_resume(adev); + if (adev->in_s0ix) + amdgpu_gfx_off_ctrl(adev, true); if (r) return r; r = sdma_v5_2_rlc_resume(adev);