From: Jordan Crouse <jcrouse@codeaurora.org>
To: Jonathan Marek <jonathan@marek.ca>
Cc: freedreno@lists.freedesktop.org, Rob Clark <robdclark@gmail.com>,
Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
Sharat Masetty <smasetty@codeaurora.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@vger.kernel.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<dri-devel@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 8/9] drm/msm/a6xx: enable GMU log
Date: Thu, 23 Apr 2020 10:21:30 -0600 [thread overview]
Message-ID: <20200423162130.GA23271@jcrouse1-lnx.qualcomm.com> (raw)
In-Reply-To: <20200421234127.27965-9-jonathan@marek.ca>
On Tue, Apr 21, 2020 at 07:41:26PM -0400, Jonathan Marek wrote:
> This is required for a650 to work.
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 15 +++++++++++++++
> drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 1 +
> drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 4 ++++
> 3 files changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 60ed5360fd8a..f24e436daafe 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -201,6 +201,12 @@ static int a6xx_gmu_start(struct a6xx_gmu *gmu)
> u32 val;
>
> gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 1);
> +
> + /* Set the log wptr index
> + * note: downstream saves the value in poweroff and restores it here
> + */
> + gmu_write(gmu, REG_A6XX_GPU_GMU_CX_GMU_PWR_COL_CP_RESP, 0);
> +
> gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 0);
>
> ret = gmu_poll_timeout(gmu, REG_A6XX_GMU_CM3_FW_INIT_RESULT, val,
> @@ -740,6 +746,9 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
>
> gmu_write(gmu, REG_A6XX_GMU_HFI_SFR_ADDR, chipid);
>
> + gmu_write(gmu, REG_A6XX_GPU_GMU_CX_GMU_PWR_COL_CP_MSG,
> + gmu->log.iova | (gmu->log.size / SZ_4K - 1));
> +
> /* Set up the lowest idle level on the GMU */
> a6xx_gmu_power_config(gmu);
>
> @@ -1046,6 +1055,7 @@ static void a6xx_gmu_memory_free(struct a6xx_gmu *gmu)
> msm_gem_kernel_put(gmu->icache.obj, gmu->aspace, false);
> msm_gem_kernel_put(gmu->dcache.obj, gmu->aspace, false);
> msm_gem_kernel_put(gmu->dummy.obj, gmu->aspace, false);
> + msm_gem_kernel_put(gmu->log.obj, gmu->aspace, false);
>
> gmu->aspace->mmu->funcs->detach(gmu->aspace->mmu);
> msm_gem_address_space_put(gmu->aspace);
> @@ -1450,6 +1460,11 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
> if (ret)
> goto err_memory;
>
> + /* Allocate memory for the GMU log region */
> + ret = a6xx_gmu_memory_alloc(gmu, &gmu->log, SZ_4K, 0);
> + if (ret)
> + goto err_memory;
> +
> /* Map the GMU registers */
> gmu->mmio = a6xx_gmu_get_mmio(pdev, "gmu");
> if (IS_ERR(gmu->mmio)) {
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h
> index aed02b2b7659..be65720f32cf 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h
> @@ -61,6 +61,7 @@ struct a6xx_gmu {
> struct a6xx_gmu_bo icache;
> struct a6xx_gmu_bo dcache;
> struct a6xx_gmu_bo dummy;
> + struct a6xx_gmu_bo log;
>
> int nr_clocks;
> struct clk_bulk_data *clocks;
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h
> index b4357ea550ec..176ae94d9fe6 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h
> @@ -205,6 +205,10 @@ static inline uint32_t A6XX_GMU_GPU_NAP_CTRL_SID(uint32_t val)
>
> #define REG_A6XX_GPU_GMU_CX_GMU_CX_FAL_INTF 0x000050f0
>
> +#define REG_A6XX_GPU_GMU_CX_GMU_PWR_COL_CP_MSG 0x00005100
> +
> +#define REG_A6XX_GPU_GMU_CX_GMU_PWR_COL_CP_RESP 0x00005101
> +
> #define REG_A6XX_GMU_BOOT_KMD_LM_HANDSHAKE 0x000051f0
>
> #define REG_A6XX_GMU_LLM_GLM_SLEEP_CTRL 0x00005157
> --
> 2.26.1
>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2020-04-23 16:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200421234127.27965-1-jonathan@marek.ca>
2020-04-21 23:41 ` [PATCH v2 1/9] drm/msm: add msm_gem_get_and_pin_iova_range Jonathan Marek
2020-04-21 23:41 ` [PATCH v2 2/9] drm/msm: add internal MSM_BO_MAP_PRIV flag Jonathan Marek
2020-04-23 15:25 ` [Freedreno] " Jordan Crouse
2020-04-21 23:41 ` [PATCH v2 3/9] drm/msm/a6xx: use msm_gem for GMU memory objects Jonathan Marek
2020-04-23 15:34 ` Jordan Crouse
2020-04-21 23:41 ` [PATCH v2 4/9] drm/msm/a6xx: add A640/A650 to gpulist Jonathan Marek
2020-04-23 15:38 ` Jordan Crouse
2020-04-21 23:41 ` [PATCH v2 5/9] drm/msm/a6xx: HFI v2 for A640 and A650 Jonathan Marek
2020-04-23 16:25 ` Jordan Crouse
2020-04-21 23:41 ` [PATCH v2 6/9] drm/msm/a6xx: A640/A650 GMU firmware path Jonathan Marek
2020-04-23 16:20 ` Jordan Crouse
2020-04-23 17:36 ` Ruhl, Michael J
2020-04-21 23:41 ` [PATCH v2 7/9] drm/msm/a6xx: update pdc/rscc GMU registers for A640/A650 Jonathan Marek
2020-04-23 15:53 ` Jordan Crouse
2020-04-21 23:41 ` [PATCH v2 8/9] drm/msm/a6xx: enable GMU log Jonathan Marek
2020-04-23 16:21 ` Jordan Crouse [this message]
2020-04-21 23:41 ` [PATCH v2 9/9] drm/msm/a6xx: update a6xx_hw_init for A640 and A650 Jonathan Marek
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=20200423162130.GA23271@jcrouse1-lnx.qualcomm.com \
--to=jcrouse@codeaurora.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.j.ruhl@intel.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.org \
/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).