Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu/mes11: fix to unmap legacy queue

MES fw updated to support unmapping legacy gfx/compute queue.

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>

authored by

Jack Xiao and committed by
Alex Deucher
7acd7ab0 b278b738

+9 -6
+4 -5
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
··· 216 216 mes_remove_queue_pkt.header.opcode = MES_SCH_API_REMOVE_QUEUE; 217 217 mes_remove_queue_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS; 218 218 219 - mes_remove_queue_pkt.doorbell_offset = input->doorbell_offset << 2; 219 + mes_remove_queue_pkt.doorbell_offset = input->doorbell_offset; 220 220 mes_remove_queue_pkt.gang_context_addr = 0; 221 221 222 222 mes_remove_queue_pkt.pipe_id = input->pipe_id; ··· 228 228 mes_remove_queue_pkt.tf_data = 229 229 lower_32_bits(input->trail_fence_data); 230 230 } else { 231 - if (input->queue_type == AMDGPU_RING_TYPE_GFX) 232 - mes_remove_queue_pkt.unmap_legacy_gfx_queue = 1; 233 - else 234 - mes_remove_queue_pkt.unmap_kiq_utility_queue = 1; 231 + mes_remove_queue_pkt.unmap_legacy_queue = 1; 232 + mes_remove_queue_pkt.queue_type = 233 + convert_to_mes_queue_type(input->queue_type); 235 234 } 236 235 237 236 mes_remove_queue_pkt.api_status.api_completion_fence_addr =
+5 -1
drivers/gpu/drm/amd/include/mes_v11_api_def.h
··· 227 227 uint32_t uint32_t_all; 228 228 }; 229 229 uint32_t oversubscription_timer; 230 + uint64_t doorbell_info; 230 231 }; 231 232 232 233 uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS]; ··· 287 286 uint32_t unmap_legacy_gfx_queue : 1; 288 287 uint32_t unmap_kiq_utility_queue : 1; 289 288 uint32_t preempt_legacy_gfx_queue : 1; 290 - uint32_t reserved : 29; 289 + uint32_t unmap_legacy_queue : 1; 290 + uint32_t reserved : 28; 291 291 }; 292 292 struct MES_API_STATUS api_status; 293 293 ··· 297 295 298 296 uint64_t tf_addr; 299 297 uint32_t tf_data; 298 + 299 + enum MES_QUEUE_TYPE queue_type; 300 300 }; 301 301 302 302 uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];