drm/amdgpu: separate the mqd_backup for kiq from kcq
authorLe Ma <le.ma@amd.com>
Tue, 16 Nov 2021 13:56:34 +0000 (21:56 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Apr 2023 20:28:55 +0000 (16:28 -0400)
This will benifit the mqd indexing for kiq/kcq in multi XCD case.

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h

index 8303233..d811cb0 100644 (file)
@@ -75,7 +75,7 @@ struct amdgpu_mec {
        u32 num_mec;
        u32 num_pipe_per_mec;
        u32 num_queue_per_pipe;
-       void                    *mqd_backup[AMDGPU_MAX_COMPUTE_RINGS + 1];
+       void                    *mqd_backup[AMDGPU_MAX_COMPUTE_RINGS * AMDGPU_MAX_GC_INSTANCES];
 };
 
 struct amdgpu_mec_bitmap {
@@ -122,6 +122,7 @@ struct amdgpu_kiq {
        struct amdgpu_ring      ring;
        struct amdgpu_irq_src   irq;
        const struct kiq_pm4_funcs *pmf;
+       void                    *mqd_backup;
 };
 
 /*