diff options
| author | Alex Deucher <[email protected]> | 2025-07-15 15:37:56 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-07-16 20:17:16 +0000 |
| commit | 82a7c94fcecd104fa70766caaf6423e84bf588cb (patch) | |
| tree | ec44366dca58b204de47b7f47f19452851fd0a4e /drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | |
| parent | drm/amdgpu: rework gmc_v9_0_get_coherence_flags v2 (diff) | |
| download | kernel-82a7c94fcecd104fa70766caaf6423e84bf588cb.tar.gz kernel-82a7c94fcecd104fa70766caaf6423e84bf588cb.zip | |
drm/amdgpu/jpeg: clean up reset type handling
Make the handling consistent with other IPs and across
JPEG versions.
Reviewed-by: Sathishkumar S <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c index 5473cbaa5c0e..e622db1f818b 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c @@ -200,14 +200,13 @@ static int jpeg_v5_0_1_sw_init(struct amdgpu_ip_block *ip_block) if (r) return r; - if (!amdgpu_sriov_vf(adev)) { - adev->jpeg.supported_reset = AMDGPU_RESET_TYPE_PER_QUEUE; - r = amdgpu_jpeg_sysfs_reset_mask_init(adev); - if (r) - return r; - } + adev->jpeg.supported_reset = + amdgpu_get_soft_full_reset_mask(&adev->jpeg.inst[0].ring_dec[0]); + if (!amdgpu_sriov_vf(adev)) + adev->jpeg.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE; + r = amdgpu_jpeg_sysfs_reset_mask_init(adev); - return 0; + return r; } /** @@ -226,8 +225,7 @@ static int jpeg_v5_0_1_sw_fini(struct amdgpu_ip_block *ip_block) if (r) return r; - if (!amdgpu_sriov_vf(adev)) - amdgpu_jpeg_sysfs_reset_mask_fini(adev); + amdgpu_jpeg_sysfs_reset_mask_fini(adev); r = amdgpu_jpeg_sw_fini(adev); |
