[Intel-gfx] [PATCH] [i915] avoid infinite retries in GuC/HuC loading
Alexandre Oliva
oliva at gnu.org
Thu Mar 23 01:30:49 UTC 2023
On Mar 22, 2023, Rodrigo Vivi <rodrigo.vivi at intel.com> wrote:
> On Sun, Mar 12, 2023 at 04:56:23PM -0300, Alexandre Oliva wrote:
>>
> Since __uc_fw_auto_select is also called from another place,
> intel_uc_fw_init_early
> out of the intel_uc_fw_fetch infinite loop,
That other place is conceptually, sort of, the first iteration of the
infinite loop. Before that first separate early-init call, *uc_fw is
returned by devm_drm_dev_alloc to i915_driver_create, so
zero-initialized I presume, in both the guc and the huc cases.
Only if this first call finds a matching entry (setting both
file_{selected,wanted}.path), and the selected entry fails to load, do
we even enter the loop (provided that other conditionals are satisfied)
and look for other entries, using file_selected.path to find how far the
previous call got (and, with the proposed patch, file_wanted.path to
avoid retrying the path we've just tried).
> I hope Daniele and John have a better understanding and can provide
> some guidance or acks here.
I surely appreciate additional eyes and minds that are more acquainted
with the code at hand than I am. Thanks,
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts. Ask me about <https://stallmansupport.org>
More information about the Intel-gfx
mailing list