On 11.06.2021 02:05, Matthew Brost wrote: > In upcoming patch we will allow more CTB requests to be sent in > parallel to the GuC for processing, so we shouldn't assume any more > that GuC will always reply without 10ms. s/without/within > > Use bigger value hardcoded value of 1s instead. > > v2: Add CONFIG_DRM_I915_GUC_CTB_TIMEOUT config option > v3: > (Daniel Vetter) > - Use hardcoded value of 1s rather than config option if this is v3 then it's likely still my patch, so I can't give r-b > > Signed-off-by: Matthew Brost <matthew.brost@xxxxxxxxx> > Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx> > --- > drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c > index 8f7b148fef58..bc626ca0a9eb 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c > @@ -475,12 +475,14 @@ static int wait_for_ct_request_update(struct ct_request *req, u32 *status) > /* > * Fast commands should complete in less than 10us, so sample quickly > * up to that length of time, then switch to a slower sleep-wait loop. > - * No GuC command should ever take longer than 10ms. > + * No GuC command should ever take longer than 10ms but many GuC > + * commands can be inflight at time, so use a 1s timeout on the slower > + * sleep-wait loop. this is x100 increase of timeout that not only looks nice, but it should cover for ~100 CTB messages (of len 10 dwords) in our current 4K send CT buffer, so LGTM Michal ps. unless in the future we decide to increase that CT size to something much bigger, so maybe we should connect this timeout with number of possible concurrent messages in flight? not a blocker > */ > #define done INTEL_GUC_MSG_IS_RESPONSE(READ_ONCE(req->status)) > err = wait_for_us(done, 10); > if (err) > - err = wait_for(done, 10); > + err = wait_for(done, 1000); > #undef done > > if (unlikely(err)) > _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx