From 6366fc70deb9aaf1db4a46916af14fa3c5a115ab Mon Sep 17 00:00:00 2001 From: Lyude Paul Date: Wed, 17 Aug 2022 15:38:44 -0400 Subject: drm/display/dp_mst: Maintain time slot allocations when deleting payloads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, we set drm_dp_atomic_payload->time_slots to 0 in order to indicate that we're about to delete a payload in the current atomic state. Since we're going to be dropping all of the legacy code for handling the payload table however, we need to be able to ensure that we still keep track of the current time slot allocations for each payload so we can reuse this info when asking the root MST hub to delete payloads. We'll also be using it to recalculate the start slots of each VC. So, let's keep track of the intent of a payload in drm_dp_atomic_payload by adding ->delete, which we set whenever we're planning on deleting a payload during the current atomic commit. Signed-off-by: Lyude Paul Cc: Wayne Lin Cc: Ville Syrjälä Cc: Fangzhi Zuo Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: Sean Paul Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-16-lyude@redhat.com --- include/drm/display/drm_dp_mst_helper.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/drm') diff --git a/include/drm/display/drm_dp_mst_helper.h b/include/drm/display/drm_dp_mst_helper.h index b9c361b242ea..8b847836a0b4 100644 --- a/include/drm/display/drm_dp_mst_helper.h +++ b/include/drm/display/drm_dp_mst_helper.h @@ -560,8 +560,11 @@ struct drm_dp_mst_atomic_payload { int time_slots; /** @pbn: The payload bandwidth for this payload */ int pbn; + + /** @delete: Whether or not we intend to delete this payload during this atomic commit */ + bool delete : 1; /** @dsc_enabled: Whether or not this payload has DSC enabled */ - bool dsc_enabled; + bool dsc_enabled : 1; /** @next: The list node for this payload */ struct list_head next; -- cgit v1.2.3