mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-31 15:32:32 +00:00
drm/amdgpu: Add ring reset callback for JPEG4_0_0
Add ring reset function callback for JPEG4_0_0 to recover from job timeouts without a full gpu reset. Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
abce7b4fc7
commit
74894ffc7d
@ -143,14 +143,10 @@ static int jpeg_v4_0_sw_init(struct amdgpu_ip_block *ip_block)
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
/* TODO: Add queue reset mask when FW fully supports it */
|
adev->jpeg.supported_reset = AMDGPU_RESET_TYPE_PER_QUEUE;
|
||||||
adev->jpeg.supported_reset =
|
|
||||||
amdgpu_get_soft_full_reset_mask(&adev->jpeg.inst[0].ring_dec[0]);
|
|
||||||
r = amdgpu_jpeg_sysfs_reset_mask_init(adev);
|
r = amdgpu_jpeg_sysfs_reset_mask_init(adev);
|
||||||
if (r)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
return 0;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -724,6 +720,16 @@ static int jpeg_v4_0_process_interrupt(struct amdgpu_device *adev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int jpeg_v4_0_ring_reset(struct amdgpu_ring *ring, unsigned int vmid)
|
||||||
|
{
|
||||||
|
if (amdgpu_sriov_vf(ring->adev))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
jpeg_v4_0_stop(ring->adev);
|
||||||
|
jpeg_v4_0_start(ring->adev);
|
||||||
|
return amdgpu_ring_test_helper(ring);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct amd_ip_funcs jpeg_v4_0_ip_funcs = {
|
static const struct amd_ip_funcs jpeg_v4_0_ip_funcs = {
|
||||||
.name = "jpeg_v4_0",
|
.name = "jpeg_v4_0",
|
||||||
.early_init = jpeg_v4_0_early_init,
|
.early_init = jpeg_v4_0_early_init,
|
||||||
@ -769,6 +775,7 @@ static const struct amdgpu_ring_funcs jpeg_v4_0_dec_ring_vm_funcs = {
|
|||||||
.emit_wreg = jpeg_v2_0_dec_ring_emit_wreg,
|
.emit_wreg = jpeg_v2_0_dec_ring_emit_wreg,
|
||||||
.emit_reg_wait = jpeg_v2_0_dec_ring_emit_reg_wait,
|
.emit_reg_wait = jpeg_v2_0_dec_ring_emit_reg_wait,
|
||||||
.emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
|
.emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
|
||||||
|
.reset = jpeg_v4_0_ring_reset,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void jpeg_v4_0_set_dec_ring_funcs(struct amdgpu_device *adev)
|
static void jpeg_v4_0_set_dec_ring_funcs(struct amdgpu_device *adev)
|
||||||
|
Loading…
Reference in New Issue
Block a user