media: aspeed: fix mode-detect always timeout at 2nd run
Subsystems (2)
PATCH 1/1 media: aspeed: fix mode-detect always timeout at 2nd run
aspeed_video_get_resolution() will try to do res-detect again if the timing got in last try is invalid. But it will always timeout because VE_SEQ_CTRL_TRIG_MODE_DET only cleared after 1st mode-detect.
To fix the problem, just clear VE_SEQ_CTRL_TRIG_MODE_DET before set in aspeed_video_enable_mode_detect().
--- drivers/media/platform/aspeed-video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/media/platform/aspeed-video.c +4 -4
@@ -611,6 +611,10 @@ static void aspeed_video_enable_mode_detect(struct aspeed_video *video)aspeed_video_update (video,VE_INTERRUPT_CTRL ,0 ,VE_INTERRUPT_MODE_DETECT ); +/* Disable mode detect in order to re-trigger */ +aspeed_video_update (video,VE_SEQ_CTRL , +VE_SEQ_CTRL_TRIG_MODE_DET ,0 ); +/* Trigger mode detect */ aspeed_video_update (video,VE_SEQ_CTRL ,0 ,VE_SEQ_CTRL_TRIG_MODE_DET ); }
@@ -930,10 +934,6 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)return ; } -/* Disable mode detect in order to re-trigger */ -aspeed_video_update (video,VE_SEQ_CTRL , -VE_SEQ_CTRL_TRIG_MODE_DET ,0 ); -aspeed_video_check_and_set_polarity (video);aspeed_video_enable_mode_detect (video);
Signature · 1 line
2.25.1
Dear Jammy,
Quoted 2 lines · Jammy Huang
aspeed_video_get_resolution()will try to do res-detect again if the timing got in last try is invalid. But it will always timeout because
The verb *time out* is spelled with a space.
Quoted 1 line
VE_SEQ_CTRL_TRIG_MODE_DETonly cleared after 1st mode-detect.
is only cleared?
Quoted 2 lines
To fix the problem, just clear
VE_SEQ_CTRL_TRIG_MODE_DETbefore set in
before setting it?
Quoted 24 lines
aspeed_video_enable_mode_detect().Signed-off-by Jammy Huang <[email protected]>--- drivers/media/platform/aspeed-video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/media/platform/aspeed-video.c +4
-0@@ -611,6 +611,10 @@ static void aspeed_video_enable_mode_detect(struct aspeed_video *video)aspeed_video_update (video,VE_INTERRUPT_CTRL ,0 ,VE_INTERRUPT_MODE_DETECT ); +/* Disable mode detect in order to re-trigger */ +aspeed_video_update (video,VE_SEQ_CTRL , +VE_SEQ_CTRL_TRIG_MODE_DET ,0 ); +/* Trigger mode detect */ aspeed_video_update (video,VE_SEQ_CTRL ,0 ,VE_SEQ_CTRL_TRIG_MODE_DET ); }
drivers/media/platform/aspeed-video.c static void aspeed_video_get_resolution(struct aspeed_video *video) · line 939
Quoted 10 lines
drivers/media/platform/aspeed-video.c +0
-4@@ -930,10 +934,6 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)return ; } -/* Disable mode detect in order to re-trigger */ -aspeed_video_update (video,VE_SEQ_CTRL , -VE_SEQ_CTRL_TRIG_MODE_DET ,0 ); -aspeed_video_check_and_set_polarity (video);aspeed_video_enable_mode_detect (video);
Kind regards,
Paul
PATCH 1/1 media: aspeed: fix mode-detect always timeout at 2nd run
Dear Paul,
I will modify my commit message. Thanks for your review and suggestion.
Quoted 54 lines · Paul Menzel
Dear Jammy,
Quoted 2 lines · Jammy Huang
aspeed_video_get_resolution()will try to do res-detect again if the timing got in last try is invalid. But it will always timeout becauseThe verb *time out* is spelled with a space.
Quoted 1 line
VE_SEQ_CTRL_TRIG_MODE_DETonly cleared after 1st mode-detect.is only cleared?
Quoted 1 line
To fix the problem, just clear
VE_SEQ_CTRL_TRIG_MODE_DETbefore set inbefore setting it?
Quoted 24 lines
aspeed_video_enable_mode_detect().Signed-off-by Jammy Huang<[email protected]>--- drivers/media/platform/aspeed-video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/media/platform/aspeed-video.c +4
-0@@ -611,6 +611,10 @@ static void aspeed_video_enable_mode_detect(struct aspeed_video *video)aspeed_video_update (video,VE_INTERRUPT_CTRL ,0 ,VE_INTERRUPT_MODE_DETECT ); +/* Disable mode detect in order to re-trigger */ +aspeed_video_update (video,VE_SEQ_CTRL , +VE_SEQ_CTRL_TRIG_MODE_DET ,0 ); +/* Trigger mode detect */ aspeed_video_update (video,VE_SEQ_CTRL ,0 ,VE_SEQ_CTRL_TRIG_MODE_DET ); }drivers/media/platform/aspeed-video.c static void aspeed_video_get_resolution(struct aspeed_video *video) · line 939
Quoted 10 lines
drivers/media/platform/aspeed-video.c +0
-4@@ -930,10 +934,6 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)return ; } -/* Disable mode detect in order to re-trigger */ -aspeed_video_update (video,VE_SEQ_CTRL , -VE_SEQ_CTRL_TRIG_MODE_DET ,0 ); -aspeed_video_check_and_set_polarity (video);aspeed_video_enable_mode_detect (video);Acked-by Paul Menzel<[email protected]>Kind regards,
Paul
Signature · 5 lines
Best Regards Jammy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20211102/06a4e5c4/attachment-0001.htm>