• M
    drm/amdgpu:changes in gfx DMAframe scheme (v2) · e9d672b2
    Monk Liu 提交于
    1) Adapt to vulkan:
    Now use double SWITCH BUFFER to replace the 128 nops w/a,
    because when vulkan introduced, umd can insert 7 ~ 16 IBs
    per submit which makes 256 DW size cannot hold the whole
    DMAframe (if we still insert those 128 nops), CP team suggests
    use double SWITCH_BUFFERs, instead of tricky 128 NOPs w/a.
    
    2) To fix the CE VM fault issue when MCBP introduced:
    Need one more COND_EXEC wrapping IB part (original one us
    for VM switch part).
    
    this change can fix vm fault issue caused by below scenario
    without this change:
    
    >CE passed original COND_EXEC (no MCBP issued this moment),
     proceed as normal.
    
    >DE catch up to this COND_EXEC, but this time MCBP issued,
     thus DE treats all following packages as NOP. The following
     VM switch packages now looks just as NOP to DE, so DE
     dosen't do VM flush at all.
    
    >Now CE proceeds to the first IBc, and triggers VM fault,
     because DE didn't do VM flush for this DMAframe.
    
    3) change estimated alloc size for gfx9.
    with new DMAframe scheme, we need modify emit_frame_size
    for gfx9
    
    4) No need to insert 128 nops after gfx8 vm flush anymore
    because there was double SWITCH_BUFFER append to vm flush,
    and for gfx7 we already use double SWITCH_BUFFER following
    after vm_flush so no change needed for it.
    
    5) Change emit_frame_size for gfx8
    
    v2: squash in BUG removal from Monk
    Signed-off-by: NMonk Liu <Monk.Liu@amd.com>
    Acked-by: NAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
    e9d672b2
gfx_v9_0.c 130.6 KB