]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu/mes: Simplify hqd mask initialization
authorLang Yu <lang.yu@amd.com>
Fri, 19 Dec 2025 12:27:00 +0000 (20:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 10 Jan 2026 19:21:52 +0000 (14:21 -0500)
commit0f744593adecfa12ce7c4bfc4a6c2850458c4e88
treee32a635673300f133d3dafa1ccaef4569dc694a4
parentefdc66fe12b07e7b7d28650bd8d4f7e3bb92c5d4
drm/amdgpu/mes: Simplify hqd mask initialization

"adev->mes.compute_hqd_mask[i] = adev->gfx.disable_kq ? 0xF"
is actually incorrect for MEC with 8 queues per pipe.
Let's get rid of version check and hardcode, calculate hqd
mask with number of queues per pipe and number of gfx/compute
queues kernel used.

Currently, only MEC1 is used for both kernel/user compute queue.
To enable other MEC, we need to redistribute queues per pipe and
adjust queue resource shared with kfd that needs a separate patch.
Just skip other MEC for now to avoid potential issues.

v2: Force reserved queues to 0 if kernel queue is explicitly disabled.

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c