From patchwork Tue Sep 8 15:24:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 249375 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4851906ilg; Tue, 8 Sep 2020 12:53:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxsbPQcgw5A/i8RPdKhvFlkC8u8/3c3LANYUElBybjbWTcqXXsd8ZUr3H3Luq5HY6E6/X3 X-Received: by 2002:a17:906:29ca:: with SMTP id y10mr56496eje.327.1599594829197; Tue, 08 Sep 2020 12:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599594829; cv=none; d=google.com; s=arc-20160816; b=BEwKwsbPZlffoH1tUCyW74n/zNOluERwTnci6Eg/0Uk0cd/1zdGSHSAc8e92lIs+Lo a45vgCqomg4qtDkcukCQ9jKZwtWusif79Jlw9CQAU3Xf+Rdwdn+cfdLJrprGzKMqgRN+ z3lUMSnZFUqTYIxplLFe6O2mdsMH+NCcQBz21fEYfMyL4z04UecfHdcOj6biYBUv1bQx NGio5SV/WuOGS22R7VERZuzcu00JbCNPuuN8nR0PAo3l+Rd1bZNBMzyBRIn6WtW2QeLo TTy3GXaaHNySQ+tRD0esKRLp91CXTDuERuFZ6MtCwmUIvqDyDEWJqvmlxc6GwDGFBNl+ XOmg== 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=A3oE5T/8wkmJ5wOXVBpbHS4nhG80day6JfDbgQLixBo=; b=mMYNiC+WpGi2V85fmwZ3k8LS1/Z8WvI9qI4adxLfRfqQpSfP05QnSTWcOepsODbZ6x DRs0HYU9WtA3VYdITF25hRwGRAKIGZQDeJe9G7b+3O0UnmLQw5mV2LBAC0D5cx6XBmN/ axxAlZJhGcu07aczTV3gtzQjsHXTnq3L42YAMzjidHiSgeFLc+5yna67OE4v8OOcx1sa 65aTtJbJfzcx1dM1Kf7aIVkVFIth4hvqo8Ur/lNWIr523XIWxr3v8suCvN5xb2FGYZQB JtQ/g1q7Oi5A7fbtkIos+kWLvEwSekGCb/b137P9hTCku/DCEv8z+wBQZgGqWu5t3GTF TpEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mly1D0Oa; 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 dd3si25350ejb.499.2020.09.08.12.53.49; Tue, 08 Sep 2020 12:53:49 -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=Mly1D0Oa; 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 S1730435AbgIHTxq (ORCPT + 15 others); Tue, 8 Sep 2020 15:53:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:37604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730450AbgIHPrH (ORCPT ); Tue, 8 Sep 2020 11:47:07 -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 18CEE24818; Tue, 8 Sep 2020 15:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579827; bh=0YfuMbFx9l4rztSMus9UB0yQ2JVVa35hHbGtP153sd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mly1D0Oa48gNtfW+NBhBB4+PweHJRD3jomW5qbr1GFsBO8+09QBbo9sszIUrBqF+7 HySH+/kLiQ/n4KxNJZZCRmE+wpjRl8pdj9d6IGoLhGf08S47SAvsNMoeFBkC9tw2DX eoHsJtb5niGP8lyGnf8jka99Mw9eIeiteYHfW/AE= 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.4 010/129] drm/msm/a6xx: fix gmu start on newer firmware Date: Tue, 8 Sep 2020 17:24:11 +0200 Message-Id: <20200908152230.209249459@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@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 9ea748667fab0..40431a09dc97c 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -199,12 +199,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) DRM_DEV_ERROR(gmu->dev, "GMU firmware initialization timed out\n");