drm/amdgpu/mes: set correct mes ring ready flag
authorJack Xiao <Jack.Xiao@amd.com>
Fri, 8 Jul 2022 08:01:36 +0000 (16:01 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 12 Jul 2022 19:33:17 +0000 (15:33 -0400)
Set corresponding ready flag for mes ring when enable or disable
mes ring.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mes_v10_1.c
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c

index 75cf92d..88317e7 100644 (file)
@@ -1124,6 +1124,7 @@ static int mes_v10_1_hw_init(void *handle)
         * with MES enabled.
         */
        adev->gfx.kiq.ring.sched.ready = false;
+       adev->mes.ring.sched.ready = true;
 
        return 0;
 
@@ -1136,6 +1137,8 @@ static int mes_v10_1_hw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       adev->mes.ring.sched.ready = false;
+
        mes_v10_1_enable(adev, false);
 
        if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
index b78e099..8dbce32 100644 (file)
@@ -1190,6 +1190,9 @@ failure:
 
 static int mes_v11_0_hw_fini(void *handle)
 {
+       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+       adev->mes.ring.sched.ready = false;
        return 0;
 }