[PATCH 2/2] drm/i915/gsc: Fix race between HW init and GSC FW load

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Tue Mar 7 21:50:10 UTC 2023


On Thu, 2023-02-23 at 09:21 -0800, Ceraolo Spurio, Daniele wrote:
> The GSC FW load is a slow process (up to 250 ms), so we defer it to a
> dedicated worker to avoid stalling the init flow for that long. However,
> we currently start this worker before the HW init is complete, so there
> is a chance that the GSC loading code submits to the HW before the
> engine initialization has completed. We can easily fix this by starting
> the thread later in the gt_resume flow.
> From this later spot, the GSC code can still race with the default
> submission code; we functionally don't care who wins the race (the GSC
> load doesn't need any state), but since the whole point of the separate
> worker is to make the main thread faster, we prefer the default
> submission code to run first. Therefore, make an exception for driver
> probe and only and start the gsc load from uc_init_late.
> 
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis at intel.com>
> ---
alan:snip

Simple fix... LGTM:
Reviewed-by: Alan Previn <alan.previn.teres.alexis at intel.com>


More information about the dri-devel mailing list