Skip to contentSkip to conversation

drm/amdgpu: don't put MQDs in VRAM on ARM | ARM64

PATCH In review Alex Deucher 3 participants 3 messages Oct 31, 2023 – Nov 7, 2023

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: don't put MQDs in VRAM on ARM | ARM64

Issues were reported with commit 1cfb4d612127 ("drm/amdgpu: put MQDs in VRAM") on an ADLINK Ampere Altra Developer Platform (AVA developer platform).

Various ARM systems seem to have problems related to PCIe and MMIO access. In this case, I'm not sure if this is specific to the ADLINK platform or ARM in general. Seems to be some coherency issue with VRAM. For now, just don't put MQDs in VRAM on ARM.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2 -0
index c92e0aba69e1..a2a29dcb2422 100644
@@ -385,9 +385,11 @@ int amdgpu_gfx_mqd_sw_init(struct amdgpu_device *adev,
 	struct amdgpu_ring *ring = &kiq->ring;
 	u32 domain = AMDGPU_GEM_DOMAIN_GTT;
 
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
 	/* Only enable on gfx10 and 11 for now to avoid changing behavior on older chips */
 	if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(10, 0, 0))
 		domain |= AMDGPU_GEM_DOMAIN_VRAM;
+#endif
 
 	/* create MQD for KIQ */
 	if (!adev->enable_mes_kiq && !ring->mqd_obj) {
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw

Am 31.10.23 um 18:54 schrieb Alex Deucher:

Quoted 10 lines

Issues were reported with commit 1cfb4d612127 ("drm/amdgpu: put MQDs in VRAM") on an ADLINK Ampere Altra Developer Platform (AVA developer platform).

Various ARM systems seem to have problems related to PCIe and MMIO access. In this case, I'm not sure if this is specific to the ADLINK platform or ARM in general. Seems to be some coherency issue with VRAM. For now, just don't put MQDs in VRAM on ARM.

Quoted 4 lines
Quoted 20 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2 -0
index c92e0aba69e1..a2a29dcb2422 100644
@@ -385,9 +385,11 @@ int amdgpu_gfx_mqd_sw_init(struct amdgpu_device *adev,
  	struct amdgpu_ring *ring = &kiq->ring;
  	u32 domain = AMDGPU_GEM_DOMAIN_GTT;
 
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
  	/* Only enable on gfx10 and 11 for now to avoid changing behavior on older chips */
  	if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(10, 0, 0))
  		domain |= AMDGPU_GEM_DOMAIN_VRAM;
+#endif
 
  	/* create MQD for KIQ */
  	if (!adev->enable_mes_kiq && !ring->mqd_obj) {
#2 lore raw
In reply to Alex Deucher
Quoted 11 lines · Alex Deucher

Issues were reported with commit 1cfb4d612127 ("drm/amdgpu: put MQDs in VRAM") on an ADLINK Ampere Altra Developer Platform (AVA developer platform).

Various ARM systems seem to have problems related to PCIe and MMIO access. In this case, I'm not sure if this is specific to the ADLINK platform or ARM in general. Seems to be some coherency issue with VRAM. For now, just don't put MQDs in VRAM on ARM.

Quoted 4 lines

Thanks for the patch! Can you please give me day or two to test it a little bit more? I am still trying ti figure out if page faults in GPU depend on this patch or not. I can provide Tested-by tag then.

Also, FWIW maybe you can add Reported-by tag.

Thanks,
Alexey

Quoted 23 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2 -1
index c92e0aba69e1..a2a29dcb2422 100644
@@ -385,9 +385,11 @@ int amdgpu_gfx_mqd_sw_init(struct amdgpu_device *adev,
        struct amdgpu_ring *ring = &kiq->ring;
        u32 domain = AMDGPU_GEM_DOMAIN_GTT;
 
+#if !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
        /* Only enable on gfx10 and 11 for now to avoid changing behavior on older chips */
        if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(10, 0, 0))
                domain |= AMDGPU_GEM_DOMAIN_VRAM;
+#endif
 
        /* create MQD for KIQ */
        if (!adev->enable_mes_kiq && !ring->mqd_obj) {
--

2.41.0