Skip to contentSkip to conversation

drm/amdgpu: Fix query for VPE block_type and ip_count

PATCH In review Alan Liu 2 participants 2 messages Dec 23, 2025

Subsystems (2)
lore
Share & tools
lore

Alan Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix query for VPE block_type and ip_count

[Why]
Query for VPE block_type and ip_count is missing.

[How]
Add VPE case in ip_block_type and hw_ip_count query.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +6 -0
index 3d286913e9b6..728033a88078 100644
@@ -201,6 +201,9 @@ static enum amd_ip_block_type
 		type = (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_JPEG)) ?
 				   AMD_IP_BLOCK_TYPE_JPEG : AMD_IP_BLOCK_TYPE_VCN;
 		break;
+	case AMDGPU_HW_IP_VPE:
+		type = AMD_IP_BLOCK_TYPE_VPE;
+		break;
 	default:
 		type = AMD_IP_BLOCK_TYPE_NUM;
 		break;
@@ -757,6 +760,9 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 		case AMD_IP_BLOCK_TYPE_UVD:
 			count = adev->uvd.num_uvd_inst;
 			break;
+		case AMD_IP_BLOCK_TYPE_VPE:
+			count = adev->vpe.num_instances;
+			break;
 		/* For all other IP block types not listed in the switch statement
 		 * the ip status is valid here and the instance count is one.
 		 */
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

[Public]

Quoted 8 lines

-----Original Message-----
From: Alan Liu <[email protected]>
Sent: Tuesday, December 23, 2025 11:02 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Yu, Lang <[email protected]>; Liu, HaoPing (Alan) <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix query for VPE block_type and ip_count

Quoted 7 lines

[Why]
Query for VPE block_type and ip_count is missing.

[How]
Add VPE case in ip_block_type and hw_ip_count query.

Quoted 34 lines

---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++++++

1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -0
index 3d286913e9b6..728033a88078 100644
@@ -201,6 +201,9 @@ static enum amd_ip_block_type
              type = (amdgpu_device_ip_get_ip_block(adev,

AMD_IP_BLOCK_TYPE_JPEG)) ?
AMD_IP_BLOCK_TYPE_JPEG :

AMD_IP_BLOCK_TYPE_VCN;
              break;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +6 -0
+      case AMDGPU_HW_IP_VPE:
+              type = AMD_IP_BLOCK_TYPE_VPE;
+              break;
      default:
              type = AMD_IP_BLOCK_TYPE_NUM;
              break;
@@ -757,6 +760,9 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data,
 struct drm_file *filp)
              case AMD_IP_BLOCK_TYPE_UVD:
                      count = adev->uvd.num_uvd_inst;
                      break;
+              case AMD_IP_BLOCK_TYPE_VPE:
+                      count = adev->vpe.num_instances;
+                      break;
              /* For all other IP block types not listed in the switch statement
               * the ip status is valid here and the instance count is one.
               */

--
2.43.0