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 C948112A146; Mon, 8 Apr 2024 13:30:32 +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=1712583032; cv=none; b=bxaFG7s5G7bLtkUCXI+xOk1hNDbrJrf0yVkt4h1BMFSPz6aGNha9rivXXDMDP8JvdnmyQora/6D2ODr5q3DGR6gi5JFh1XMlIQplwqMoR3Wgl9r0CJ8izid0VZYj7AJOhplFo4mzjarriPIcrPdg7DSFwGye+WwUc380iC805bw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712583032; c=relaxed/simple; bh=13KyGkv5D9KPnM+rgUGmBS8PV+MRM1H6xwTb8CKxC3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qDd2mZMn8X5DznsCPG8c8U0HcaYetmfYT4VCDfU9uxnaVgWcCzywXIPG4KK9gbRi159jHMdtTueXoCYEVeuSiwTfycsa8PdG2qWMVuwP/1kORboO8AltiPiS4FH4vPoW4JhMnXlR1/RlyUF4M5kyJ8zRpkKyvD5+kr/z+UXW878= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=THH3QeCC; 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="THH3QeCC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5260DC433C7; Mon, 8 Apr 2024 13:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712583032; bh=13KyGkv5D9KPnM+rgUGmBS8PV+MRM1H6xwTb8CKxC3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=THH3QeCCc+GtoMqiKfJgUGyQixRfJADIGalMIKF3a1Urr/J/Xs4iKKlaWanDjrGPh CBeTeQiuO/x9S1IcrfRw9FwsaO036tNTglOipWEjSuye5S25GWRZT+QLpKA03iafKm hA/+LXe5tDCco5yZHN7MS/ElqHvwP2tbvXsZwdgM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Deucher , Mario Limonciello , Sasha Levin Subject: [PATCH 6.6 138/252] drm/amd: Flush GFXOFF requests in prepare stage Date: Mon, 8 Apr 2024 14:57:17 +0200 Message-ID: <20240408125310.925242757@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125306.643546457@linuxfoundation.org> References: <20240408125306.643546457@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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mario Limonciello [ Upstream commit ca299b4512d4b4f516732a48ce9aa19d91f4473e ] If the system hasn't entered GFXOFF when suspend starts it can cause hangs accessing GC and RLC during the suspend stage. Cc: # 6.1.y: 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") Cc: # 6.1.y: cb11ca3233aa ("drm/amd: Add concept of running prepare_suspend() sequence for IP blocks") Cc: # 6.1.y: 2ceec37b0e3d ("drm/amd: Add missing kernel doc for prepare_suspend()") Cc: # 6.1.y: 3a9626c816db ("drm/amd: Stop evicting resources on APUs in suspend") Cc: # 6.6.y: 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") Cc: # 6.6.y: cb11ca3233aa ("drm/amd: Add concept of running prepare_suspend() sequence for IP blocks") Cc: # 6.6.y: 2ceec37b0e3d ("drm/amd: Add missing kernel doc for prepare_suspend()") Cc: # 6.6.y: 3a9626c816db ("drm/amd: Stop evicting resources on APUs in suspend") Cc: # 6.1+ Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3132 Fixes: ab4750332dbe ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 4ebe42395708f..062d78818da16 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4117,6 +4117,8 @@ int amdgpu_device_prepare(struct drm_device *dev) if (r) return r; + flush_delayed_work(&adev->gfx.gfx_off_delay_work); + for (i = 0; i < adev->num_ip_blocks; i++) { if (!adev->ip_blocks[i].status.valid) continue; -- 2.43.0