Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp720576imm; Thu, 13 Sep 2018 06:48:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZKWX7jDtKGgXMyVrCo9JBKxi/IUMNM4jl6oYf1zeMW+v+O5ymq+LwLmAjw50E7k0u8kY81 X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr7499332plz.95.1536846530640; Thu, 13 Sep 2018 06:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536846530; cv=none; d=google.com; s=arc-20160816; b=HjZuRsdDJHBPEvhkCWLGLtLYpo9OANPpiQ3AkxwoCYeDiTTNE8jz9VrA4y/WBI1PEC i995e9hLYXTzqSHmpTGwqXB3JqM3hLf7g9da590KgRJb4DzoUon9G9XdgU4z1IryeI4Z qbEhJDC56u5BRGbrMASLLZloLq9P6PKJi7eklc1LXu9WvBQVR3xWbYbX+EEtfWEU9pc4 uWnZA2lvedG3tr9UOS0j7gb7QAgwK0c/cakuhli2hMhPlHpAi52OUoqqyKMyCIzQgXmW ohB2+M9vVqk8TH8vw5UXlp3EEgnLu9DnbC4Hn2aV0tGvi+pnzoj28exjtw0xaVmqZIfD I3JQ== 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=dnkv80FLhX1dGsc8eahG7Jo9qUGipdj/Km2vGM/jXBE=; b=r8ESpANRZemfj3Z28KxE8CE3TLrAq8UcBowXBscs3aMNrJMcx8s4IvxskOUib81613 U975ci8Dv1TrDA6yJKf/kWCimb8zhHj39je8WNQhoH/zcZlGra/uZaAVM3cP7ICdyD6N tJN3i5f4jrrN6V65pACDo5EtIrs+DwUB3jVUB3F7ahG9SWpxa8IwCHYY5HsM24vKASZc PFqq+xrlY8RXDvN1mCt2QCFg0PymncEjE9jl7mAdNeANl8GKbAiOcsyJX5BEyuVrXIi8 /3ktc+KVBgkx0XTAyKPv5FS8M/64U00dU/RrYpz+GGocliRCmKrGXF9Rq760aFNuBCvo zTqQ== 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 z19-v6si4324950pgi.388.2018.09.13.06.48.35; Thu, 13 Sep 2018 06:48:50 -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 S1730373AbeIMS4m (ORCPT + 99 others); Thu, 13 Sep 2018 14:56:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60966 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728882AbeIMS4l (ORCPT ); Thu, 13 Sep 2018 14:56:41 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D53D8D19; Thu, 13 Sep 2018 13:47:07 +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.14 087/115] 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: <20180913131828.865200923@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131823.327472833@linuxfoundation.org> References: <20180913131823.327472833@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.14-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 @@ -3113,7 +3113,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); }