• Daniel Vetter's avatar
    drm/amdgpu/dc: Stop dma_resv_lock inversion in commit_tail · 178b0013
    Daniel Vetter authored
    Trying to grab dma_resv_lock while in commit_tail before we've done
    all the code that leads to the eventual signalling of the vblank event
    (which can be a dma_fence) is deadlock-y. Don't do that.
    
    Here the solution is easy because just grabbing locks to read
    something races anyway. We don't need to bother, READ_ONCE is
    equivalent. And avoids the locking issue.
    
    v2: Also take into account tmz_surface boolean, plus just delete the
    old code.
    
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: linux-rdma@vger.kernel.org
    Cc: amd-gfx@lists.freedesktop.org
    Cc: intel-gfx@lists.freedesktop.org
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Christian König <christian.koenig@amd.com>
    Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    178b0013
amdgpu_dm.c 256 KB