AMD General

Reviewed-by: Leo Liu <[email protected]>


> -----Original Message-----
> From: amd-gfx <[email protected]> On Behalf Of
> Jeevana Muthyala
> Sent: May 19, 2026 9:15 AM
> To: Deucher, Alexander <[email protected]>; amd-
> [email protected]
> Cc: Muthyala, Jeevana <[email protected]>; Muthyala, Jeevana
> <[email protected]>
> Subject: [PATCH] drm/amdgpu/vcn5.0.0: enable secure submission on
> unified ring
>
> [Some people who received this message don't often get email from
> [email protected]. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Jeevana Muthyala <[email protected]>
>
> Signed-off-by: Jeevana Muthyala <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
> b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
> index d5f49fa33bee..cef15d6a4704 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
> @@ -1203,7 +1203,7 @@ static int vcn_v5_0_0_ring_reset(struct
> amdgpu_ring *ring,
>         return amdgpu_ring_reset_helper_end(ring, timedout_fence);
>  }
>
> -static const struct amdgpu_ring_funcs vcn_v5_0_0_unified_ring_vm_funcs
> = {
> +static struct amdgpu_ring_funcs vcn_v5_0_0_unified_ring_vm_funcs = {
>         .type = AMDGPU_RING_TYPE_VCN_ENC,
>         .align_mask = 0x3f,
>         .nop = VCN_ENC_CMD_NO_OP,
> @@ -1244,12 +1244,15 @@ static const struct amdgpu_ring_funcs
> vcn_v5_0_0_unified_ring_vm_funcs = {
>  static void vcn_v5_0_0_set_unified_ring_funcs(struct amdgpu_device
> *adev)
>  {
>         int i;
> +
> +       if (amdgpu_ip_version(adev, VCN_HWIP, 0) == IP_VERSION(5, 3, 0))
> +
> vcn_v5_0_0_unified_ring_vm_funcs.secure_submission_supported = true;
>
>         for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
>                 if (adev->vcn.harvest_config & (1 << i))
>                         continue;
>
> -               adev->vcn.inst[i].ring_enc[0].funcs =
> &vcn_v5_0_0_unified_ring_vm_funcs;
> +               adev->vcn.inst[i].ring_enc[0].funcs = (const struct
> amdgpu_ring_funcs *)&vcn_v5_0_0_unified_ring_vm_funcs;
>                 adev->vcn.inst[i].ring_enc[0].me = i;
>         }
>  }
> --
> 2.43.0

Reply via email to