Skip to content

Commit 9ffab03

Browse files
Jie1zhangalexdeucher
authored andcommitted
drm/amdgpu: Replace HQD terminology with slots naming
The term "HQD" is CP-specific and doesn't accurately describe the queue resources for other IP blocks like SDMA, VCN, or VPE. This change: 1. Renames `num_hqds` to `num_slots` in amdgpu_kms.c to better reflect the generic nature of the resource counting 2. Updates the UAPI struct member from `userq_num_hqds` to `userq_num_slots` 3. Maintains the same functionality while using more appropriate terminology Signed-off-by: Jesse Zhang <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 78d0a27 commit 9ffab03

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
399399
uint32_t ib_size_alignment = 0;
400400
enum amd_ip_block_type type;
401401
unsigned int num_rings = 0;
402-
uint32_t num_hqds = 0;
402+
uint32_t num_slots = 0;
403403
unsigned int i, j;
404404

405405
if (info->query_hw_ip.ip_instance >= AMDGPU_HW_IP_INSTANCE_MAX_COUNT)
@@ -415,7 +415,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
415415

416416
if (!adev->gfx.disable_uq) {
417417
for (i = 0; i < AMDGPU_MES_MAX_GFX_PIPES; i++)
418-
num_hqds += hweight32(adev->mes.gfx_hqd_mask[i]);
418+
num_slots += hweight32(adev->mes.gfx_hqd_mask[i]);
419419
}
420420

421421
ib_start_alignment = 32;
@@ -430,7 +430,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
430430

431431
if (!adev->sdma.disable_uq) {
432432
for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++)
433-
num_hqds += hweight32(adev->mes.compute_hqd_mask[i]);
433+
num_slots += hweight32(adev->mes.compute_hqd_mask[i]);
434434
}
435435

436436
ib_start_alignment = 32;
@@ -445,7 +445,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
445445

446446
if (!adev->gfx.disable_uq) {
447447
for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++)
448-
num_hqds += hweight32(adev->mes.sdma_hqd_mask[i]);
448+
num_slots += hweight32(adev->mes.sdma_hqd_mask[i]);
449449
}
450450

451451
ib_start_alignment = 256;
@@ -589,7 +589,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
589589
}
590590
result->capabilities_flags = 0;
591591
result->available_rings = (1 << num_rings) - 1;
592-
result->userq_num_hqds = num_hqds;
592+
result->userq_num_slots = num_slots;
593593
result->ib_start_alignment = ib_start_alignment;
594594
result->ib_size_alignment = ib_size_alignment;
595595
return 0;

include/uapi/drm/amdgpu_drm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,8 +1493,8 @@ struct drm_amdgpu_info_hw_ip {
14931493
__u32 available_rings;
14941494
/** version info: bits 23:16 major, 15:8 minor, 7:0 revision */
14951495
__u32 ip_discovery_version;
1496-
/* Userq available hqds */
1497-
__u32 userq_num_hqds;
1496+
/* Userq available slots */
1497+
__u32 userq_num_slots;
14981498
};
14991499

15001500
/* GFX metadata BO sizes and alignment info (in bytes) */

0 commit comments

Comments
 (0)