[PATCH 3/3] drm/amdgpu/vcn: Ensure that sysfs reset run in the fini
Christian König
christian.koenig at amd.com
Mon Aug 18 11:17:12 UTC 2025
On 16.08.25 18:27, Rodrigo Siqueira wrote:
> The function amdgpu_vcn_sysfs_reset_mask_fini() in the
> vcn_v5_0_1_sw_fini() is invoked at the end of the function, after
> amdgpu_vcn_sw_fini(). This can be a problem if amdgpu_vcn_sw_fini()
> returns early, since the VCN reset sysfs interface will not be removed.
> This commit addresses the issue by moving
> amdgpu_vcn_sysfs_reset_mask_fini() above amdgpu_vcn_sw_fini(), aligning
> the fini code with vcn_v4_0_3_sw_fini().
>
> Signed-off-by: Rodrigo Siqueira <siqueira at igalia.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
> index 7cb21e2b4eb0..3b7372861032 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
> @@ -245,14 +245,14 @@ static int vcn_v5_0_1_sw_fini(struct amdgpu_ip_block *ip_block)
> return r;
> }
>
> + amdgpu_vcn_sysfs_reset_mask_fini(adev);
> +
> for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
> r = amdgpu_vcn_sw_fini(adev, i);
> if (r)
> return r;
> }
>
> - amdgpu_vcn_sysfs_reset_mask_fini(adev);
> -
> return 0;
> }
>
More information about the amd-gfx
mailing list