drm/amd/display: Remove wait while locked
authorGabe Teeger <gabe.teeger@amd.com>
Mon, 14 Aug 2023 20:06:18 +0000 (16:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 19:36:38 +0000 (15:36 -0400)
commitd12f00c91fdfe3e50747f9e7e229fd8ede16b632
treea6ef53ae7e09ba37a3526f606804d87260bea017
parentd8bafc2b1eeae78317d37b3440d1022977e9b28c
drm/amd/display: Remove wait while locked

[Why]
We wait for mpc idle while in a locked state, leading to potential
deadlock.

[What]
Move the wait_for_idle call to outside of HW lock. This and a
call to wait_drr_doublebuffer_pending_clear are moved added to a new
static helper function called wait_for_outstanding_hw_updates, to make
the interface clearer.

Cc: stable@vger.kernel.org
Fixes: 8f0d304d21b3 ("drm/amd/display: Do not commit pipe when updating DRR")
Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/Makefile
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c