Skip to contentSkip to conversation

drm/amdgpu/mes11: fix kiq ring ready flag

PATCH In review Jack Xiao 2 participants 2 messages Apr 30, 2024

Subsystems (2)
lore
Share & tools
lore

Jack Xiao

author
#0 lore raw

PATCH 1/1 drm/amdgpu/mes11: fix kiq ring ready flag

kiq ring test has overwitten ready flag,
need disable after gfx hw init.

---
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -1
index d98f6d282ae7..8263b97c4466 100644
@@ -1326,7 +1326,7 @@ static int mes_v11_0_hw_init(void *handle)
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	if (adev->mes.ring.sched.ready)
-		return 0;
+		goto out;
 
 	if (!adev->enable_mes_kiq) {
 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
@@ -1363,6 +1363,7 @@ static int mes_v11_0_hw_init(void *handle)
 		goto failure;
 	}
 
+out:
 	/*
 	 * Disable KIQ ring usage from the driver once MES is enabled.
 	 * MES uses KIQ ring exclusively so driver cannot access KIQ ring
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jack Xiao

kiq ring test has overwitten ready flag,
need disable after gfx hw init.

Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -2
index d98f6d282ae7..8263b97c4466 100644
@@ -1326,7 +1326,7 @@ static int mes_v11_0_hw_init(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
        if (adev->mes.ring.sched.ready)
-               return 0;
+               goto out;
 
        if (!adev->enable_mes_kiq) {
                if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
@@ -1363,6 +1363,7 @@ static int mes_v11_0_hw_init(void *handle)
                goto failure;
        }
 
+out:
        /*
         * Disable KIQ ring usage from the driver once MES is enabled.
         * MES uses KIQ ring exclusively so driver cannot access KIQ ring
--

2.41.0