Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 436abffe authored by Kalyan Thota's avatar Kalyan Thota
Browse files

drm/msm/sde: avoid lock while dumping fence status



while crtc_commit is in progress last_close can be triggered
which accquires mode config locks, hence avoid using lock while
dumping the fence status on connector when lock is already taken.

Change-Id: I4e2032a65b3483dd276a2c82f339016fc2f3a93f
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
parent 08e5b09d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1663,6 +1663,16 @@ void sde_kms_timeline_status(struct drm_device *dev)
	drm_for_each_crtc(crtc, dev)
		sde_crtc_timeline_status(crtc);

	if (mutex_is_locked(&dev->mode_config.mutex)) {
		/*
		 *Probably locked from last close dumping status anyway
		 */
		SDE_ERROR("dumping conn_timeline without mode_config lock\n");
		drm_for_each_connector(conn, dev)
			sde_conn_timeline_status(conn);
		return;
	}

	mutex_lock(&dev->mode_config.mutex);
	drm_for_each_connector(conn, dev)
		sde_conn_timeline_status(conn);