]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: Fix query for VPE block_type and ip_count
authorAlan Liu <haoping.liu@amd.com>
Mon, 22 Dec 2025 04:26:35 +0000 (12:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:31:16 +0000 (16:31 +0100)
commit 72d7f4573660287f1b66c30319efecd6fcde92ee upstream.

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

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

Reviewed-by: Lang Yu <lang.yu@amd.com>
Signed-off-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a6ea0a430aca5932b9c75d8e38deeb45665dd2ae)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index 1291ca57a1cb331b2cbdeb6eef8fd04799df29b3..78e36d889d0bfbbd781e719ac98adf7c4698a758 100644 (file)
@@ -200,6 +200,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;
@@ -670,6 +673,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.
                 */