On Wed, Apr 16, 2025 at 8:43 PM Fugang Duan <fugang.d...@cixtech.com> wrote:
>
> 发件人: Alex Deucher <alexdeuc...@gmail.com> 发送时间: 2025年4月16日 22:49
> >收件人: Alexey Klimov <alexey.kli...@linaro.org>
> >On Wed, Apr 16, 2025 at 9:48 AM Alexey Klimov <alexey.kli...@linaro.org> 
> >wrote:
> >>
> >> On Wed Apr 16, 2025 at 4:12 AM BST, Fugang Duan wrote:
> >> > 发件人: Alexey Klimov <alexey.kli...@linaro.org> 发送时间: 2025年4月16
> >日 2:28
> >> >>#regzbot introduced: v6.12..v6.13
> >>
> >> [..]
> >>
> >> >>The only change related to hdp_v5_0_flush_hdp() was
> >> >>cf424020e040 drm/amdgpu/hdp5.0: do a posting read when flushing HDP
> >> >>
> >> >>Reverting that commit ^^ did help and resolved that problem. Before
> >> >>sending revert as-is I was interested to know if there supposed to
> >> >>be a proper fix for this or maybe someone is interested to debug this or
> >have any suggestions.
> >> >>
> >> > Can you revert the change and try again
> >> > https://gitlab.com/linux-kernel/linux/-/commit/cf424020e040be35df05b
> >> > 682b546b255e74a420f
> >>
> >> Please read my email in the first place.
> >> Let me quote just in case:
> >>
> >> >The only change related to hdp_v5_0_flush_hdp() was
> >> >cf424020e040 drm/amdgpu/hdp5.0: do a posting read when flushing HDP
> >>
> >> >Reverting that commit ^^ did help and resolved that problem.
> >
> >We can't really revert the change as that will lead to coherency problems.  
> >What
> >is the page size on your system?  Does the attached patch fix it?
> >
> >Alex
> >
> 4K page size.  We can try the fix if we got the environment.

OK.  that patch won't change anything then.  Can you try this patch instead?

Alex

>
> Fugang
>
>
>
> This email (including its attachments) is intended only for the person or 
> entity to which it is addressed and may contain information that is 
> privileged, confidential or otherwise protected from disclosure. Unauthorized 
> use, dissemination, distribution or copying of this email or the information 
> herein or taking any action in reliance on the contents of this email or the 
> information herein, by anyone other than the intended recipient, or an 
> employee or agent responsible for delivering the message to the intended 
> recipient, is strictly prohibited. If you are not the intended recipient, 
> please do not read, copy, use or disclose any part of this e-mail to others. 
> Please notify the sender immediately and permanently delete this e-mail and 
> any attachments if you received it in error. Internet communications cannot 
> be guaranteed to be timely, secure, error-free or virus-free. The sender does 
> not accept liability for any errors or omissions.
From b29d05fefa5da2875147cfce43f57f151d611ca1 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deuc...@amd.com>
Date: Thu, 17 Apr 2025 09:04:21 -0400
Subject: [PATCH] drm/amdgpu: don't remap the HDP registers on ARM

We remap the HDP registers to an open part of the MMIO
aperture.  This doesn't seem to work properly on at least
one ARM system, so just skip the HDP remap altogether on ARM.

Fixes: c9b8dcabb52a ("drm/amdgpu/hdp4.0: do a posting read when flushing HDP")
Fixes: cf424020e040 ("drm/amdgpu/hdp5.0: do a posting read when flushing HDP")
Fixes: f756dbac1ce1 ("drm/amdgpu/hdp5.2: do a posting read when flushing HDP")
Fixes: abe1cbaec6cf ("drm/amdgpu/hdp6.0: do a posting read when flushing HDP")
Fixes: 689275140cb8 ("drm/amdgpu/hdp7.0: do a posting read when flushing HDP")
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/nv.c    | 2 ++
 drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/soc21.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/soc24.c | 3 ++-
 4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 50e77d9b30afa..f08f30fe20aca 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -1002,8 +1002,10 @@ static int nv_common_hw_init(struct amdgpu_ip_block *ip_block)
 	 * for the purpose of expose those registers
 	 * to process space
 	 */
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
 	if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev))
 		adev->nbio.funcs->remap_hdp_registers(adev);
+#endif
 	/* enable the doorbell aperture */
 	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index c457be3a3c56f..9a4ebad774686 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -1297,8 +1297,10 @@ static int soc15_common_hw_init(struct amdgpu_ip_block *ip_block)
 	 * for the purpose of expose those registers
 	 * to process space
 	 */
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
 	if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev))
 		adev->nbio.funcs->remap_hdp_registers(adev);
+#endif
 
 	/* enable the doorbell aperture */
 	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
index ad36c96478a82..9dafa44c8e9f3 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc21.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc21.c
@@ -877,8 +877,10 @@ static int soc21_common_hw_init(struct amdgpu_ip_block *ip_block)
 	 * for the purpose of expose those registers
 	 * to process space
 	 */
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
 	if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev))
 		adev->nbio.funcs->remap_hdp_registers(adev);
+#endif
 	/* enable the doorbell aperture */
 	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
diff --git a/drivers/gpu/drm/amd/amdgpu/soc24.c b/drivers/gpu/drm/amd/amdgpu/soc24.c
index 972b449ab89fa..0430acf9b5c69 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc24.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc24.c
@@ -486,9 +486,10 @@ static int soc24_common_hw_init(struct amdgpu_ip_block *ip_block)
 	 * for the purpose of expose those registers
 	 * to process space
 	 */
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
 	if (adev->nbio.funcs->remap_hdp_registers)
 		adev->nbio.funcs->remap_hdp_registers(adev);
-
+#endif
 	if (adev->df.funcs->hw_init)
 		adev->df.funcs->hw_init(adev);
 
-- 
2.49.0

Reply via email to