]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.18.8/drm-amdgpu-fix-rlc-safe-mode-test-in-gfx_v9_0_enter_rlc_safe_mode.patch
Linux 4.4.177
[thirdparty/kernel/stable-queue.git] / releases / 4.18.8 / drm-amdgpu-fix-rlc-safe-mode-test-in-gfx_v9_0_enter_rlc_safe_mode.patch
1 From 226127a67e31a9518d9516d3e4890759b379d874 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
3 Date: Thu, 19 Jul 2018 18:33:39 +0200
4 Subject: drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Michel Dänzer <michel.daenzer@amd.com>
10
11 commit 226127a67e31a9518d9516d3e4890759b379d874 upstream.
12
13 We were testing the register offset, instead of the value stored in the
14 register, therefore always timing out the loop.
15
16 This reduces suspend time of the system in the bug report below by ~600
17 ms.
18
19 Cc: stable@vger.kernel.org
20 Bugzilla: https://bugs.freedesktop.org/107277
21 Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
22 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
23 Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
24 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
25 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27
28 ---
29 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
33 +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
34 @@ -3433,7 +3433,7 @@ static void gfx_v9_0_enter_rlc_safe_mode
35
36 /* wait for RLC_SAFE_MODE */
37 for (i = 0; i < adev->usec_timeout; i++) {
38 - if (!REG_GET_FIELD(SOC15_REG_OFFSET(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD))
39 + if (!REG_GET_FIELD(RREG32_SOC15(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD))
40 break;
41 udelay(1);
42 }