drm/amdgpu: add helper function to initialize mqd from ring v4
authorJack Xiao <Jack.Xiao@amd.com>
Wed, 1 Jul 2020 04:23:06 +0000 (12:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 14:03:14 +0000 (10:03 -0400)
commit80af9daa62faeb9397a80ddf5777f97809efb166
treea567f240cbd061e4217195a4c0b216999722c67c
parent5405a526276a51905bca0ad3d155cf3f8822563a
drm/amdgpu: add helper function to initialize mqd from ring v4

Add the helper function to initialize mqd from ring configuration.

v2: use if/else pair instead of ?/: pair
v3: use simpler way to judge hqd_active
v4: fix parameters to amdgpu_gfx_is_high_priority_compute_queue

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Christian König <christian.koenig@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_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h