From patchwork Tue Sep 8 15:22:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 249361 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4828595ilg; Tue, 8 Sep 2020 12:16:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd4NYhpMpZteacnkL8ak4HkgqAs8i8P7O5C3e/Bu/cY5q0YIMQTqXItluNgyhcSlLZIaan X-Received: by 2002:a05:6402:292:: with SMTP id l18mr566049edv.6.1599592607971; Tue, 08 Sep 2020 12:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599592607; cv=none; d=google.com; s=arc-20160816; b=ynGECspqDDtQbNPmR3oV9kzpTpTWP9dpd3tBkBaprBxAW7EElSY3Ya8Hq/4RSx1z9r 9dNt51FNXBV2sZzqB6hIzVC7rnlfjMHNC1nVJR8dxF1mc7J/vRtltDq+B1o/jroBiexn E9caTYQFpZpZjJhnkvZpt24L0ZQAYtA9/ssYx17neE1ggs3UNWj08FOi9TucMVjc/oHm Fut/cn7utTvs0FgJIQ55iHN4a7s1EQoXZqr2szLZOiOeOxfF/RujQDgqj1xnDsBVqH8a zrbzcst9mDiOKymkvwzCePUEtUVaWZuu+3jYC8H/mlnEXmJwvdcuhjkjnrK00b3AL+/n Wj4Q== 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:dkim-signature; bh=H1Z4ygHoMbQp3sfW9liXKqbHAuEHVagOC1DZRpxvWIM=; b=tQ3E/Lg7YzNm0tcWh/syE4rn7XuxD/tD6iAoyOsdYi5I4CBpLlNf2Yk3jXP4JHU6IF HH1xzwhijmjJu7JiltENqkaNr9QhkqnSA6gAbX5NwRdmwmUhSo1ag8Jde1YQWCij1DGE wSgJaxCSxWiw3MOkTbJm1chsLhnJtyCywLGkMo8Si1EFUFLjxrpRHOs6eRoG6ETfBxvu rQ6VgkKp4F1DeYug6sR9iNQbD19HCURpWh/frN+HPrAm3M9JUZEilA5SEC7+U9unLPpY +NmV58W0X3DcirkpG7ecnHakfL4t1BKGDG2qmKAwGWXKzwNGQETTcf+rSB00GhY4tbrm 5QkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yc3FY8Et; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (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 j10si24572edy.0.2020.09.08.12.16.47; Tue, 08 Sep 2020 12:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@kernel.org header.s=default header.b=Yc3FY8Et; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731941AbgIHTQY (ORCPT + 15 others); Tue, 8 Sep 2020 15:16:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:53446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731174AbgIHQEj (ORCPT ); Tue, 8 Sep 2020 12:04:39 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A8C3E23C3F; Tue, 8 Sep 2020 15:36:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579365; bh=E0S5fTo0mX+8r5130quZXaxIlSmWMKiZqSWg4n8H/MU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yc3FY8Et+gMhOBdliRNBI/a3MEFHpTfTCE7gHhU7o70veGouVXDifnTfr8QLvWnet m2lVenA/jINz/1mGKibW4Zep1esxbTiaYvwS6pfE2z/noIh2a/fZ3U+fUwFQJi1vFG OqRpf+wVj/gLBIhVX91Q+nZZ/LWI8TVaQFNf/QIY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Baryshkov , Rob Clark , Sasha Levin Subject: [PATCH 5.8 018/186] drm/msm/a6xx: fix gmu start on newer firmware Date: Tue, 8 Sep 2020 17:22:40 +0200 Message-Id: <20200908152242.542199045@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152241.646390211@linuxfoundation.org> References: <20200908152241.646390211@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dmitry Baryshkov [ Upstream commit f5749d6181fa7df5ae741788e5d96f593d3a60b6 ] New Qualcomm firmware has changed a way it reports back the 'started' event. Support new register values. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 1d330204c465c..2dd1cf1ffbe25 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -207,6 +207,16 @@ static int a6xx_gmu_start(struct a6xx_gmu *gmu) { int ret; u32 val; + u32 mask, reset_val; + + val = gmu_read(gmu, REG_A6XX_GMU_CM3_DTCM_START + 0xff8); + if (val <= 0x20010004) { + mask = 0xffffffff; + reset_val = 0xbabeface; + } else { + mask = 0x1ff; + reset_val = 0x100; + } gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 1); @@ -218,7 +228,7 @@ static int a6xx_gmu_start(struct a6xx_gmu *gmu) gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 0); ret = gmu_poll_timeout(gmu, REG_A6XX_GMU_CM3_FW_INIT_RESULT, val, - val == 0xbabeface, 100, 10000); + (val & mask) == reset_val, 100, 10000); if (ret) DRM_DEV_ERROR(gmu->dev, "GMU firmware initialization timed out\n");