Explorar o código

disp: msm: dp: reorder update payload call during slot calculation

Currently get vcpi info call is returning wrong slot info since update
payload function is called afterwards. The latter function is calculating
the slot info which is read back by get vcpi call. This change reorders
these function calls. Also, this change sets start_slot to be always 1.
This is the value expected by upstream driver for atomic drivers.
This is a follow up change for the commit 19a9abf064ea
("disp: msm: dp: update MST first link slot information").

Change-Id: I620125a2d73afb7537a3540ee129e2a4eb0c488c
Signed-off-by: Sandeep Gangadharaiah <[email protected]>
Sandeep Gangadharaiah %!s(int64=2) %!d(string=hai) anos
pai
achega
d35438d1be
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  1. 7 7
      msm/dp/dp_mst_drm.c

+ 7 - 7
msm/dp/dp_mst_drm.c

@@ -399,6 +399,12 @@ static void _dp_mst_update_timeslots(struct dp_mst_private *mst,
 	struct dp_mst_bridge *dp_bridge;
 	int pbn, start_slot, num_slots;
 
+#if (KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE)
+	mst->mst_fw_cbs->update_payload_part1(&mst->mst_mgr, 1);
+#else
+	mst->mst_fw_cbs->update_payload_part1(&mst->mst_mgr);
+#endif
+
 	for (i = 0; i < MAX_DP_MST_DRM_BRIDGES; i++) {
 		dp_bridge = &mst->mst_bridge[i];
 
@@ -413,14 +419,8 @@ static void _dp_mst_update_timeslots(struct dp_mst_private *mst,
 			pbn = dp_bridge->pbn;
 		}
 
-		if (mst_bridge == dp_bridge) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
-			mst->mst_fw_cbs->update_payload_part1(&mst->mst_mgr, start_slot);
-#else
-			mst->mst_fw_cbs->update_payload_part1(&mst->mst_mgr);
-#endif
+		if (mst_bridge == dp_bridge)
 			dp_bridge->num_slots = num_slots;
-		}
 
 		mst->dp_display->set_stream_info(mst->dp_display,
 				dp_bridge->dp_panel,