LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	Akhil P Oommen <akhilpo@codeaurora.org>,
	Rob Clark <robdclark@chromium.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Jonathan Marek <jonathan@marek.ca>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Jordan Crouse <jordan@cosmicpenguin.net>,
	Eric Anholt <eric@anholt.net>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 7/7] drm/msm/gpu: Add a comment in a6xx_gmu_init()
Date: Wed, 24 Nov 2021 13:41:35 -0800	[thread overview]
Message-ID: <20211124214151.1427022-11-robdclark@gmail.com> (raw)
In-Reply-To: <20211124214151.1427022-1-robdclark@gmail.com>

From: Rob Clark <robdclark@chromium.org>

If you don't realize is_a650_family() also encompasses a660 family,
you'd think that the debug buffer is double allocated.  Add a comment
to make this more clear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index e1774ea342b1..3e325e2a2b1b 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1531,6 +1531,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 	if (ret)
 		goto err_memory;
 
+	/* Note that a650 family also includes a660 family: */
 	if (adreno_is_a650_family(adreno_gpu)) {
 		ret = a6xx_gmu_memory_alloc(gmu, &gmu->icache,
 			SZ_16M - SZ_16K, 0x04000, "icache");
@@ -1547,6 +1548,8 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 		if (ret)
 			goto err_memory;
 	} else {
+		BUG_ON(adreno_is_a660_family(adreno_gpu));
+
 		/* HFI v1, has sptprac */
 		gmu->legacy = true;
 
-- 
2.33.1


      parent reply	other threads:[~2021-11-24 21:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 21:41 [PATCH 0/7] drm/msm: Improve GMU debugging Rob Clark
2021-11-24 21:41 ` [PATCH 1/7] drm/msm/a6xx: Capture gmu log in devcoredump Rob Clark
2021-11-24 21:41 ` [PATCH v2 1/3] drm/msm/gpu: Fix idle_work time Rob Clark
2021-11-24 21:41 ` [PATCH v2 2/3] drm/msm/gpu: Fix check for devices without devfreq Rob Clark
2021-11-24 21:41 ` [PATCH 2/7] drm/msm/gpu: Name GMU bos Rob Clark
2021-11-24 21:41 ` [PATCH 3/7] drm/msm/gpu: Add some WARN_ON()s Rob Clark
2021-11-24 21:41 ` [PATCH v2 3/3] drm/msm/gpu: Respect PM QoS constraints Rob Clark
2021-11-24 21:41 ` [PATCH 4/7] drm/msm/gpu: Make a6xx_get_gmu_log() more generic Rob Clark
2021-11-24 21:41 ` [PATCH 5/7] drm/msm/gpu: Also snapshot GMU HFI buffer Rob Clark
2021-11-24 21:41 ` [PATCH 6/7] drm/msm/gpu: Snapshot GMU debug buffer Rob Clark
2021-11-24 21:41 ` Rob Clark [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211124214151.1427022-11-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=airlied@linux.ie \
    --cc=akhilpo@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jonathan@marek.ca \
    --cc=jordan@cosmicpenguin.net \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@chromium.org \
    --cc=sean@poorly.run \
    --subject='Re: [PATCH 7/7] drm/msm/gpu: Add a comment in a6xx_gmu_init()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).