From patchwork Tue Sep 8 15:25:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 249359 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4817819ilg; Tue, 8 Sep 2020 12:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKsmKoKwcB94ZGwLPfm33pXINQnmt+uXFKPqfVs/CFxRn+mvr5OW7BtVWL8mmL7+nJuYU2 X-Received: by 2002:a17:906:cf8b:: with SMTP id um11mr28850522ejb.540.1599591765338; Tue, 08 Sep 2020 12:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599591765; cv=none; d=google.com; s=arc-20160816; b=I8hPtlMOktrbndOaZq3WkDKc7zQWiUdSHUuVwTw3Ke9sdlc2WBSYC2qsAf8JJt3bRW UGcxBKs2VibbbcBMqIp0jI3JXFz9QhPYVlVTjiWvVqV5OVpt4TEFqNzVXJJsXCViHP2x bOIsVjhz1ljYz1aABHkxrPlC71kw2/LmuipD7Dbi2iNlAd5bpRZRkAgbBFQaz+zedDoE Y+n17CcXogbrkvdM3ODGXkmOpo3wA1+pKXFoY46bXSxGgdAEXFe7/iKyMfSv6CzEVVxl WdofNqOHij/m+Dzq/4NZtqPAjNn+ev1ccvaPQpHF7KoNNUTVOQuXRDeThaQpaDg7t18z X24Q== 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=U6aOqJyahf0EnL+3zfuHYNauXuY3WXQLAUW0OjE1l24=; b=b2EcGf/XuDwDL7HUGF0aktTh7CWYVDukiNKJx7TIWvAvLUvPkRceLmFFvy/HYXT6Wo x+4JQ0ObfRDKGLx7MeHUPZ34Xn7w4LF0WgyQYMpxqfY0VRjyz9bcVrjNx695LfC6QDh0 Q/BDwHfaUoB/Rk6S6hBDYA31NGxmHDaFzudljoO3QkRZf65CGgqbbl08xme88c84zdPr d7Kz4GTUbqFXM86jOrgsLWV8VALSA+TYkU89UF6NB51di0tB/79HLxYl9sRV7yt6gxMF ffpP44HpPuqHGIzZjF1okbWvP89mTp46U6Y9fc2/yP4FHipFqvqmGA/7ZSZeR/fKHOBi /3gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iy61xoxy; 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 s23si13112973edi.84.2020.09.08.12.02.45; Tue, 08 Sep 2020 12:02:45 -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=iy61xoxy; 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 S1731214AbgIHTCf (ORCPT + 15 others); Tue, 8 Sep 2020 15:02:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:52178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731231AbgIHQIC (ORCPT ); Tue, 8 Sep 2020 12:08:02 -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 8C2A523ECD; Tue, 8 Sep 2020 15:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580048; bh=P2MC/YP6p1guc9B/2z+SRDFbG5v6erQYKBki/Y+23eM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iy61xoxyg3REfMJrl34sSayM3CjA1uVpHl6pxJVO0mT/sf85Xe8LU6u48R5xjEAIQ yM2MHkFsA1YXUNReaAWjdZAuI/lhTBPGG9q+TWAfRGlHjM4VrEbPtpS2E6igbeOeDN Oq7UQnZLd21s8yH7mxGpm70f0UWBUoOFnvP7ja5w= 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 4.19 10/88] drm/msm/a6xx: fix gmu start on newer firmware Date: Tue, 8 Sep 2020 17:25:11 +0200 Message-Id: <20200908152221.607307745@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@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 9cde79a7335c8..739ca9c2081a6 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -117,12 +117,22 @@ 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); 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) dev_err(gmu->dev, "GMU firmware initialization timed out\n");