From patchwork Tue Apr 9 12:57:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zan@falconsigh.net X-Patchwork-Id: 13622479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9CB3C67861 for ; Tue, 9 Apr 2024 13:11:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6823A112D8F; Tue, 9 Apr 2024 13:11:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=falconsigh.net header.i=@falconsigh.net header.b="eaPaOygV"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Ks4PqO3m"; dkim-atps=neutral X-Greylist: delayed 850 seconds by postgrey-1.36 at gabe; Tue, 09 Apr 2024 13:11:24 UTC Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by gabe.freedesktop.org (Postfix) with ESMTPS id 31CB4112D8D; Tue, 9 Apr 2024 13:11:23 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 3A4861140125; Tue, 9 Apr 2024 08:57:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 09 Apr 2024 08:57:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=falconsigh.net; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1712667433; x=1712753833; bh=bX6N1mV9wA YLoKewLAuFKZq5rTPxUZFmis0Y0wufflo=; b=eaPaOygVLGfoLq1oyOjJ0jA85b WcteDCKDRYqGhP7PEgGvHgbQyrw8zK2YPiDMCjHP2RCxT98YKo4z0cD5xV12ZCqf WTyt444eEEHZKkPhHMCRc2XQ9TE4KJEyD++fGhAVQVFRQVa2Pf1hT2R0u2kWVByg hEWRY4Ciu9XCZBrmw3DbNlfn43wZyYQ5S7qDc4kz6FV4e2oD8jla0MR2WJs+Ijxq Vx2L8yxY+Z9cESVJylDUS3x4asjKkXBuEMcaevEpA7ZroKF9Ri0NxEVGbyiWJVMP EkQUjYOn8ZBYL4H85udyS1RieOFhZcCFsANjnBNiOcgxt47HQA650ueunufg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712667433; x=1712753833; bh=bX6N1mV9wAYLoKewLAuFKZq5rTPx UZFmis0Y0wufflo=; b=Ks4PqO3mTmVhRPyW+vwbWDuCw7bUn4NoBMjz5VjQNpJy tLU0zElC35fssob62gkWgBTxlPT1ISQNp1qSOFJPXdoiukQwMEw83CAAJcqPcjOH OF+UKd1JO+uuTF+/XSBbqxL1GA5xTEar5y+CvrzMUtW1+9Kvmq9202/tbERYB9nD 2JSMTtCRS5NLS68vkDjg1rYxIujEvjflSiEm0xc4QFF13DzUaTYlimKsRiPA87ub c8KalVq7MaxgTDl3CMfekql3pU5jxh9BsDrUugpZxg39P9jn/0HxP9psnFdNxkPI xpwAN/VpImI5dBCfxMKlGiJR8U8x/7IR1fcTEKa+7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehtddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepiigrnhesfhgr lhgtohhnshhighhhrdhnvghtnecuggftrfgrthhtvghrnhepueeuieegueehieetveehge dukeffteeuffdtjeeuteetjeeigeekgeetudffhfdtnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepiigrnhesfhgrlhgtohhnshhighhhrdhnvg ht X-ME-Proxy: Feedback-ID: i9d3c4088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Apr 2024 08:57:11 -0400 (EDT) From: zan@falconsigh.net To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, robdclark@gmail.com, konrad.dybcio@linaro.org, Zan Dobersek Subject: [PATCH] drm/msm/adreno: fix CP cycles stat retrieval on a7xx Date: Tue, 9 Apr 2024 14:57:00 +0200 Message-ID: <20240409125700.651398-1-zan@falconsigh.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Zan Dobersek a7xx_submit() should use the a7xx variant of the RBBM_PERFCTR_CP register for retrieving the CP cycles value before and after the submitted command stream execution. Signed-off-by: Zan Dobersek Fixes: af66706accdf ("drm/msm/a6xx: Add skeleton A7xx support") --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 0674aca0f8a3..107d3277bcee 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -284,7 +284,7 @@ static void a7xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit) a6xx_set_pagetable(a6xx_gpu, ring, submit->queue->ctx); - get_stats_counter(ring, REG_A6XX_RBBM_PERFCTR_CP(0), + get_stats_counter(ring, REG_A7XX_RBBM_PERFCTR_CP(0), rbmemptr_stats(ring, index, cpcycles_start)); get_stats_counter(ring, REG_A6XX_CP_ALWAYS_ON_COUNTER, rbmemptr_stats(ring, index, alwayson_start)); @@ -330,7 +330,7 @@ static void a7xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit) OUT_PKT7(ring, CP_SET_MARKER, 1); OUT_RING(ring, 0x00e); /* IB1LIST end */ - get_stats_counter(ring, REG_A6XX_RBBM_PERFCTR_CP(0), + get_stats_counter(ring, REG_A7XX_RBBM_PERFCTR_CP(0), rbmemptr_stats(ring, index, cpcycles_end)); get_stats_counter(ring, REG_A6XX_CP_ALWAYS_ON_COUNTER, rbmemptr_stats(ring, index, alwayson_end));