mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-31 17:18:33 +00:00
drm/amdgpu: Add ring reset callback for JPEG3_0_0
Add ring reset function callback for JPEG3_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
74894ffc7d
commit
03399d0bff
@ -132,7 +132,10 @@ static int jpeg_v3_0_sw_init(struct amdgpu_ip_block *ip_block)
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
return 0;
|
adev->jpeg.supported_reset = AMDGPU_RESET_TYPE_PER_QUEUE;
|
||||||
|
r = amdgpu_jpeg_sysfs_reset_mask_init(adev);
|
||||||
|
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -151,6 +154,8 @@ static int jpeg_v3_0_sw_fini(struct amdgpu_ip_block *ip_block)
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
amdgpu_jpeg_sysfs_reset_mask_fini(adev);
|
||||||
|
|
||||||
r = amdgpu_jpeg_sw_fini(adev);
|
r = amdgpu_jpeg_sw_fini(adev);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
@ -550,6 +555,13 @@ static int jpeg_v3_0_process_interrupt(struct amdgpu_device *adev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int jpeg_v3_0_ring_reset(struct amdgpu_ring *ring, unsigned int vmid)
|
||||||
|
{
|
||||||
|
jpeg_v3_0_stop(ring->adev);
|
||||||
|
jpeg_v3_0_start(ring->adev);
|
||||||
|
return amdgpu_ring_test_helper(ring);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct amd_ip_funcs jpeg_v3_0_ip_funcs = {
|
static const struct amd_ip_funcs jpeg_v3_0_ip_funcs = {
|
||||||
.name = "jpeg_v3_0",
|
.name = "jpeg_v3_0",
|
||||||
.early_init = jpeg_v3_0_early_init,
|
.early_init = jpeg_v3_0_early_init,
|
||||||
@ -595,6 +607,7 @@ static const struct amdgpu_ring_funcs jpeg_v3_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_v3_0_ring_reset,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void jpeg_v3_0_set_dec_ring_funcs(struct amdgpu_device *adev)
|
static void jpeg_v3_0_set_dec_ring_funcs(struct amdgpu_device *adev)
|
||||||
|
Loading…
Reference in New Issue
Block a user