From: Leo Li <[email protected]> This series can be considered as a v3 of this: https://lore.kernel.org/amd-gfx/[email protected]/
However, the approach to fixing ended up being quite different, hence the new series. Instead of adding vline2 as an interrupt source, all existing DCN interrupt sources are now combined to be handled in VUPDATE_NO_LOCK. This source cannot be masked by any event (short of disabling the output timing generator), and it fires at the HW latching point for newly programmed double-buffered registers. This should fix a majority of flip_done timeout issues in the wild. See patch 1/3 for details. Patch 2/3 fixes a PSR/Replay panel corruption, caused by a race between the commit thread arming flip events then programming a flip, v.s. a interrupt handler delivering the armed event. Also it's commit message for details. Thanks again to everyone who helped with testing and debugging! P.S. Since the fix is on top of some major refactors, backporting to stable will definitely cause merge conflicts. A v7.0.12 based branch can be found here: https://gitlab.freedesktop.org/leoli/linux-asdn/-/commits/lileo/flip_done_timeout_corruption_fixes Leo Li (3): drm/amd/display: consolidate DCN vblank/flip handling onto vupdate_no_lock drm/amd/display: check GRPH_FLIP status before sending event Revert "drm/amd/display: Restore 5s vbl offdelay for NV3x+ DGPUs" .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 75 +++-- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 75 +++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 304 +++++++++--------- .../display/amdgpu_dm/amdgpu_dm_irq_params.h | 8 + drivers/gpu/drm/amd/display/dc/core/dc.c | 45 +++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 6 files changed, 302 insertions(+), 206 deletions(-) -- 2.54.0
