Merge tag 'amd-drm-next-6.9-2024-03-08-1' of https://gitlab.freedesktop.org/agd5f...
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_discovery.c
index 5023337..a07e4b8 100644 (file)
@@ -61,6 +61,7 @@
 #include "nbio_v4_3.h"
 #include "nbio_v7_2.h"
 #include "nbio_v7_7.h"
+#include "nbif_v6_3_1.h"
 #include "hdp_v5_0.h"
 #include "hdp_v5_2.h"
 #include "hdp_v6_0.h"
@@ -1319,6 +1320,15 @@ static int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)
                                }
                        }
 
+                       if (le16_to_cpu(ip->hw_id) == VPE_HWID) {
+                               if (adev->vpe.num_instances < AMDGPU_MAX_VPE_INSTANCES)
+                                       adev->vpe.num_instances++;
+                               else
+                                       dev_err(adev->dev, "Too many VPE instances: %d vs %d\n",
+                                               adev->vpe.num_instances + 1,
+                                               AMDGPU_MAX_VPE_INSTANCES);
+                       }
+
                        if (le16_to_cpu(ip->hw_id) == UMC_HWID) {
                                adev->gmc.num_umc++;
                                adev->umc.node_inst_num++;
@@ -1936,6 +1946,7 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
                case IP_VERSION(3, 2, 0):
                case IP_VERSION(3, 2, 1):
                case IP_VERSION(3, 5, 0):
+               case IP_VERSION(3, 5, 1):
                        if (amdgpu_sriov_vf(adev))
                                amdgpu_discovery_set_sriov_display(adev);
                        else
@@ -2212,6 +2223,7 @@ static int amdgpu_discovery_set_vpe_ip_blocks(struct amdgpu_device *adev)
 {
        switch (amdgpu_ip_version(adev, VPE_HWIP, 0)) {
        case IP_VERSION(6, 1, 0):
+       case IP_VERSION(6, 1, 1):
                amdgpu_device_ip_block_add(adev, &vpe_v6_1_ip_block);
                break;
        default:
@@ -2558,6 +2570,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
                adev->nbio.funcs = &nbio_v7_7_funcs;
                adev->nbio.hdp_flush_reg = &nbio_v7_7_hdp_flush_reg;
                break;
+       case IP_VERSION(6, 3, 1):
+               adev->nbio.funcs = &nbif_v6_3_1_funcs;
+               adev->nbio.hdp_flush_reg = &nbif_v6_3_1_hdp_flush_reg;
+               break;
        default:
                break;
        }