}
 
        if ((ib->flags & AMDGPU_IB_FLAGS_SECURE) &&
-           (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)) {
-               dev_err(adev->dev, "secure submissions not supported on compute rings\n");
+           (!ring->funcs->secure_submission_supported)) {
+               dev_err(adev->dev, "secure submissions not supported on ring <%s>\n", ring->name);
                return -EINVAL;
        }
 
 
        u32                     nop;
        bool                    support_64bit_ptrs;
        bool                    no_user_fence;
+       bool                    secure_submission_supported;
        unsigned                vmhub;
        unsigned                extra_dw;
 
 
        .align_mask = 0xff,
        .nop = PACKET3(PACKET3_NOP, 0x3FFF),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_GFXHUB_0,
        .get_rptr = gfx_v10_0_ring_get_rptr_gfx,
        .get_wptr = gfx_v10_0_ring_get_wptr_gfx,
 
        .align_mask = 0xff,
        .nop = PACKET3(PACKET3_NOP, 0x3FFF),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_GFXHUB_0,
        .get_rptr = gfx_v9_0_ring_get_rptr_gfx,
        .get_wptr = gfx_v9_0_ring_get_wptr_gfx,
 
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = false,
+       .secure_submission_supported = true,
        .get_rptr = sdma_v2_4_ring_get_rptr,
        .get_wptr = sdma_v2_4_ring_get_wptr,
        .set_wptr = sdma_v2_4_ring_set_wptr,
 
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = false,
+       .secure_submission_supported = true,
        .get_rptr = sdma_v3_0_ring_get_rptr,
        .get_wptr = sdma_v3_0_ring_get_wptr,
        .set_wptr = sdma_v3_0_ring_set_wptr,
 
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = sdma_v4_0_ring_get_rptr,
        .get_wptr = sdma_v4_0_ring_get_wptr,
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_1,
        .get_rptr = sdma_v4_0_ring_get_rptr,
        .get_wptr = sdma_v4_0_ring_get_wptr,
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = sdma_v4_0_ring_get_rptr,
        .get_wptr = sdma_v4_0_page_ring_get_wptr,
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_1,
        .get_rptr = sdma_v4_0_ring_get_rptr,
        .get_wptr = sdma_v4_0_page_ring_get_wptr,
 
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_GFXHUB_0,
        .get_rptr = sdma_v5_0_ring_get_rptr,
        .get_wptr = sdma_v5_0_ring_get_wptr,
 
        .align_mask = 0xf,
        .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
        .support_64bit_ptrs = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_GFXHUB_0,
        .get_rptr = sdma_v5_2_ring_get_rptr,
        .get_wptr = sdma_v5_2_ring_get_wptr,
 
        .align_mask = 0xf,
        .support_64bit_ptrs = false,
        .no_user_fence = true,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = vcn_v1_0_dec_ring_get_rptr,
        .get_wptr = vcn_v1_0_dec_ring_get_wptr,
 
 static const struct amdgpu_ring_funcs vcn_v2_0_dec_ring_vm_funcs = {
        .type = AMDGPU_RING_TYPE_VCN_DEC,
        .align_mask = 0xf,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = vcn_v2_0_dec_ring_get_rptr,
        .get_wptr = vcn_v2_0_dec_ring_get_wptr,
 
 static const struct amdgpu_ring_funcs vcn_v2_5_dec_ring_vm_funcs = {
        .type = AMDGPU_RING_TYPE_VCN_DEC,
        .align_mask = 0xf,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_1,
        .get_rptr = vcn_v2_5_dec_ring_get_rptr,
        .get_wptr = vcn_v2_5_dec_ring_get_wptr,
 static const struct amdgpu_ring_funcs vcn_v2_6_dec_ring_vm_funcs = {
        .type = AMDGPU_RING_TYPE_VCN_DEC,
        .align_mask = 0xf,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = vcn_v2_5_dec_ring_get_rptr,
        .get_wptr = vcn_v2_5_dec_ring_get_wptr,
 
        .type = AMDGPU_RING_TYPE_VCN_DEC,
        .align_mask = 0x3f,
        .nop = VCN_DEC_SW_CMD_NO_OP,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = vcn_v3_0_dec_ring_get_rptr,
        .get_wptr = vcn_v3_0_dec_ring_get_wptr,
 static const struct amdgpu_ring_funcs vcn_v3_0_dec_ring_vm_funcs = {
        .type = AMDGPU_RING_TYPE_VCN_DEC,
        .align_mask = 0xf,
+       .secure_submission_supported = true,
        .vmhub = AMDGPU_MMHUB_0,
        .get_rptr = vcn_v3_0_dec_ring_get_rptr,
        .get_wptr = vcn_v3_0_dec_ring_get_wptr,