• Daniel Vetter's avatar
    drm/i915: properly guard ilk ips state · 02d71956
    Daniel Vetter authored
    The update_gfx_val function called from mark_busy wasn't taking the
    mchdev_lock, as it should have. Also sprinkle a few spinlock asserts
    over the code to document things better.
    
    Things are still rather confusing, especially since a few variables
    in dev_priv are used by both the gen6+ rps code and the ilk ips code.
    But protected by totally different locks. Follow-on patches will clean
    that up.
    
    v2: Don't add a deadlock ... hence split up update_gfx_val into a
    wrapper that grabs the lock and an internal __ variant for callsites
    within intel_pm.c that already have taken the lock.
    
    v3: Mark the internal helper as static, noticed by Ben Widawsky.
    
    v4: Damien Lespiau had questions about the safety of the ips setup
    sequence, explain in a comment why it works.
    Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    02d71956
intel_pm.c 114 KB