On Thu, 2022-06-09 at 16:19 -0700, Ceraolo Spurio, Daniele wrote: > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c > index 075ec97b459d..33bfac91fa01 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c > +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c > @@ -426,7 +426,10 @@ int intel_huc_check_status(struct intel_huc *huc) > break; > } > > - return intel_huc_is_authenticated(huc); > + if (intel_huc_is_authenticated(huc)) > + return 1; > + > + return !i915_sw_fence_done(&huc->delayed_load.fence); > Are we sure we dont have a race condition here? Perhaps a less cleaner but might tigher check might be: if (i915_sw_fence_done(..) && intel_huc_is_authenticated(..)) return 1 else if (!i915_sw_fence_done(..)) return 1 return 0; To speed things up a little, please accept a conditional R-b if you can reply back with why we might not need to worry about the race condition or if i am just reading this incorrectly. Reviewed-by: Alan Previn <alan.previn.teres.alexis@xxxxxxxxx> > } > > static bool huc_has_delayed_load(struct intel_huc *huc) > -- > 2.25.1 >