devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: [PATCH 06/14] drm/msm/a6xx: Move LLC accessors to the common header
Date: Wed, 28 Jun 2023 22:35:06 +0200	[thread overview]
Message-ID: <20230628-topic-a7xx_drmmsm-v1-6-a7f4496e0c12@linaro.org> (raw)
In-Reply-To: <20230628-topic-a7xx_drmmsm-v1-0-a7f4496e0c12@linaro.org>

Move these wrappers in preparation for use in a6xx_gmu.c

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 15 ---------------
 drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index a70e36178058..c1c76fe288b2 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1735,21 +1735,6 @@ static irqreturn_t a6xx_irq(struct msm_gpu *gpu)
 	return IRQ_HANDLED;
 }
 
-static void a6xx_llc_rmw(struct a6xx_gpu *a6xx_gpu, u32 reg, u32 mask, u32 or)
-{
-	return msm_rmw(a6xx_gpu->llc_mmio + (reg << 2), mask, or);
-}
-
-static u32 a6xx_llc_read(struct a6xx_gpu *a6xx_gpu, u32 reg)
-{
-	return msm_readl(a6xx_gpu->llc_mmio + (reg << 2));
-}
-
-static void a6xx_llc_write(struct a6xx_gpu *a6xx_gpu, u32 reg, u32 value)
-{
-	msm_writel(value, a6xx_gpu->llc_mmio + (reg << 2));
-}
-
 static void a6xx_llc_deactivate(struct a6xx_gpu *a6xx_gpu)
 {
 	llcc_slice_deactivate(a6xx_gpu->llc_slice);
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
index c788b06e72da..39d1f1f5a6d1 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
@@ -62,6 +62,21 @@ static inline bool a6xx_has_gbif(struct adreno_gpu *gpu)
 	return true;
 }
 
+static inline void a6xx_llc_rmw(struct a6xx_gpu *a6xx_gpu, u32 reg, u32 mask, u32 or)
+{
+	return msm_rmw(a6xx_gpu->llc_mmio + (reg << 2), mask, or);
+}
+
+static inline u32 a6xx_llc_read(struct a6xx_gpu *a6xx_gpu, u32 reg)
+{
+	return msm_readl(a6xx_gpu->llc_mmio + (reg << 2));
+}
+
+static inline void a6xx_llc_write(struct a6xx_gpu *a6xx_gpu, u32 reg, u32 value)
+{
+	msm_writel(value, a6xx_gpu->llc_mmio + (reg << 2));
+}
+
 #define shadowptr(_a6xx_gpu, _ring) ((_a6xx_gpu)->shadow_iova + \
 		((_ring)->id * sizeof(uint32_t)))
 

-- 
2.41.0


  parent reply	other threads:[~2023-06-28 20:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 20:35 [PATCH 00/14] A7xx support Konrad Dybcio
2023-06-28 20:35 ` [PATCH 01/14] dt-bindings: display/msm/gmu: Add Adreno 7[34]0 GMU Konrad Dybcio
2023-07-04  8:25   ` Krzysztof Kozlowski
2023-06-28 20:35 ` [PATCH 02/14] dt-bindings: display/msm/gmu: Allow passing QMP handle Konrad Dybcio
2023-07-04  8:29   ` Krzysztof Kozlowski
2023-07-15 15:15     ` Konrad Dybcio
2023-06-28 20:35 ` [PATCH 03/14] dt-bindings: display/msm/gpu: Allow A7xx SKUs Konrad Dybcio
2023-07-04  8:30   ` Krzysztof Kozlowski
2023-06-28 20:35 ` [PATCH 04/14] drm/msm/a6xx: Add missing regs for A7XX Konrad Dybcio
2023-06-28 20:35 ` [PATCH 05/14] drm/msm/a6xx: Introduce a6xx_llc_read Konrad Dybcio
2023-06-28 20:35 ` Konrad Dybcio [this message]
2023-06-28 20:35 ` [PATCH 07/14] drm/msm/a6xx: Bail out early if setting GPU OOB fails Konrad Dybcio
2023-06-28 20:35 ` [PATCH 08/14] drm/msm/a6xx: Add skeleton A7xx support Konrad Dybcio
2023-06-28 20:35 ` [PATCH 09/14] drm/msm/a6xx: Send ACD state to QMP at GMU resume Konrad Dybcio
2023-06-28 20:35 ` [PATCH 10/14] drm/msm/a6xx: Mostly implement A7xx gpu_state Konrad Dybcio
2023-06-28 20:35 ` [PATCH 11/14] drm/msm/a6xx: Add A730 support Konrad Dybcio
2023-06-28 20:35 ` [PATCH 12/14] drm/msm/a6xx: Add A740 support Konrad Dybcio
2023-06-28 20:35 ` [PATCH 13/14] drm/msm/a6xx: Vastly increase HFI timeout Konrad Dybcio
2023-06-28 20:35 ` [PATCH RFC 14/14] drm/msm/a6xx: Poll for GBIF unhalt status in hw_init Konrad Dybcio
2023-07-31 16:42 ` [PATCH 00/14] A7xx support Dmitry Baryshkov
2023-08-03  8:48 ` Neil Armstrong

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=20230628-topic-a7xx_drmmsm-v1-6-a7f4496e0c12@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@poorly.run \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).