• Rob Clark's avatar
    drm/msm: move submit fence wait out of struct_mutex · 48f243c9
    Rob Clark authored
    Probably a symptom of needing finer grained locking, but if we wait on
    the incoming fence-fd (which could come from a different context) while
    holding struct_mutex, that blocks retire_worker so gpu fences cannot get
    signalled.
    
    This causes a problem if userspace manages to get more than a frame
    ahead, leaving the atomic-commit worker blocked waiting on fences that
    cannot be signaled because submit is blocked waiting for a fence
    signalled from vblank (after the atomic commit which is blocked).
    
    If we start having multiple fence ctxs for the gpu, submit_fence_sync()
    would probably need to move outside of struct_mutex as well.
    Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
    48f243c9
msm_gem_submit.c 12.8 KB