On 06/05/2021 20:13, Matthew Brost wrote:
Basic GuC submission support. This is the first bullet point in the
upstreaming plan covered in the following RFC [1].
At a very high level the GuC is a piece of firmware which sits between
the i915 and the GPU. It offloads some of the scheduling of contexts
from the i915 and programs the GPU to submit contexts. The i915
communicates with the GuC and the GuC communicates with the GPU.
GuC submission will be disabled by default on all current upstream
platforms behind a module parameter - enable_guc. A value of 3 will
enable submission and HuC loading via the GuC. GuC submission should
work on all gen11+ platforms assuming the GuC firmware is present.
This is a huge series and it is completely unrealistic to merge all of
these patches at once. Fortunately I believe we can break down the
series into different merges:
1. Merge Chris Wilson's patches. These have already been reviewed
upstream and I fully agree with these patches as a precursor to GuC
submission.
2. Update to GuC 60.1.2. These are largely Michal's patches.
3. Turn on GuC/HuC auto mode by default.
4. Additional patches needed to support GuC submission. This is any
patch not covered by 1-3 in the first 34 patches. e.g. 'Engine relative
MMIO'
5. GuC submission support. Patches number 35+. These all don't have to
merge at once though as we don't actually allow GuC submission until the
last patch of this series.
For the GuC backend/submission part only - it seems to me none of my
review comments I made in December 2019 have been implemented. At that
point I stated, and this was all internally at the time mind you, that I
do not think the series is ready and there were several high level
issues that would need to be sorted out. I don't think I gave my ack or
r-b back then and the promise was a few things would be worked on post
(internal) merge. That was supposed to include upstream refactoring to
enable GuC better slotting in as a backed. Fast forward a year and a
half later and the only progress we had in this area has been deleted.
From the top of my head, and having glanced the series as posted:
* Self-churn factor in the series is too high.
* Patch ordering issues.
* GuC context state machine is way too dodgy to have any confidence it
can be read and race conditions understood.
* Context pinning code with it's magical two adds, subtract and
cmpxchg is dodgy as well.
* Kludgy way of interfacing with rest of the driver instead of
refactoring to fit (idling, breadcrumbs, scheduler, tasklets, ...).
Now perhaps the latest plan is to ignore all these issues and still
merge, then follow up with throwing it away, mostly or at least largely,
in which case there isn't any point really to review the current state
yet again. But it is sad that we got to this state. So just for the
record - all this was reviewed in Nov/Dec 2019. By me among other folks
and I at least deemed it not ready in this form.
Regards,
Tvrtko