drm/msm/sde: avoid drm_for_each_connector usage in encoder

Each physical encoder's associated connector is cached during
driver initialization, so the correct connector object may be
obtained without needing to iterate over the global connector
list.

CRs-Fixed: 2019302
Change-Id: I8e1f45a69cf64c3af4ce555b4005feac11701943
Signed-off-by: Clarence Ip <cip@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c b/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c
index a26126f..bdab758 100644
--- a/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c
+++ b/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c
@@ -9,7 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
  */
 
 #define pr_fmt(fmt)	"[drm:%s:%d] " fmt, __func__, __LINE__
@@ -948,12 +947,7 @@
 	dev = wb_enc->base.parent->dev;
 
 	/* find associated writeback connector */
-	mutex_lock(&dev->mode_config.mutex);
-	drm_for_each_connector(connector, phys_enc->parent->dev) {
-		if (connector->encoder == phys_enc->parent)
-			break;
-	}
-	mutex_unlock(&dev->mode_config.mutex);
+	connector = phys_enc->connector;
 
 	if (!connector || connector->encoder != phys_enc->parent) {
 		SDE_ERROR("failed to find writeback connector\n");