drm/msm/sde: add proper mode config lock to plane QoS check

Realtime QoS status is determined in plane atomic check using
mode config for_each macro.  This macro requires locking of
mode config lock.  Add lock to connector enumeration to avoid
any race conditions.

Change-Id: I6142536268c9261a7af12a8615fa0a2de17ba8e8
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c
index 9674cc0..83eb9c1 100644
--- a/drivers/gpu/drm/msm/sde/sde_plane.c
+++ b/drivers/gpu/drm/msm/sde/sde_plane.c
@@ -231,6 +231,7 @@
 	bool is_rt = false;
 
 	/* check if this plane has a physical connector interface */
+	mutex_lock(&plane->dev->mode_config.mutex);
 	drm_for_each_connector(connector, plane->dev)
 		if (connector->state &&
 				(connector->state->crtc == crtc) &&
@@ -239,6 +240,7 @@
 			is_rt = true;
 			break;
 		}
+	mutex_unlock(&plane->dev->mode_config.mutex);
 
 	SDE_DEBUG("plane%u: pnum:%d rt:%d\n",
 			plane->base.id, psde->pipe - SSPP_VIG0, is_rt);