drm/amdgpu/vcn: enable TMZ support for vcn 4_0_5
authorSaleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Mon, 10 Feb 2025 15:02:13 +0000 (20:32 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Feb 2025 02:05:50 +0000 (21:05 -0500)
TMZ support is enabled for vcn on GC IP 11_5_0

Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c

index 23d3c16c9d9f290b24e0a9c8bad3fd3d9640ad7e..5d757e7de9dbb466be830ac4fbf939e5d7274346 100644 (file)
@@ -1397,7 +1397,7 @@ static void vcn_v4_0_5_unified_ring_set_wptr(struct amdgpu_ring *ring)
        }
 }
 
-static const struct amdgpu_ring_funcs vcn_v4_0_5_unified_ring_vm_funcs = {
+static struct amdgpu_ring_funcs vcn_v4_0_5_unified_ring_vm_funcs = {
        .type = AMDGPU_RING_TYPE_VCN_ENC,
        .align_mask = 0x3f,
        .nop = VCN_ENC_CMD_NO_OP,
@@ -1441,6 +1441,9 @@ static void vcn_v4_0_5_set_unified_ring_funcs(struct amdgpu_device *adev)
                if (adev->vcn.harvest_config & (1 << i))
                        continue;
 
+               if (amdgpu_ip_version(adev, VCN_HWIP, 0) == IP_VERSION(4, 0, 5))
+                       vcn_v4_0_5_unified_ring_vm_funcs.secure_submission_supported = true;
+
                adev->vcn.inst[i].ring_enc[0].funcs = &vcn_v4_0_5_unified_ring_vm_funcs;
                adev->vcn.inst[i].ring_enc[0].me = i;
        }