drm/i915/guc: Add error-capture init warnings when needed
authorAlan Previn <alan.previn.teres.alexis@intel.com>
Wed, 19 Oct 2022 07:29:29 +0000 (00:29 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Mon, 24 Oct 2022 21:44:41 +0000 (14:44 -0700)
commita894077890ad118de88c97c03f67a611ca60882a
treef916c43cdd5f018462f0c53936380883cf61e3e9
parentd7a8680ec9fb217987a9569aba1abeed886805f0
drm/i915/guc: Add error-capture init warnings when needed

If GuC is being used and we initialized GuC-error-capture,
we need to be warning if we don't provide an error-capture
register list in the firmware ADS, for valid GT engines.
A warning makes sense as this would impact debugability
without realizing why a reglist wasn't retrieved and reported
by GuC.

However, depending on the platform, we might have certain
engines that have a register list for engine instance error state
but not for engine class. Thus, add a check only to warn if the
register list was non existent vs an empty list (use the
empty lists to skip the warning).

NOTE: if a future platform were to introduce new registers
in place of what was an empty list on existing / legacy hardware
engines no warning is provided as the empty list is meant
to be used intentionally. As an example, if a future hardware
were to add blitter engine-class-registers (new) on top
of the legacy blitter engine-instance-register (HEAD, TAIL, etc.),
no warning is generated.

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221019072930.17755-2-alan.previn.teres.alexis@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c