• Carter Cooper's avatar
    msm: kgsl: Wait for the active_count in kgsl_release() · af405436
    Carter Cooper authored
    
    
    It is possible that a context can be successfully destroyed and
    kgsl_release() called by an exiting application before the kernel
    threads have released all the users of the active count.  Instead
    of immediately calling BUG_ON() in kgsl_release() when the active
    count is unexpected, wait a second to give the others time to
    finish up.  If after a second the active count still hasn't gone
    where we need it to then we can assume driver error and BUG_ON().
    
    To accomplish this, remodel kgsl_active_count_wait() to take a
    active_count value to "wait" for.
    
    Change-Id: Ic0dedbadcc7d0714ea14f25e2a43715e2e12c041
    Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
    Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
    af405436
kgsl.c 106 KB