• Chris Wilson's avatar
    drm/i915: Only recover active engines · 4b9bb972
    Chris Wilson authored
    If we issue a reset to a currently idle engine, leave it idle
    afterwards. This is useful to excise a linkage between reset and the
    shrinker. When waking the engine, we need to pin the default context
    image which we use for overwriting a guilty context -- if the engine is
    idle we do not need this pinned image! However, this pinning means that
    waking the engine acquires the FS_RECLAIM, and so may trigger the
    shrinker. The shrinker itself may need to wait upon the GPU to unbind
    and object and so may require services of reset; ergo we should avoid
    the engine wake up path.
    
    The danger in skipping the recovery for idle engines is that we leave the
    engine with no context defined, which may interfere with the operation of
    the power context on some older platforms. In practice, we should only
    be resetting an active GPU but it something to look out for on Ironlake
    (if memory serves).
    
    Fixes: 79ffac85 ("drm/i915: Invert the GEM wakeref hierarchy")
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Imre Deak <imre.deak@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190626154549.10066-2-chris@chris-wilson.co.uk
    (cherry picked from commit 18398904)
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    4b9bb972
intel_reset.c 39.1 KB