On Tue, May 19, 2026 at 9:34 AM Jeevana Muthyala <[email protected]> wrote:
>
> 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;
This won't work. You are changing a global structure. Please add a
duplicate vcn_v5_0_0_unified_ring_vm_funcs_secure with the flag set
and use that for 5.3.0 and use the other one for other 5.x.x variants.
Alex
>
> 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
>