]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
media: aspeed: set hsync and vsync polarities to normal before starting mode detection
authorJae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Fri, 13 Sep 2019 18:11:05 +0000 (15:11 -0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:00:31 +0000 (00:00 -0500)
BugLink: https://bugs.launchpad.net/bugs/1860490
[ Upstream commit 5b3f3c41c5c791c1c22cd91655e7ef4b2a1dff7c ]

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 <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/aspeed-video.c

index 4ef37cfc8446729d6331763f1801f048148ede9c..b5d4b5f239f64eb0129a2f20e3e02951d61c5ae6 100644 (file)
@@ -741,6 +741,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,