• John Harrison's avatar
    drm/i915: Fix up locking around dumping requests lists · 5bc4b43d
    John Harrison authored
    The debugfs dump of requests was confused about what state requires
    the execlist lock versus the GuC lock. There was also a bunch of
    duplicated messy code between it and the error capture code.
    
    So refactor the hung request search into a re-usable function. And
    reduce the span of the execlist state lock to only the execlist
    specific code paths. In order to do that, also move the report of hold
    count (which is an execlist only concept) from the top level dump
    function to the lower level execlist specific function. Also, move the
    execlist specific code into the execlist source file.
    
    v2: Rename some functions and move to more appropriate files (Daniele).
    v3: Rename new execlist dump function (Daniele)
    
    Fixes: dc0dad36 ("drm/i915/guc: Fix for error capture after full GPU reset with GuC")
    Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
    Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Matthew Brost <matthew.brost@intel.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: Matt Roper <matthew.d.roper@intel.com>
    Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
    Cc: Michael Cheng <michael.cheng@intel.com>
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Cc: Bruce Chang <yu.bruce.chang@intel.com>
    Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
    Cc: Matthew Auld <matthew.auld@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-4-John.C.Harrison@Intel.com
    (cherry picked from commit a4be3dca)
    Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
    5bc4b43d
i915_gpu_error.c 54.8 KB