Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp737144imm; Thu, 13 Sep 2018 07:03:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdakpVy0pEpSHTgzm1fsKqwzl3tYYymtFpRiWhkxG2PgSzX2hvn3+xhesiCWR7slHKqj4iTd X-Received: by 2002:a62:da0b:: with SMTP id c11-v6mr7709175pfh.68.1536847397124; Thu, 13 Sep 2018 07:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847397; cv=none; d=google.com; s=arc-20160816; b=SGRfO3I9zTLB6218F3ITyWW0PyBDyCiX5F7zhnl0ALkwAZPHbwG3JT2fgaUTtiyx5a 1nxMIfr27pA8GpeFTHsRwqix85zbXBeKZThXzc8bBG+7nD2Nibw+e34ic2AC9aiChAF4 yB098sv1wOoyRNrTAuJ/ZrvCAk6PnvYBPFry+hLARFNub8CERYyrww98XUxnGV6fUig6 xCukqzeMOevaubTpkAqw0xqQ5tECyCv2VowDMp9zjHgC9iHGTnUlahPy5J0iqK0HKicd xrNKYRLlDD+4l4q9FlsBnsCHuN+ow2IzKEmOe1XlzBGlpZDTdwIUo0faUgnhjcPyrz2q AndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=ES0q6Yk+GuRo7B7t4WQPMBQ5IwtE1qOGC8sV5NPLDFA=; b=Z+zhSJA1a2bLYMgWfscTVP5luH+XGO5wyF4Kaeu7r50KFtbYO+8TSZTvNIU0jTRORJ yqCNj+CyWDXQR+q2Ng8xsACuWUdiMJ9GGE+rQeRUI4d63b0g5UktFxfrM56oYVPDMEuL rghecx7oMZeWErjwcJhSxJGyjSrNwbf6EBOtI/9q4qVd/VnkwIbvXasKffaak6oFqtUJ 8UujH8eOBYGVmn/pIgY3G/qdaPMRhydc7q19MkHT7i2fpn+apx8djAIeZ8D7r7uKqIyr 60zRJIvECXeY1z3SLIbAnoMJUersEwHDcnLRnacvqRkb508waa3bg2gGkRuyqTJHTAnb nhew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4-v6si3851892plo.459.2018.09.13.07.02.59; Thu, 13 Sep 2018 07:03:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731994AbeIMTMU (ORCPT + 99 others); Thu, 13 Sep 2018 15:12:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35268 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731408AbeIMTMU (ORCPT ); Thu, 13 Sep 2018 15:12:20 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B8320D32; Thu, 13 Sep 2018 14:02:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Menzel , Alex Deucher , Junwei Zhang , =?UTF-8?q?Michel=20D=C3=A4nzer?= Subject: [PATCH 4.18 158/197] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode Date: Thu, 13 Sep 2018 15:31:47 +0200 Message-Id: <20180913131847.877779550@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michel Dänzer commit 226127a67e31a9518d9516d3e4890759b379d874 upstream. We were testing the register offset, instead of the value stored in the register, therefore always timing out the loop. This reduces suspend time of the system in the bug report below by ~600 ms. Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/107277 Tested-by: Paul Menzel Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -3433,7 +3433,7 @@ static void gfx_v9_0_enter_rlc_safe_mode /* wait for RLC_SAFE_MODE */ for (i = 0; i < adev->usec_timeout; i++) { - if (!REG_GET_FIELD(SOC15_REG_OFFSET(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD)) + if (!REG_GET_FIELD(RREG32_SOC15(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD)) break; udelay(1); }