diff mbox series

[v2,1/1] drm/i915/gt: Increase a time to retry RING_HEAD reset

Message ID 20241206094543.1638580-1-nitin.r.gote@intel.com (mailing list archive)
State New
Headers show
Series [v2,1/1] drm/i915/gt: Increase a time to retry RING_HEAD reset | expand

Commit Message

Gote, Nitin R Dec. 6, 2024, 9:45 a.m. UTC
Issue seen again where engine resets fails because the engine resumes from
an incorrect RING_HEAD. HEAD is still not 0 even after writing into it.
This seems to be timing issue and we experimented different values from 5ms
to 50ms and found out that 50ms works best based on testing.
So, if write doesn't succeed at first then retry again.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12806
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andi Shyti Dec. 9, 2024, 10:05 a.m. UTC | #1
Hi Nitin,

On Fri, Dec 06, 2024 at 03:15:43PM +0530, Nitin Gote wrote:
> Issue seen again where engine resets fails because the engine resumes from
> an incorrect RING_HEAD. HEAD is still not 0 even after writing into it.
> This seems to be timing issue and we experimented different values from 5ms
> to 50ms and found out that 50ms works best based on testing.
> So, if write doesn't succeed at first then retry again.
> 
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12806
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> index 32f3b52a183a..bc9f28524713 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> @@ -231,7 +231,7 @@ static int xcs_resume(struct intel_engine_cs *engine)
>  	set_pp_dir(engine);
>  
>  	/* First wake the ring up to an empty/idle ring */
> -	for ((kt) = ktime_get() + (2 * NSEC_PER_MSEC);
> +	for ((kt) = ktime_get() + (50 * NSEC_PER_MSEC);

Can we please add the comment here as I suggested in v1? If you
don't see it necessary, please feel free to comment it here.

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
index 32f3b52a183a..bc9f28524713 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
@@ -231,7 +231,7 @@  static int xcs_resume(struct intel_engine_cs *engine)
 	set_pp_dir(engine);
 
 	/* First wake the ring up to an empty/idle ring */
-	for ((kt) = ktime_get() + (2 * NSEC_PER_MSEC);
+	for ((kt) = ktime_get() + (50 * NSEC_PER_MSEC);
 			ktime_before(ktime_get(), (kt)); cpu_relax()) {
 		/*
 		 * In case of resets fails because engine resumes from