Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4154520pxk; Tue, 8 Sep 2020 12:04:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXS/lEmydEFBYcNHqnI61BHshheghuFmPxivvqOfZk6+nUEAamyCjYiN3CYrEblpDdUI7W X-Received: by 2002:a50:bb65:: with SMTP id y92mr440012ede.53.1599591878701; Tue, 08 Sep 2020 12:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599591878; cv=none; d=google.com; s=arc-20160816; b=kYfjD1fPl0nNZhZb9dWXFOGcXGPQ9GCA8/l30QLzhQyTYlFhraqk9KmhXXSUc0fueZ LczuTO9ZlHX+eqxA7zFF0eJA3q3Vma5IJLuWUbmjB2N0dPxu3WEoMRSjFJMY7G5LkVPQ Uff/MvNmGN722h92LxME+lEqq3csu0PbEXtYTD9reL6fXm5eMsTtz4KWrRwRORl2rLOq UxPGhA9mNfl7J7sUD+Hf8zISNddEEdZmmu3ZnShLhVaRFFucGUyX7FlSXnVKDH6sWSt3 BbmoWlvLD8S+kklGTvloKcI1yqboN2LQqaehg088uAyRFBhrfiE4BF7ZUR7ex4zoFszM kMiw== 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=lAvneR74+8xY4xhMvPA7FdcdTz54AilbJkwSZfaYSEQqTGdFGUUx+4hdrYsfXWBtea Ir6R6MhxdNVb7lclpxvnrZ8k9y1SmA1Dlstvqo7BZaiHEREp/XrAB3rhZRGL8vHWVLnB 4+v+QreEjsD2/f6mfla5v4+RfHvImx5VJaHm2RfBxzOq7jFVhrHQGoiGlb+rJ72TSRMO 47xCf/D7iYpl9EEUq00Cla7j8718r8FeiiSnj3VrTMHiX+XTLbPKXDs3EfuYIJp/Cwb1 9wmTLrUKgw2SNzhy2gNBA4vL/CQG2wGhEBiIkDAOz9lHPQWV41vm8Nct/CFfAyLocec2 acYg== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 ay17si13421117ejb.345.2020.09.08.12.04.15; Tue, 08 Sep 2020 12:04:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1731399AbgIHTCp (ORCPT + 99 others); Tue, 8 Sep 2020 15:02:45 -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 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 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(-) 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"); -- 2.25.1