Skip to contentSkip to conversation

drm/amdkfd: Fix APU to use GTT, not VRAM for MQD

PATCH In review Siwei He 2 participants 2 messages Feb 9

Subsystems (3)
lore
Share & tools
lore

Siwei He

author
#0 lore raw

PATCH 1/1 drm/amdkfd: Fix APU to use GTT, not VRAM for MQD

Add a check in mqd_on_vram. If the device prefers GTT, it returns false

---
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +3 -0
index d4659a438be5..80e428f70725 100644
@@ -111,6 +111,9 @@ static void set_priority(struct v9_mqd *m, struct queue_properties *q)
 
 static bool mqd_on_vram(struct amdgpu_device *adev)
 {
+	if (adev->gmc.apu_prefer_gtt)
+		return false;
+
 	switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
 	case IP_VERSION(9, 4, 3):
 	case IP_VERSION(9, 5, 0):
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Siwei He

Add a check in mqd_on_vram. If the device prefers GTT, it returns false

Fixes d4a814f400d4 ("drm/amdkfd: Move gfx9.4.3 and gfx 9.5 MQD to HBM")
Quoted 21 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +3 -1
index d4659a438be5..80e428f70725 100644
@@ -111,6 +111,9 @@ static void set_priority(struct v9_mqd *m, struct queue_properties *q)
 
 static bool mqd_on_vram(struct amdgpu_device *adev)
 {
+       if (adev->gmc.apu_prefer_gtt)
+               return false;
+
        switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(9, 4, 3):
        case IP_VERSION(9, 5, 0):
--

2.43.0