Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3952233pxb; Tue, 2 Nov 2021 01:10:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6Bq77TrbFXhK0keqjpwFISD9VqqgQ7ySgT9eoT/YpNHrfkZKcrEDC790iCT4ajmxYh7IO X-Received: by 2002:aa7:d2d6:: with SMTP id k22mr31402445edr.14.1635840656938; Tue, 02 Nov 2021 01:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635840656; cv=none; d=google.com; s=arc-20160816; b=PHSfQm5sWsy+0gZSC9kmhdWteI+MfYsY4BE/BDl3Y20iOd9zTbglVXdiz9F2hjosJX el6gwAb+IuPnAFGL6wEhelA5yja2oVMzzws7ZC+5xECW6uXSa4XYUD8BDojd0Hh52qma L+MbgtyeIovOsW+/R5MPoRpgTA0jTTnPK6hdhuBUAmUh912fmgwxZvtzfF8FJyKp3XpM VEkkKHUZJyU8SXgYdVYvzLKjVdWe9JcgL9eug5NRGh/FCJYnsO2RwV98VGdwZrF7D1cO mzWs30nfYz/QJ1xJe1Lgxmta8r3geuLnLYqNHetnul8DcOB8bcxh3k51Le3cZSxZdK45 nrXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=umd2uX4b3m0LcLzDB8RBIuIg2L6TX4rB3lcS0Uc4pBQ=; b=mGpsU+i+Kr6jMLYURInhNjyTJRD5oRO0WHia5rBvJr4Das8XHhdAf0Yy7KnAcXP7jq LbrXQl3Y9GENQsIdK7su1TplybEbVtKOqmwMS2qHem2HDdJJjoGB18gSWtklr0Zl0rR8 ACOJmMazq3QLIwCQ6rvg3bojZ1JTz8oPuYKCGiaxdbRhKyzl5YTpHL19hceLaj2MIkrt T4/8ahh32XFwR/vez0r1Z4XIzq3SmYLyEBdm2Qtlz4usu3H9pWkFNegIPfYA2IKlEpsN 4flmsl3FeMaQDjfqZvy4SSHqRuV0sYnyQOxXh8G3ZcoKJ9GhMZ5BgMGDLhLRzhou5xxR vBNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si22936718edv.219.2021.11.02.01.10.33; Tue, 02 Nov 2021 01:10:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230407AbhKBIKd (ORCPT + 99 others); Tue, 2 Nov 2021 04:10:33 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:36279 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229505AbhKBIKc (ORCPT ); Tue, 2 Nov 2021 04:10:32 -0400 Received: from [192.168.0.3] (ip5f5ae91d.dynamic.kabel-deutschland.de [95.90.233.29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 1236861EA191D; Tue, 2 Nov 2021 09:07:55 +0100 (CET) Message-ID: <15c44f9a-20af-8059-1694-601821e17413@molgen.mpg.de> Date: Tue, 2 Nov 2021 09:07:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH] media: aspeed: fix mode-detect always timeout at 2nd run Content-Language: en-US To: Jammy Huang References: <20211102071337.5983-1-jammy_huang@aspeedtech.com> Cc: eajames@linux.ibm.com, mchehab@kernel.org, joel@jms.id.au, andrew@aj.id.au, linux-media@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Paul Menzel In-Reply-To: <20211102071337.5983-1-jammy_huang@aspeedtech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Jammy, On 02.11.21 08:13, Jammy Huang wrote: > 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. > VE_SEQ_CTRL_TRIG_MODE_DET only cleared after 1st mode-detect. is only cleared? > > To fix the problem, just clear VE_SEQ_CTRL_TRIG_MODE_DET before set in before setting it? > aspeed_video_enable_mode_detect(). > > Signed-off-by: Jammy Huang > --- > drivers/media/platform/aspeed-video.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c > index cd2b71c81e31..b470f4b68aa0 100644 > --- a/drivers/media/platform/aspeed-video.c > +++ b/drivers/media/platform/aspeed-video.c > @@ -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); > Acked-by: Paul Menzel Kind regards, Paul