aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJae Hyun Yoo <[email protected]>2019-09-13 15:11:05 -0300
committerMauro Carvalho Chehab <[email protected]>2019-10-24 18:30:36 -0300
commit5b3f3c41c5c791c1c22cd91655e7ef4b2a1dff7c (patch)
treed32e9fc9ec331769c2fbce31b27b86d47d1a5073
parent0e78795e95c540bc49c2e094103932eb6a06e6c8 (diff)
media: aspeed: set hsync and vsync polarities to normal before starting mode detection
Sometimes it detects a weird resolution such as 1024x287 when the actual resolution is 1024x768. To resolve such an issue, this commit adds clearing for hsync and vsync polarity register bits at the beginning of the first mode detection. This is recommended in the datasheet. Signed-off-by: Jae Hyun Yoo <[email protected]> Reviewed-by: Eddie James <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r--drivers/media/platform/aspeed-video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 8f77079da55a..929b3a5b8849 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -740,6 +740,8 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
}
set_bit(VIDEO_RES_DETECT, &video->flags);
+ aspeed_video_update(video, VE_CTRL,
+ VE_CTRL_VSYNC_POL | VE_CTRL_HSYNC_POL, 0);
aspeed_video_enable_mode_detect(video);
rc = wait_event_interruptible_timeout(video->wait,