• Mika Kuoppala's avatar
    drm/i915: Use fallback forcewake if primary ack missing · 71306303
    Mika Kuoppala authored
    There is a possibility on gen9 hardware to miss the forcewake ack
    message. The recommended workaround is to use another free
    bit and toggle it until original bit is successfully acknowledged.
    
    Some future gen9 revs might or might not fix the underlying issue but
    using fallback forcewake bit dance can be considered as harmless:
    without the ack timeout we never reach the fallback bit forcewake.
    Thus as of now we adopt a blanket approach for all gen9 and leave
    the bypassing the fallback bit approach for future patches if
    corresponding hw revisions do appear.
    
    Commit 83e33372 ("drm/i915: Increase maximum polling time to 50ms
    for forcewake request/clear ack") did increase the forcewake timeout.
    If the issue was a delayed ack, future work could include finding
    a suitable timeout value both for primary ack and reserve toggle
    to reduce the worst case latency.
    
    v2: use bit 15, naming, comment (Chris), only wait fallback ack
    v3: fix return on fallback, backoff after fallback write (Chris)
    v4: udelay on first pass, grammar (Chris)
    v4: s/reserve/fallback
    
    References: HSDES #1604254524
    References: https://bugs.freedesktop.org/show_bug.cgi?id=102051
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
    Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
    Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Link: https://patchwork.freedesktop.org/patch/msgid/20171102094836.2506-1-mika.kuoppala@linux.intel.com
    71306303
i915_reg.h 367 KB