From cdda59cd03a2e5e9ef7ce46394f797e275dc51f6 Mon Sep 17 00:00:00 2001 From: Wyon Bi Date: Fri, 28 Sep 2018 11:12:29 +0800 Subject: [PATCH] Revert "drm: bridge: analogix: Avoid timeout warnings in analogix_dp_config_video()" This reverts commit dd25e35e0850e011f94748cb061c63b84f7ada2b. Change-Id: Id3f886bdfeddf26626087c67cafe263c01ce372d Signed-off-by: Wyon Bi --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 6733acc44d0e..b18aa122ddcc 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -651,6 +651,7 @@ static int analogix_dp_set_link_train(struct analogix_dp_device *dp, static int analogix_dp_config_video(struct analogix_dp_device *dp) { + int retval = 0; int timeout_loop = 0; int done_count = 0; @@ -687,10 +688,8 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) /* Configure video slave mode */ analogix_dp_enable_video_master(dp, 0); - /* Enable video input */ - analogix_dp_start_video(dp); - timeout_loop = 0; + for (;;) { timeout_loop++; if (analogix_dp_is_video_stream_on(dp) == 0) { @@ -708,7 +707,10 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) usleep_range(1000, 1001); } - return 0; + if (retval != 0) + dev_err(dp->dev, "Video stream is not detected!\n"); + + return retval; } static void analogix_dp_enable_scramble(struct analogix_dp_device *dp, @@ -811,6 +813,9 @@ static void analogix_dp_commit(struct analogix_dp_device *dp) if (drm_panel_enable(dp->plat_data->panel)) DRM_ERROR("failed to enable the panel\n"); } + + /* Enable video */ + analogix_dp_start_video(dp); } static int analogix_dp_get_modes(struct drm_connector *connector)