Skip to contentSkip to conversation

drm/amdgpu/userq: drop VCN and VPE doorbell handling

PATCH In review Alex Deucher 2 participants 2 messages Oct 8, 2025 – Oct 9, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/userq: drop VCN and VPE doorbell handling

VCN and VPE userqs are not yet supported and this code is not correct. Userspace should provide the correct doorbell offset with in their doorbell page for the IP. Adjusting it here will not work as expected as userspace and the queue itself will have different offsets.

We need to add a INFO IOCTL query to get the offset and range for each IP within the doorbell page to handle this properly.

Cc Saleemkhan Jamadar <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -11
index 8dc12064da495..916ce142b3c92 100644
@@ -319,17 +319,6 @@ amdgpu_userq_get_doorbell_index(struct amdgpu_userq_mgr *uq_mgr,
 	case AMDGPU_HW_IP_DMA:
 		db_size = sizeof(u64);
 		break;
-
-	case AMDGPU_HW_IP_VCN_ENC:
-		db_size = sizeof(u32);
-		db_info->doorbell_offset += AMDGPU_NAVI10_DOORBELL64_VCN0_1 << 1;
-		break;
-
-	case AMDGPU_HW_IP_VPE:
-		db_size = sizeof(u32);
-		db_info->doorbell_offset += AMDGPU_NAVI10_DOORBELL64_VPE << 1;
-		break;
-
 	default:
 		drm_file_err(uq_mgr->file, "[Usermode queues] IP %d not support\n",
 			     db_info->queue_type);
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Alex,

With this change the expectation from userspace will be to provide offset starting the doorbell range received over INFO_IOCTL.

Change looks good to me, we will have INFO_IOCTL to share doorbell info userspace

Regards,

Saleem

Quoted 38 lines · Alex Deucher

VCN and VPE userqs are not yet supported and this code is not correct. Userspace should provide the correct doorbell offset with in their doorbell page for the IP. Adjusting it here will not work as expected as userspace and the queue itself will have different offsets.

We need to add a INFO IOCTL query to get the offset and range for each IP within the doorbell page to handle this properly.

Cc Saleemkhan Jamadar <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 11 -----------
  1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -11
index 8dc12064da495..916ce142b3c92 100644
@@ -319,17 +319,6 @@ amdgpu_userq_get_doorbell_index(struct amdgpu_userq_mgr *uq_mgr,
  	case AMDGPU_HW_IP_DMA:
  		db_size = sizeof(u64);
  		break;
-
-	case AMDGPU_HW_IP_VCN_ENC:
-		db_size = sizeof(u32);
-		db_info->doorbell_offset += AMDGPU_NAVI10_DOORBELL64_VCN0_1 << 1;
-		break;
-
-	case AMDGPU_HW_IP_VPE:
-		db_size = sizeof(u32);
-		db_info->doorbell_offset += AMDGPU_NAVI10_DOORBELL64_VPE << 1;
-		break;
-
  	default:
  		drm_file_err(uq_mgr->file, "[Usermode queues] IP %d not support\n",
  			     db_info->queue_type);